The -m32 is telling gcc to compile for a 32-bit platform. On a 64-bit platform, gcc normally only comes with 64-bit libraries. You have two options:
Install 32-bit headers and libraries. Here's how you'd do this on Ubuntu.
Run this command:
sudo apt-get install gcc-multilibCompile for 64-bit instead. Modify this line in the file named
configure:CFLAGS="-m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH=\"$host_cpu\"' $CFLAGS"Delete
-m32, giving you:CFLAGS="-ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH=\"$host_cpu\"' $CFLAGS"Run
./configure, thenmake clean, thenmakeHowever, I would recommend against this approach. The library authors went out of their way to make this build for 32 bits on a 64 bit system, and I can't guarantee that it will work correctly if you do this. (It does compile, though.)
The -m32 is telling gcc to compile for a 32-bit platform. On a 64-bit platform, gcc normally only comes with 64-bit libraries. You have two options:
Install 32-bit headers and libraries. Here's how you'd do this on Ubuntu.
Run this command:
sudo apt-get install gcc-multilibCompile for 64-bit instead. Modify this line in the file named
configure:CFLAGS="-m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH=\"$host_cpu\"' $CFLAGS"Delete
-m32, giving you:CFLAGS="-ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH=\"$host_cpu\"' $CFLAGS"Run
./configure, thenmake clean, thenmakeHowever, I would recommend against this approach. The library authors went out of their way to make this build for 32 bits on a 64 bit system, and I can't guarantee that it will work correctly if you do this. (It does compile, though.)
Below is one way to debug and fix this issue. Since most linux installations differ in one way or another, YMMV.
- Find which package installed
libc-header-start.h.
$ dpkg -S libc-header-start.h
libc6-dev:amd64: /usr/include/x86_64-linux-gnu/bits/libc-header-start.h
On a working system, /usr/include/bits is a symlink to /usr/include/x86_64-linux-gnu/bits. Running dpkg search gives us:
$ dpkg -S /usr/include/bits
libc6-dev-i386: /usr/include/bits
Installing libc6-dev-i386 creates the symlink and the error is addressed.
However, subsequently I ran into a linker error with the linker not being able to find libgcc (-lgcc). Apparently Linux default linker needs libgcc in most cases. Further debugging the issue with linker verbosity enabled lead me to missing lib32gcc-10-dev package.
In short, unless a very controlled build environment is desired, just install gcc-multilib package when using -m32 (needed for gcc or clang). For C++, g++-multilib is also required.
qt - bits/c++config.h no such file or directory - Stack Overflow
C/C++ problem with bits/sys_errlist.h not found
I have an error with #include <bits/stdc++h.> puts "No such file or directory"
Make fails bits/c++config.h no such file or directory
Adding this answer partially because it fixed my problem of the same issue and so I can bookmark this question myself.
I was able to fix it by doing the following:
sudo apt-get install gcc-multilib g++-multilib
If you've installed a version of gcc / g++ that doesn't ship by default (such as g++-4.8 on lucid) you'll want to match the version as well:
sudo apt-get install gcc-4.8-multilib g++-4.8-multilib
Did you try adding -I/usr/include/c++/4.4/i486-linux-gnu or -I/usr/include/c++/4.4/i686-linux-gnu?