This reverts commit 8c80bd08b7
("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`):
https://github.com/NixOS/nixpkgs/pull/210004#issuecomment-1407162693
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`.
After https://github.com/NixOS/nixpkgs/pull/210004 `usbmuxd2` started
failing to build as:
usbmuxd2-unstable> .../ld: cannot find -lstdc++fs: No such file or directory
usbmuxd2-unstable> clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
This started happening because #210004 exposed a long-standing bug in
`gcc` derivation: `cc.lib` is missing `libstdc++fs` library:
$ find $(nix-build --no-link -A stdenv.cc.cc.lib) | fgrep libstdc | unnix
/<<NIX>>/gcc-11.3.0-lib/lib/libstdc++fs.la
/<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.la
/<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.so.6.0.29
/<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.so
/<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.so.6
It was not moved from `cc.out` output:
$ find $(nix-build --no-link -A stdenv.cc.cc) | fgrep libstdc | unnix
/<<NIX>>/gcc-11.3.0/lib/libstdc++.a
/<<NIX>>/gcc-11.3.0/lib/libstdc++fs.a
This change adds `cc` library lookup path back to `staging-next` until
`gcc` is fixed.`
FreeBSD doesn't use LLVM's cxxabi implementation, for backwards
compatibility reasons. Software expects the libcxxrt API when
building on FreeBSD. This fixes the build of
pkgsCross.x86_64-freebsd.boost.
Trivial conflict in release notes, except that the xml/docbook parts
are horrible for (semi-)automatic conflict resolution.
Fortunately that's generated anyway.
With all libcs I'm aware of, libdl is now either empty (Glibc, musl,
uclibc, illumos), a symlink to libc or equivalent (Apple), or does not
exist (FreeBSD, NetBSD). So explicitly linking libdl now does nothing
for the former platforms, and breaks the build for the latter
platforms.
With this patch I've removed -ldl from all overridden linker flags for
all free packages in Nixpkgs. Everything still seems to build.
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
fetchPypi doesn't use python under the hood and doesn't need to be tied
to a specific version of python. Moving it to top level makes it more
consistent with other fetchers and makes code generation easier.
the output made me think that the test failed but did not fail
testBuildFailure-helloDoesNotFail> Checking /nix/store/x6403x1llpk00i59cmr96iy92mx1f7hb-hello-2.12.1/testBuildFailure.log
testBuildFailure-helloDoesNotFail> testBuildFailure: The builder did not fail, but a failure was expected!
A call to getAllOutputNames was added as part of the structuredAttrs
effort, but this script does not source `setup.sh`, so I repeat the
definition here.
Should be a bit quicker than `source setup.sh`.
Closes#16182
This improves the error message
Error: _assignFirst found no valid variant!
which occurred when the set of outputs was not sufficient to set
the various outputDev, outputBin, etc variables. Specifically, this
would mean that "out" is not among the outputs, which is valid for
a derivation.
This changes the message to something like
error: _assignFirst: could not find a non-empty variable to assign to outputDev. The following variables were all unset or empty: dev out.
If you did not define an "out" output, make sure to define all the specific required outputs: define an output for one of the unset variables.
While this isn't a full explanation of what stdenv can and can not do,
I think it's vast improvement over the 0 bits of information that it
used to provide. This at least gives a clue as to what's going on, and
even suggests a fix, although probably multiple such fixes are required
in an instance where someone starts with a no-out derivation from scratch
(and decide to persist).
The auto-patchelf python script assembles a list of
library (so=shared object) file names and their paths.
This helps speed up the discovery of
library files later when patching elf files.
As further optimization, if a symlink points to a library file,
the script uses the resolved path and file name.
However, this produces a broken list entry if the
symlink's target name doesn't match the symlink's name.
A symptom of the bug, affecting the `tsm-client` package,
is fixed in https://github.com/NixOS/nixpkgs/pull/172372 .
The commit at hand stops resolving symlinks if
the target name differs from the symlink's name.
The commit has been authored by
layus (Guillaume Maudoux <layus.on@gmail.com>)
in pull request comment
https://github.com/NixOS/nixpkgs/pull/172372#issuecomment-1194687183