nmos-cpp: fatal error: stdlib.h: No such file or directory #include_next
Hello Group,
I’ve been successful in compiling for the Linux desktop (Debian) without issues. However, when I try to compile for the arm, I get a strange error (below) and want to know if anyone has seen this. Hoping that this may be an easy fix.
- OS Built with buildroot
- using uClibc (also tried glibc)
- gcc version /8.4.0
Error Output
[ 52%] Built target json_schema_validator_static
Scanning dependencies of target mdns_static
[ 52%] Building CXX object libs-ext/nmos-cpp/Development/CMakeFiles/mdns_static.dir/mdns/core.cpp.o
In file included from /home/monte/Source/nmos-dev/os/nitrogen7/buildroot/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/boost/config/platform/linux.hpp:15,
from /home/monte/Source/nmos-dev/os/nitrogen7/buildroot/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/boost/config.hpp:57,
from /home/monte/Source/nmos-dev/os/nitrogen7/buildroot/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/boost/algorithm/string/config.hpp:14,
from /home/monte/Source/nmos-dev/os/nitrogen7/buildroot/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/boost/algorithm/string/predicate.hpp:14,
from /home/monte/Source/nmos-dev/software/source/libs-ext/nmos-cpp/Development/mdns/core.h:5,
from /home/monte/Source/nmos-dev/software/source/libs-ext/nmos-cpp/Development/mdns/core.cpp:1:
/home/monte/Source/nmos-dev/os/nitrogen7/buildroot/output/host/arm-buildroot-linux-uclibcgnueabihf/include/c++/8.4.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^~~~~~~~~~
Thanks for the help
TIA
Monte
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 20 (10 by maintainers)
hi I had this problem too while compiling for the arm. and finally i solved it by this cmake variable:
-DCMAKE_NO_SYSTEM_FROM_IMPORTED=1
(however it was okay without this cmake variable too while building by my yocto recipe file)
If you run cmake with
then the actual compile line will be shown and this might give a hint as to what is going on.
Looks to me like the
-isystem
is the problem. See here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129