1

I am installing these packages: g++-4.7 gcc-4.7-multilib and I set CXX to g++-4.7

I validate that the compiler is indeed 4.7 by issuing ${CXX} --version

after that I call cmake like this:

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m32" .

My project has only c++ source files so no need for C flags. The errors I get on travis are:

/usr/include/c++/4.7/cstdio:43:28: fatal error: bits/c++config.h: No such file or directory

any ideas? I have no problems using -m64

EDIT:

just tried also with g++-4.7-multilib (g++ instead of gcc) but still no luck - same error.

onqtam
  • 4,356
  • 2
  • 28
  • 50

2 Answers2

1

Seems like you ran into this: Missing include "bits/c++config.h" when cross compiling 64 bit program on 32 bit in Ubuntu

Make sure that you have the same versions of gcc, g++, gcc-multilib and g++-multilib installed and if that doesn't help, try adding -I/usr/include/c++/4.7/i686-linux-gnu to CXXFLAGS

Community
  • 1
  • 1
Moshev
  • 556
  • 6
  • 14
0

I looked at the log and saw this...

Installing APT Packages (BETA)
Disallowing packages: g\+\+-4.7-multilib
If you require these packages, please review the package approval process at:
https://github.com/travis-ci/apt-package-whitelist#package-approval-process

turns out taht only for gcc 4.6 and 4.7 the package is not in the whitelist - other gcc versions have it... will request it.

onqtam
  • 4,356
  • 2
  • 28
  • 50