julien lepiller <jul...@lepiller.eu> skribis:

> I'm trying to build a software that requires gcc>=7.2. Unfortunately,
> the process crashes and ends with:
>
> /gnu/store/a4vwdk8r6p6l2mnffz4yaqlr1z6z6w3r-gcc-7.3.0/include/c++/cstdlib:75:15:
> fatal error: stdlib.h: No such file or directory.

On IRC Marius mentioned this bug report:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129#c3

Note that we use C_INCLUDE_PATH, which is equivalent to ‘-isystem’.
Quoth (gnu packages gcc):

      (native-search-paths
       ;; Use the language-specific variables rather than 'CPATH' because they
       ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
       ;; The intent is to allow headers that are in the search path to be
       ;; treated as "system headers" (headers exempt from warnings) just like
       ;; the typical /usr/include headers on an FHS system.
       (list (search-path-specification
              (variable "C_INCLUDE_PATH")
              (files '("include")))
             (search-path-specification
              (variable "CPLUS_INCLUDE_PATH")
              (files '("include")))
             (search-path-specification
              (variable "LIBRARY_PATH")
              (files '("lib" "lib64")))))

Ludo’.



Reply via email to