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:

  1. Install 32-bit headers and libraries. Here's how you'd do this on Ubuntu.

    Run this command:

    sudo apt-get install gcc-multilib
    
  2. Compile 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, then make clean, then make

    However, 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.)

Answer from Nick ODell on Stack Overflow
🌐
GitHub
github.com › Zilliqa › zq1 › issues › 2752
[BUG] Can't install, fatal error: bits/signum.h: No such file or directory leading to gmake: *** [Makefile...all] Error 2 · Issue #2752 · Zilliqa/zq1
November 15, 2021 - Consolidate compiler generated dependencies of target test-libmongoc /home/ryanl/Desktop/Applications/Zilliqa/Zilliqa/src/depends/mongo-c-driver/src/libmongoc/tests/test-mongoc-cache.c:24:10: fatal error: bits/signum.h: No such file or directory 24 | #include <bits/signum.h> | ^~~~~~~~~~~~~~~ compilation terminated.
Author   ghost
Top answer
1 of 3
164

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:

  1. Install 32-bit headers and libraries. Here's how you'd do this on Ubuntu.

    Run this command:

    sudo apt-get install gcc-multilib
    
  2. Compile 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, then make clean, then make

    However, 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.)

2 of 3
19

Below is one way to debug and fix this issue. Since most linux installations differ in one way or another, YMMV.

  1. 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.

Discussions

