-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build-support/cc-wrapper: revert "pass in non-existent --sysroot= to … #213185
Conversation
7473168
to
b3ef181
Compare
…untangle from libc" This reverts commit 8c80bd0 ("build-support/cc-wrapper: pass in non-existent --sysroot= to untangle from libc"). This change was good in spirit: we caught a few genuine problems with `scons` based packages (`godot`, `fluxus`) and unexpected `-idirafter` includes in various boot loadres (`ipxe`, wimboot`): NixOS#210004 (comment) Unfortunately `--sysroot=` also has a negative impact on libary search order for DT_NEEDED libraries and RUNPATHs of linked libraries. This unexpectedly broke `dmd`, `d-seams`, `llvmPackages_rocm.compiler-rt`). An interesting case of unexpected breakage is `usbmuxd2` where the bug exposed incomplete library move on `libstdc++fs` in `gcc`. The library breakage is very non-intuitive (on top of already unusual layout of `cc-wrapper` driver). Let's revert this change for now. Once it lands we can undo `--sysroot=/` workarounds merged for `staging-next`.
b3ef181
to
3f9fe5c
Compare
Validated that |
Did anybody review this PR before it was merged? |
|
Do you also need to revert ? If not, the comment it added needs to be updated. It is no longer correct. |
nixpkgs/pkgs/development/compilers/gcc/builder.sh Lines 207 to 208 in 585af06
|
I would say the change does not hurt if we are to allow any other value or |
Proposed full revert as #213929 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/libssl-so-3-not-found-when-compiling-rust/25213/2 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/so-dependencies-of-gd-library-have-undefined-reference-errors/25800/4 |
Remove a patch to decrease the divergence from upstream. Motivation is a continuation of trying to reduce the number of clang builds floating around. Wrapper builds are cheap, compiler builds are not. It's expected that this patch can be removed at some point and replaced with some other cc-wrapper logic. This will be a little bit easier with the logic already in the cc-wrapper. Ongoing discussion in NixOS#191152. It would be nice to drop this but we think it's probably needed at least on systems where /usr/include may be available to prevent the possibility of picking up unwanted includes. One potential method for eliminating nostdlibinc in the future is by providing a non-existent -sysroot but that was reverted in NixOS#213185, and remains a can of worms. Signed-off-by: Peter Waller <[email protected]>
Remove a patch to decrease the divergence from upstream. Motivation is a continuation of trying to reduce the number of clang builds floating around. Wrapper builds are cheap, compiler builds are not. It's expected that this patch can be removed at some point and replaced with some other cc-wrapper logic. This will be a little bit easier with the logic already in the cc-wrapper. Ongoing discussion in NixOS#191152. It would be nice to drop this but we think it's probably needed at least on systems where /usr/include may be available to prevent the possibility of picking up unwanted includes. One potential method for eliminating nostdlibinc in the future is by providing a non-existent -sysroot but that was reverted in NixOS#213185, and remains a can of worms. Signed-off-by: Peter Waller <[email protected]>
Remove a patch to decrease the divergence from upstream. Motivation is a continuation of trying to reduce the number of clang builds floating around. Wrapper builds are cheap, compiler builds are not. It's expected that this patch can be removed at some point and replaced with some other cc-wrapper logic. This will be a little bit easier with the logic already in the cc-wrapper. Ongoing discussion in NixOS#191152. It would be nice to drop this but we think it's probably needed at least on systems where /usr/include may be available to prevent the possibility of picking up unwanted includes. One potential method for eliminating nostdlibinc in the future is by providing a non-existent -sysroot but that was reverted in NixOS#213185, and remains a can of worms. Signed-off-by: Peter Waller <[email protected]>
Remove a patch to decrease the divergence from upstream. Motivation is a continuation of trying to reduce the number of clang builds floating around. Wrapper builds are cheap, compiler builds are not. It's expected that this patch can be removed at some point and replaced with some other cc-wrapper logic. This will be a little bit easier with the logic already in the cc-wrapper. Ongoing discussion in NixOS#191152. It would be nice to drop this but we think it's probably needed at least on systems where /usr/include may be available to prevent the possibility of picking up unwanted includes. One potential method for eliminating nostdlibinc in the future is by providing a non-existent -sysroot but that was reverted in NixOS#213185, and remains a can of worms. Signed-off-by: Peter Waller <[email protected]>
…untangle from libc"
This reverts commit 8c80bd0 ("build-support/cc-wrapper: pass in non-existent --sysroot= to untangle from libc").
This change was good in spirit: we caught a few genuine problems with
scons
based packages (godot
,fluxus
) and unexpected-idirafter
includes in various boot loadres (ipxe
, wimboot`):Unfortunately
--sysroot=
also has a negative impact on libary search order for DT_NEEDED libraries and RUNPATHs of linked libraries. This unexpectedly brokedmd
,d-seams
,llvmPackages_rocm.compiler-rt
).An interesting case of unexpected breakage is
usbmuxd2
where the bug exposed incomplete library move onlibstdc++fs
ingcc
.The library breakage is very non-intuitive (on top of already unusual layout of
cc-wrapper
driver). Let's revert this change for now.Once it lands we can undo
--sysroot=/
workarounds merged forstaging-next
.Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes