Hey, another new user/dev question— I have a package which is failing to build and I’m struggling to recreate the failure using the nix develop
environment as I expected to be able to do. I end up with errors like this:
make[2]: *** [CMakeFiles/cpr_slam_utils.dir/build.make:108: CMakeFiles/cpr_slam_utils.dir/src/incremental_trigger.cpp.o] Error 1
In file included from /nix/store/h3f8rn6wwanph9m3rc1gl0lldbr57w3l-gcc-10.3.0/include/c++/10.3.0/cstdio:42,
from /nix/store/h3f8rn6wwanph9m3rc1gl0lldbr57w3l-gcc-10.3.0/include/c++/10.3.0/ext/string_conversions.h:43,
from /nix/store/h3f8rn6wwanph9m3rc1gl0lldbr57w3l-gcc-10.3.0/include/c++/10.3.0/bits/basic_string.h:6545,
from /nix/store/h3f8rn6wwanph9m3rc1gl0lldbr57w3l-gcc-10.3.0/include/c++/10.3.0/string:55,
from /nix/store/rgf3j13hnkl6lj5nvq3vnm5xfmbm82xl-cpr_slam_msgs/include/cpr_slam_msgs/Graph.h:9,
from /home/administrator/slam_utils_ws/src/cpr_slam_utils/include/cpr_slam_utils/graph.h:15,
from /home/administrator/slam_utils_ws/src/cpr_slam_utils/src/graph.cpp:12:
/usr/include/stdio.h:781:10: fatal error: bits/sys_errlist.h: No such file or directory
781 | #include <bits/sys_errlist.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
From what I can tell here, it’s using the correct GCC from Nix and some of the correct compiler-supplied headers, but it’s leaking in /usr/include/stdio.h
from my outer system (Ubuntu). My impression was that taking care of this kind of thing was part of gcc-wrapper
— is there something additional that I need to do here?
If it’s relevant, I do have two different glib versions in my PATH in this environment— I have bin and dev from Disregard this, I didn’t see that it’s glib vs glibc!glib-2.68.2
, and bin from glibc-2.32-46
. I’m working to understand that as a separate matter, but I don’t think it’s directly relevant here since doing nix build
on this installable fails at a much later point when built in proper isolation.