qt - bits/c++config.h no such file or directory - Stack Overflow
I'm trying to compile my code including iostream lib on ubuntu 14.04, using qt creator, but when I execute it I got this error message: /usr/include/c++/4.8/iostream:38: error: bits/c++config.h: N... More on stackoverflow.com
🌐 stackoverflow.com
May 15, 2019
C/C++ problem with bits/sys_errlist.h not found
I’m a C++ developer but a Nix newb. I’m trying to define a shell.nix that I can use for building a variety of C and C++ projects with autotools. I get an error on the first file compiled: g++ -std=c++17 -DHAVE_CONFIG_H -I. -I./include -I/usr/include -I/nix/store/89f1my7szprsn9pdwr2h2ms... More on discourse.nixos.org
🌐 discourse.nixos.org
0
0
February 17, 2021
I have an error with #include <bits/stdc++h.> puts "No such file or directory"
I have an error with #include puts "No such file or directory" #include using namespace std; int main(){ int numero = 0, divisor = 0, cociente = 0, More on stackoverflow.com
🌐 stackoverflow.com
Make fails bits/c++config.h no such file or directory
Probably related to #23 OS/device including version: Distributor ID: Ubuntu Description: Ubuntu 20.04.1 LTS Release: 20.04 Codename: focal Issue description: After installing gcc-multilib: ./linux.... More on github.com
🌐 github.com
1
December 16, 2020
🌐
Openvz
lists.openvz.org › pipermail › criu › 2017-September › 039542.html
[CRIU] [PATCH 7/9] zdtm/autofs: don't include bits/signum.h
September 30, 2017 - From: Andrei Vagin <avagin at virtuozzo.com> It isn't required and it is absant on alpine autofs.c:9:25: fatal error: bits/signum.h: No such file or directory Signed-off-by: Andrei Vagin <avagin at virtuozzo.com> --- test/zdtm/static/autofs.c | 2 -- 1 file changed, 2 deletions(-) diff --git ...
🌐
Gentoo Forums
forums.gentoo.org › viewtopic-t-1100372-start-0.html
Gentoo Forums :: View topic - Error that C compiler can't create executables
August 6, 2019 - FAQ | Search | Memberlist | Usergroups | Statistics | Profile | Log in to check your private messages | Log in | Register · Links: forums.gentoo.org | www.gentoo.org | bugs.gentoo.org | wiki.gentoo.org | forum-mods@gentoo.org
🌐
Google
android.googlesource.com › platform › prebuilts › gcc › linux-x86 › host › i686-linux-glibc2.7-4.6 › + › refs › heads › tools_r20 › sysroot › usr › include › bits › signum.h
sysroot/usr/include/bits/signum.h - platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6 - Git at Google
Sign in · android / platform / prebuilts / gcc / linux-x86 / host / i686-linux-glibc2.7-4.6 / refs/heads/tools_r20 / . / sysroot / usr / include / bits / signum.h · blob: a18ac113a43725fd95d7941a98ff65e6ba4006b3 [file] [log] [blame] [edit] · Powered by Gitiles| Privacy| Termstxt json
🌐
OldUnreal
oldunreal.com › board index › editing, scripting, modelling and mapping › uscript board
Linux C++ - OldUnreal (Engine)
In file included from ../../Engine/Inc/Engine.h:21, from xPlatForm.h:1, from xPlatForm.cpp:1: ../../Core/Inc/Core.h:375: UnCid.h: No such file or directory Depending on where you got your headers, that file might actually be called UnCId.h. Just cp UnCid.h UnCId.h and that'll fix it. ... gcc-2.95: installation problem, cannot exec `cc1plus': No such file or directory do you have g++-2.95 too?
Find elsewhere
🌐
NixOS Discourse
discourse.nixos.org › help
C/C++ problem with bits/sys_errlist.h not found - Help - NixOS Discourse
February 17, 2021 - I’m a C++ developer but a Nix newb. I’m trying to define a shell.nix that I can use for building a variety of C and C++ projects with autotools. I get an error on the first file compiled: g++ -std=c++17 -DHAVE_CONFIG_H -I. -I./include -I/usr/include -I/nix/store/89f1my7szprsn9pdwr2h2ms845sxcna9-icu4c-68.2-dev/include -DU_USING_ICU_NAMESPACE=0 -DU_CHARSET_IS_UTF8=1 -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNSTR_FROM_STRING_EXPLICIT=explicit -pthread -I/home/jon/code/make_world2/install/include -...
🌐
GitHub
github.com › lattera › glibc › blob › master › bits › signum.h
glibc/bits/signum.h at master · lattera/glibc
#include <bits/signum-generic.h> · /* This operating system does not need to override any of the generic · signal number assignments in bits/signum-generic.h, nor to add any · additional signal constants. */ · #endif /* bits/signum.h.
Author   lattera
🌐
Public-inbox
public-inbox.org › libc-alpha › fa84e084-f69b-1f42-2f70-9cc4062ea63c@linaro.org › T
[PATCH v2 01/13] signal: Add signum-{generic,arch}.h
*/ - -#endif /* bits/signum.h. */ diff --git a/signal/Makefile b/signal/Makefile index f3c19e2992..2ec3ddd74f 100644 --- a/signal/Makefile +++ b/signal/Makefile @@ -23,7 +23,7 @@ subdir := signal include ../Makeconfig headers := signal.h sys/signal.h \ - bits/signum.h bits/signum-generic.h \ + bits/signum-generic.h bits/signum-arch.h \ bits/sigcontext.h bits/sigaction.h \ bits/sigevent-consts.h bits/siginfo-consts.h \ bits/sigstack.h bits/sigthread.h bits/ss_flags.h \ diff --git a/signal/signal.h b/signal/signal.h index 40825e95ec..fa8de963f8 100644 --- a/signal/signal.h +++ b/signal/signal.h
🌐
GitHub
github.com › godotengine › godot-mono-builds › issues › 24
Make fails bits/c++config.h no such file or directory · Issue #24 · godotengine/godot-mono-builds
December 16, 2020 - Probably related to #23 OS/device including version: Distributor ID: Ubuntu Description: Ubuntu 20.04.1 LTS Release: 20.04 Codename: focal Issue description: After installing gcc-multilib: ./linux.py make --target=x86 --target=x86_64 res...
Author   timothyparez
🌐
GitHub
github.com › esp-rs › esp-idf-template › issues › 59
Build error "fatal error: bits/os_defines.h: No such file or directory" · Issue #59 · esp-rs/esp-idf-template
October 6, 2022 - Trying to build my project after a re-install of windows but I am getting this error. I then tried to build this template to test if it was a problem specifit to my project, but I got the same erro...
Author   Brad-Hesson
🌐
GNU
sourceware.org › pipermail › libc-alpha › 2020-May › 113884.html
[PATCH v2 1/5] signal: Add signum-{generic,arch}.h
May 12, 2020 - */ > - > -#endif /* bits/signum.h. */ > diff --git a/signal/Makefile b/signal/Makefile > index f3c19e2992..2ec3ddd74f 100644 > --- a/signal/Makefile > +++ b/signal/Makefile > @@ -23,7 +23,7 @@ subdir := signal > include ../Makeconfig > > headers := signal.h sys/signal.h \ > - bits/signum.h bits/signum-generic.h \ > + bits/signum-generic.h bits/signum-arch.h \ > bits/sigcontext.h bits/sigaction.h \ > bits/sigevent-consts.h bits/siginfo-consts.h \ > bits/sigstack.h bits/sigthread.h bits/ss_flags.h \ > diff --git a/signal/signal.h b/signal/signal.h > index 40825e95ec..fa8de963f8 100644 > --- a/si
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Fatal error: bits/c++config.h: No such file or directory - Programming - Arduino Forum
September 1, 2023 - So i have a project going where I am using Arduino IDE to program my ESP32-CAM but i keep running into the same error code again again and again. In TOOLS -> BOARD I use : AI THINKER ESP32-CAM. This is the error code : …
🌐
GNU
gcc.gnu.org › pipermail › gcc › 2021-January › 234652.html
Fw: Problems with compiling autogen with GCC8 or newer versions
t __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef long int __quad_t; typedef unsigned long int __u_quad_t; typedef long int __intmax_t; typedef unsigned long int __uintmax_t; # 130 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 # 131 "/usr/include/bits/types.h" 2 3 4 typedef unsigned long int
🌐
PlatformIO Community
community.platformio.org › platformio core
ESP32 not compiling on windows. bits/c++config.h: No such file or directory - PlatformIO Core - PlatformIO Community
January 19, 2021 - Hello all, I use PIO since a few month and I am far from an expert. I wrote lots of tests and a few nice projects on ESp32 and I was happy with it. I updated my windows PC to Windows 10 a few weeks ago. Reinstalled arduino IDE, VS code, PIO… Since then, my program don’t compile as the file bits/c++config.h is missing.