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
Answer from anthony sottile on Stack Overflow
🌐
Arduino Forum
forum.arduino.cc › projects › programming
bits/c++config.h: No such file or directory. Error compiling NodeMcu in arduino - Programming - Arduino Forum
November 6, 2018 - I am having the following problem while compiling and uploading any code in NODEMCU from my Arduino ide. I have tried a simple blink led code. The error message is described below. I have earlier programmed Arduino UNO f…
Discussions

Fatal error: bits/c++config.h: No such file or directory
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 : Arduino:1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board:"AI Thinker ... More on forum.arduino.cc
🌐 forum.arduino.cc
0
0
November 23, 2023
Fatal error: bits/c++config.h: No such file or directory ESP32 CAM
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "AI Thinker ESP32-CAM, 240MHz (WiFi/BT), QIO, 80MHz" C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.Ar... More on forum.arduino.cc
🌐 forum.arduino.cc
0
0
September 30, 2022
fatal error: bits/c++config.h: No such file or directory
Board ESP32C3 Dev Module Device Description I think this is not related to the device, but rather an environmental issue Hardware Configuration none Version latest master (checkout manually) IDE Na... More on github.com
🌐 github.com
5
May 19, 2024
C++config.h:511:10: fatal error: bits\cpu_defines.h: No such file or directory
Hi, I have bought an Arduino Nano ESP32. I unpacked the IDE 1.8.19.zip, created a portable folder and installed the ESP32 board package. So far everything is standard. I compile an empty sketch and get In file included from c:\arduino ide portable\nanoesp32\arduino-1.8.19\portable\packages... More on forum.arduino.cc
🌐 forum.arduino.cc
1
0
December 7, 2023
🌐
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.
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Fatal error: bits/c++config.h: No such file or directory - Programming - Arduino Forum
November 23, 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 : …
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Fatal error: bits/c++config.h: No such file or directory ESP32 CAM - Programming - Arduino Forum
September 30, 2022 - Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "AI Thinker ESP32-CAM, 240MHz (WiFi/BT), QIO, 80MHz" C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.Ar...
🌐
GitHub
github.com › espressif › arduino-esp32 › issues › 9654
fatal error: bits/c++config.h: No such file or directory · Issue #9654 · espressif/arduino-esp32
May 19, 2024 - \appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory #include <bits/c++config.h> ^~~~~~~~~~~~~~~~~~ compilation terminated.
Published   May 19, 2024
Author   Song-aff
🌐
Adafruit
forums.adafruit.com › forums index › arduino › arduino
bits/c++config.h: No such file or directory. Error compiling - adafruit industries
July 30, 2020 - My problem is that when I try to ...gs\packages\adafruit\tools\arm-none-eabi-gcc\9-2019q4\arm-none-eabi\include\c++\9.2.1\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory 41 | #include <bits/c++config.h> | ^~~~~~~~~~~~~~~~~~ compilation terminat...
Find elsewhere
🌐
OpenGenus
iq.opengenus.org › bits-c-config-h-no-such-file-or-directory
[Fixed] fatal error: bits/c++config.h: No such file or directory
November 1, 2022 - With this article at OpenGenus, we have resolved the error "fatal error: bits/c++config.h: No such file or directory".
🌐
GitHub
github.com › siemens › meta-iot2000 › issues › 18
build example build error - bits/c++config.h: No such file or directory · Issue #18 · siemens/meta-iot2000
April 11, 2017 - | In file included from ../deps/v8/src/base/logging.h:8:0, | from ../deps/v8/src/base/division-by-constant.cc:9: | /usr/include/c++/5/cstring:41:28: fatal error: bits/c++config.h: No such file or directory | compilation terminated.
Author   jancumps
🌐
GNU
gcc.gnu.org › legacy-ml › gcc-help › 2013-05 › msg00161.html
Gene Smith - Re: gcc 4.8 can't find <bits/c++config.h>
To fix this I copied all files from <prefix>/arm-none-eabi/include/c++/4.8.1/arm-none-eabi/bits/ to empty directory here <prefix>/arm-none-eabi/include/bits/ Not sure if this is right or why it is needed but now file c++config.h is found and compiles succeed with 4.8.
🌐
Red Hat
bugzilla.redhat.com › show_bug.cgi
1896076 – Unable to compile anything with Clang: bits/c++config.h not found
Red Hat Bugzilla – Bug 1896076 · This site requires JavaScript to be enabled to function correctly, please enable it · Privacy Contact FAQ Legal
🌐
GitHub
github.com › xianyi › OpenBLAS › issues › 2202
Make error: bits/c++config.h: No such file or directory · Issue #2202 · OpenMathLib/OpenBLAS
August 4, 2019 - I am using anaconda's gcc_linux-64 with no multilib support. When I execute make I get .../include/c++/7.3.0/complex.h:29:10: fatal error: bits/c++config.h: No such file or directory #include which is invoked in file c...
Author   gerwang
🌐
Launchpad
answers.launchpad.net › madanalysis5 › +question › 695844
Question #695844 “Compilation problem: bits/c++config.h: No such...” : Questions : MadAnalysis 5
38:28: fatal error: bits/c++config.h: No such file or directory #include <bits/c++config.h> ^ compilation terminated. make: *** [PortabilityChe · ckup/Portabilit · yCheckup. o] Error 1 · The issue repeats if a try v1.7. However I don't have any problems with mac os, so maybe is a problem of the configuration on my liunx system.
🌐
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
🌐
Arduino Forum
forum.arduino.cc › development tools › ide 1.x
Missing bits/c++config.h file - IDE 1.x - Arduino Forum
December 14, 2021 - I am trying to compile my blink_demo sketch and upload it to my DOIT ESP32 DEVKIT V1 module. I never make it past compile. As part of the compile error messages shown below, reference is made to "programdata\matlab\sup…
🌐
Mozilla Bugzilla
bugzilla.mozilla.org › show_bug.cgi
871251 - fatal error: 'bits/c++config.h' file not found - Bugzilla
Have you done a make -f client.mk clean (not sur it helps) Have you done a new ./configure in moz-central after your upgrade? I guess it comes from configure, there is no problem on my laptop (not exactly the same config as yours) Because your error message is saying that it can't find the bits/c++config.h in your system include folders