cc-wrapper, clang-tools: move libcxx before cflags#169962
cc-wrapper, clang-tools: move libcxx before cflags#169962tjni wants to merge 154 commits intoNixOS:masterfrom tjni:libstd-prefix
Conversation
|
This looks safe to do if the C++ library used is libc++, as I notice in many of its headers that it can handle libc on the path, e.g, for I am not sure about other C++ standard libraries. |
|
I'll need some time to set up an x86_64 Linux box to try to reproduce the build failure in libuv. |
I set one up and couldn't reproduce the libuv build (which is actually a test) failure. I triggered a couple new builds, and they went away, so it looks flaky. I think this is ready for review, unless the hanging Darwin tests could somehow be triggered to further verify this. |
|
@Ericson2314 would you be able to either take a look or point me in a direction? I'm currently looking for next steps, whether that is to revise the approach, do more testing, come back to this later (such as after the current release window), or something else. Thank you! |
also make test output unconditional
python-dbusmock relies on bluez for it's checks. Which shouldn't be a problem, and isn't one normally. However, checkPhase contained a string substitution that was always constructed regardless of the value of doCheck (and simply not used if doCheck was false), and so bluez, which was not supposed to be a dependency, was used as and registered as one and caused a dependency cycle when trying to add pcsclite as a dependency of libfido2. The string substitution has been removed in favor of something that can remain disabled when doCheck is false.
- Release announcement: https://dev.gnupg.org/T5947 - Removed CVE-2022-34903 patch which is included in 2.3.7
With 0507725 "setup-hooks/strip.sh: run RANLIB on static archives after stripping" it should now be safe to run strip on wider range of .a files. mingw-w64 is a good example where a reference was preserved to gcc from intermediate stage. Enabling stripping by default decreases `pkgsCross.mingw32` closure for 20%: Before: $ nix path-info -rsSh $(nix-build -A pkgsCross.mingw32.stdenv) ... /nix/store/qzhkidff0wxhqf2gi97ng6qismzvpnbp-stdenv-linux 43.6K 1.0G After: $ nix path-info -rsSh $(nix-build -A pkgsCross.mingw32.stdenv) ... /nix/store/fj4dv1n3sa3jgcb1j3nwn6njsf943n48-stdenv-linux 43.6K 792.4M
gnupg: 2.3.6 -> 2.3.7
|
I am going to close this PR in favor of a new one that tracks |
|
The replacement PR for this is #185569. |
|
For what it's worth @tjni, you can change the base branch for a PR without having to make a new one. Just so you know for the future :) |
Description of changes
This fixes #163052, where the xcbuild build fails on Darwin after
libSystem is added as a dependency of IOSurface.
Even though cc-wrapper adds libc to NIX_CFLAGS_COMPILE using the
-idirafter flag, ensuring it comes after the C++ standard library,
and the clang-tools wrapper respects -idirafter when it parses
arguments, it appears that "-isystem libc" can make its way onto
NIX_CFLAGS_COMPILE too.
In honesty, I have not been able to figure out how NIX_CFLAGS_COMPILE
inherits "-isystem libSystem", or how it influences the xcbuild build
itself. However:
This change does appear to fix the xcbuild build.
If NIX_CFLAGS_COMPILE does have "-isystem libSystem" added to it
somehow, it should probably come after the C++ standard library.
Notes
I am not fully happy with my level of understanding of how this problem manifests, which also means I'm not certain that this is the right way to fix this issue. But I have reached a point where I can't do more without guidance. (For instance, the successful build of xcbuild took an hour and a half on my computer, because I changed cc-wrapper, and I can't learn by trial and error with that sort of build time.) I'd be happy to take advice though.
If this approach looks sound, I then both want to trigger more builds to check what effect this has (how?) and wary of doing so because it might use up a lot of build infrastructure. What should I do?
Things done
sandbox = trueset 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.shto update generated release notes