Running `bootstrap-prefix.sh` on NixOS errors in stage2 building gcc with the error: "cc1: error: no include path in which to search for stdc-predef.h". This is how GCC was configured: https://pastebin.com/yAnHj840 Last 100 lines from log: https://pastebin.com/UHUBeuXh As noted on IRC the problem is: "The directory that should contain system headers does not exist: /usr/include" Which indeed does not exist on a NixOS host system. For reference, this is the Nix derivation (recipe) for building gcc on NixOS: https://github.com/NixOS/nixpkgs/blob/a0dbe47318bbab7559ffbfa7c4872a517833409f/pkgs/development/compilers/gcc/10/default.nix Maybe related: https://bugs.gentoo.org/681742
Thanks a lot! Could I bother you to compress the logs and attach them to the bug for posterity?
> Thanks a lot! Could I bother you to compress the logs and attach them to the bug for posterity? Sure, what is the preferred/standard compression for this bug tracker?
Created attachment 760190 [details] Configuration of gcc
Created attachment 760191 [details] Last 90 lines of error log
(In reply to fabio.leimgruber from comment #2) > > Thanks a lot! Could I bother you to compress the logs and attach them to the bug for posterity? > > Sure, what is the preferred/standard compression for this bug tracker? I usually do bzip2 but anything "normal" is fine!
> I usually do bzip2 but anything "normal" is fine! Ok, added with `xz` as described in https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket.
I understand this might be quite low priority, but I would be interested in assisting and getting into dev and bug fixing workflows on Gentoo. I don't know how soon others with a NixOS system can test themselves, so in the meantime I could support with further debugging and testing at least to zone in on the root cause? In case there is interest, and for a deeper look, you can also reach me via mail directly.
sounds like this would need a setup like on macOS, where the whole system root lives in a different place than /
(In reply to Fabian Groffen from comment #8) > sounds like this would need a setup like on macOS, where the whole system > root lives in a different place than / Right. We currently do: $ grep -rsin "with-native-system-header-dir" ~/git/prefix /home/sam/git/prefix/eclass/toolchain.eclass:1007: confgcc+=( --with-native-system-header-dir="${EPREFIX}/MacOSX.sdk/usr/include" ) We want some sort of equivalent for nix, I guess. I'm not sure how we discover the right path though. (In reply to Fabian Leimgruber from comment #7) > I understand this might be quite low priority, but I would be interested in > assisting and getting into dev and bug fixing workflows on Gentoo. I don't > know how soon others with a NixOS system can test themselves, so in the > meantime I could support with further debugging and testing at least to zone > in on the root cause? In case there is interest, and for a deeper look, you > can also reach me via mail directly. That'd be great! I think the best thing to do for now is play with the above ^ / what grobian suggests. You may also need to copy some of the SDK piping within bootstrap-prefix.sh that we do for macOS.
step one is how do we figure out we're on NixOS step two is how do we figure out where the system headers/libs are