Commit Graph

2076 Commits

Author SHA1 Message Date
Vladimír Čunát
c1ef87e8d0
stdenv bootstrap tools: adjust with glibc-2.34
https://hydra.nixos.org/build/171494041
2022-04-04 19:54:28 +02:00
github-actions[bot]
fc17fe6417
Merge master into staging-next 2022-04-02 18:01:07 +00:00
7c6f434c
8188f10752
Merge pull request #166430 from alyssais/openssl-static-retry
treewide: use lib.getLib for OpenSSL libraries
2022-04-02 12:59:55 +00:00
Alyssa Ross
fd78240ac8
treewide: use lib.getLib for OpenSSL libraries
At some point, I'd like to make another attempt at
71f1f4884b ("openssl: stop static binaries referencing libs"), which
was reverted in 195c7da07d.  One problem with my previous attempt is
that I moved OpenSSL's libraries to a lib output, but many dependent
packages were hardcoding the out output as the location of the
libraries.  This patch fixes every such case I could find in the tree.
It won't have any effect immediately, but will mean these packages
will automatically use an OpenSSL lib output if it is reintroduced in
future.

This patch should cause very few rebuilds, because it shouldn't make
any change at all to most packages I'm touching.  The few rebuilds
that are introduced come from when I've changed a package builder not
to use variable names like openssl.out in scripts / substitution
patterns, which would be confusing since they don't hardcode the
output any more.

I started by making the following global replacements:

    ${pkgs.openssl.out}/lib -> ${lib.getLib pkgs.openssl}/lib
    ${openssl.out}/lib -> ${lib.getLib openssl}/lib

Then I removed the ".out" suffix when part of the argument to
lib.makeLibraryPath, since that function uses lib.getLib internally.

Then I fixed up cases where openssl was part of the -L flag to the
compiler/linker, since that unambigously is referring to libraries.

Then I manually investigated and fixed the following packages:

 - pycurl
 - citrix-workspace
 - ppp
 - wraith
 - unbound
 - gambit
 - acl2

I'm reasonably confindent in my fixes for all of them.

For acl2, since the openssl library paths are manually provided above
anyway, I don't think openssl is required separately as a build input
at all.  Removing it doesn't make a difference to the output size, the
file list, or the closure.

I've tested evaluation with the OfBorg meta checks, to protect against
introducing evaluation failures.
2022-03-30 15:10:00 +00:00
github-actions[bot]
811b90f085
Merge master into staging-next 2022-03-26 12:01:14 +00:00
Adam Joseph
13e63f67dd make-bootstrap-tools-cross: fix typo which prevents hydra eval
When implementing this reviewer request:

  https://github.com/NixOS/nixpkgs/pull/161158#discussion_r822256070

to move mips64el-unknown-linux-* from platforms.nix to examples.nix, I
neglected to update the reference in make-bootstrap-tools-cross.nix.
As a result, the hydra jobs to generate a bootstrap tarball for
mips64el are not running:

  https://hydra.nixos.org/eval/1750828?filter=mips&compare=1750620&full=#tabs-errors

This commit fixes the problem, so the hydra job can run.  Once it
does, I will submit a PR adding the trusted bootstrap tarball hash to
pkgs/stdenv/linux/bootstrap-files/.

Co-authored-by: sterni <sternenseemann@systemli.org>
2022-03-26 12:03:00 +01:00
Vladimír Čunát
0a8b4eddd2
Merge branch 'master' into staging-next 2022-03-25 10:16:56 +01:00
Artturin
33cce15e42 treewide: remove meta.repositories
there's no documentation for meta.repositories and its not widely used
2022-03-24 23:56:14 +02:00
github-actions[bot]
691557fc47
Merge staging-next into staging 2022-03-18 00:03:09 +00:00
Adam Joseph
12371a51e6 lib/systems: add mips64el definitions
MIPS has a large space of {architecture,abi,endianness}; this commit
adds all of them to lib/systems/platforms.nix so we can be done with
it.

Currently lib/systems/inspect.nix has a single "isMips" predicate,
which is a bit ambiguous now that we will have both mips32 and mips64
support, with the latter having two ABIs.  Let's add four new
predicates (isMips32, isMips64, isMips64n32, and isMips64n64) and
treat the now-ambiguous isMips as deprecated in favor of the
more-specific predicates.  These predicates are used mainly for
enabling/disabling target-specific workarounds, and it is extremely
rare that a platform-specific workaround is needed, and both mips32
and mips64 need exactly the same workaround.

The separate predicates (isMips64n32 and isMips64n64) for ABI
distinctions are, unfortunately, useful.  Boost's user-scheduled
threading (used by nix) does does not currently supports mips64n32,
which is a very desirable ABI on routers since they rarely have
more than 2**32 bytes of DRAM.
2022-03-10 20:30:16 -08:00
github-actions[bot]
c15f51235d
Merge staging-next into staging 2022-03-07 12:02:15 +00:00
Maximilian Bosch
856376bb20
Merge pull request #162197 from trofi/fix-gcc-wrapper-in-stdenv
pkgs/stdenv/linux/default.nix: restore dropped gcc-wrapper
2022-03-01 18:35:49 +01:00
Sandro
800e9e9994
Merge pull request #161079 from SuperSandro2000/exit-handler 2022-03-01 14:41:56 +01:00
Sergei Trofimovich
32c30ae43c pkgs/stdenv/linux/default.nix: restore dropped gcc-wrapper
7459a40 `stdenv-bootstrap: force using new libc from stage2` overrode
`gcc-wrapper`. 91fa7657 `stdenv: revert gcc hack` dod not restore the initial
value.

As a result attempt to build glibc-2.35 fails early on perl as:

   ld: cannot find -lnsl: No such file or directory
   collect2: error: ld returned 1 exit status
   I can't compile the test program.
   (The supplied flags or libraries might be incorrect.)

The change restores `gcc-wrapper` as it was before 7459a40.
2022-02-28 09:42:20 +00:00
Maximilian Bosch
91fa7657d1
stdenv: revert gcc hack
See https://github.com/NixOS/nixpkgs/pull/133431#discussion_r805339569
2022-02-27 15:10:58 +01:00
Maximilian Bosch
7459a4021c
stdenv-bootstrap: force using new libc from stage2
This fix is needed to work around linker-errors such as

    undefined reference to `__libc_csu_fini'

which I got in almost every derivation which is part of stage2. The
reasoning behind this is that the startup-code was simplified[1] and
thus `__libc_csu_fini` doesn't exist anymore.

A workable solution is to use a newer libc which properly links in
stage3. And actually this seems expected given the rationale for stage3:

    # Construct a third stdenv identical to the 2nd, except that this
    # one uses the rebuilt Glibc from stage2.  It still uses the recent
    # binutils and rest of the bootstrap tools, including GCC.

So this patch basically overrides the libraries inside `gcc-unwrapped` -
which is basically the bootstrap tools and thus also contains the libc
used in stage3 - with the shared objects from the freshly built libc
from stage2.

[1] https://sourceware.org/pipermail/libc-alpha/2021-March/123079.html
2022-02-27 10:25:33 +01:00
Sandro Jäckel
b7da6c7da7
stdenv, dep-licenses.sh: do not skip handling of other exit traps
See https://github.com/akinomyoga/ble.sh/issues/179
2022-02-20 16:27:24 +01:00
Naïm Favier
1ffdf02435
stdenv/check-meta: remove onlyLicenses check 2022-02-17 13:09:24 +01:00
github-actions[bot]
335510eb84
Merge master into staging-next 2022-02-08 00:01:49 +00:00
zowoq
f5227f0643 bootstrap-tools: disable iconv for the hello test 2022-02-08 08:57:11 +10:00
Dmitry Kalinkin
3087088c41
Merge branch 'staging-next' into staging
Conflicts:
	pkgs/top-level/aliases.nix
	pkgs/top-level/python-aliases.nix
2022-02-01 21:37:39 -05:00
matthewcroughan
7bea56b425 stdenv/check-meta: add note for Flake usage
Flake users that use a command like `nix build nixpkgs#hello` on a
broken/insecure package will not be able to use an environment variable
to override that behavior, unless they pass `--impure` to the command.

Co-authored-by: pkharvey <kayharvey@protonmail.com>
2022-02-01 13:23:46 -05:00
github-actions[bot]
ce60c22080
Merge staging-next into staging 2022-01-30 06:01:52 +00:00
matthewcroughan
b0c0e0d7eb stdenv: introduce withCFlags
Adds an easy method of appending compiler flags to your stdenv via a
list.

Co-authored-by: tomberek <tomberek@users.noreply.github.com>
Co-authored-by: Gytis Ivaskevicius <gytis02.21@gmail.com>
Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2022-01-29 21:23:12 -05:00
Jan Tojnar
2da5ce4ab3 Merge branch 'staging-next' into staging
; Conflicts:
;	pkgs/development/python-modules/fakeredis/default.nix
2022-01-28 14:05:11 +01:00
Sandro
27cccd4e49
Merge pull request #151363 from Stunkymonkey/doc-updateWalker 2022-01-27 14:06:36 +01:00
Felix Buehler
59c55f4558 update-walker: remove because unused 2022-01-26 21:46:59 +01:00
Sandro Jäckel
24880b690b stdenv: fix shellcheck complaining about things not being posix compliant 2022-01-23 03:50:23 +01:00
Sandro Jäckel
37fdba0b4f stdenv: restore bash options -e/-u to the values they where before
Source https://github.com/akinomyoga/ble.sh/issues/169#issuecomment-1019049032

Author: akinomyoga
2022-01-23 03:50:09 +01:00
Dmitry Kalinkin
7673650020
stdenv/darwin: fix for curl with zstd and idn2
The `curlMinimal` is to be used throughout the early bootstrap
stages. The final stage will allow the new references of the `curl`.

Fixes: 29526bc2 ('curl: IDN support requires libidn2 package')
2022-01-13 19:45:30 -05:00
John Ericson
baf290023c
Merge pull request #153790 from sternenseemann/cross-bootstrap-logic
Cross bootstrapping logic fixes benefitting llvmPackages
2022-01-08 12:39:30 -08:00
sternenseemann
766f5ffb76 llvmPackages_*: respect cc for target when choosing C++ flavour
llvmPackages_*.clang should check the default compiler for the package
set it is targeting (targetPackages.stdenv.cc) instead of the compiler
that has been used to build it (stdenv.cc) in order to get some sense of
whether to use libc++ or libstdc++.

Since we are now inspecting targetPackages in the llvmPackages.clang
attribute, we need to avoid using it in the cross stdenv — which just
forces us to explicitly request libcxxClang for darwin instead of
relying on the clang attribute to pick it for us.

We also need to do something similar for targetPackages.stdenv.cc: Here
the llvmPackages.clang logic would work as we want (inspect
targetPackages.stdenv.cc and if it doesn't exist, make the choice based
on stdenv.cc), but it gets locked in a cycle with the previous package.
We can easily break this, however: We know that the previous set had
clang and the next one doesn't exist, so we'd choose libcxxClang any day
of the week.
2022-01-07 14:42:41 +01:00
Vladimír Čunát
0b7de2ab41
Merge #151399: stdenv: update aarch64 bootstrap-files
...into staging
2022-01-04 20:08:39 +01:00
Naïm Favier
f2065d81ad stdenv/generic: introduce shellDryRun
Add `shellDryRun` to the generic stdenv and substitute it for uses of
`${stdenv.shell} -n`. The point of this layer of abstraction is to add
the flag `-O extglob`, which resolves #126344 in a more direct way.
2021-12-27 20:30:01 -05:00
github-actions[bot]
e38de71da8
Merge master into staging-next 2021-12-25 00:01:28 +00:00
rembo10
eefebccc12 cmake make-derivation: fix hostPlatform uname release when cross compiling 2021-12-24 13:18:42 +05:30
Dmitry Kalinkin
1a9297102c
Merge branch 'master' into staging-next 2021-12-23 16:58:33 -05:00
Bernardo Meurer
ba3cc463ca
Merge pull request #147942 from oxalica/test/riscv-bootstrap-tools
stdenv: bootstrap riscv64 (Step 2)
2021-12-23 21:40:31 +00:00
David Guibert
8e7acfc587 aarch64: update bootstrap-files
fixes #112086

Fetch bootstrap files built by Hydra and re-add them as FODs to skip
currently dangling URLs. They are already available on
https://cache.nixos.org

https://hydra.nixos.org/job/nixpkgs/trunk/stdenvBootstrapTools.aarch64-linux.dist ->
https://hydra.nixos.org/build/160330465#tabs-buildinputs

These commands have been run to get the output hashes as FODs:

nix store add-file --name bootstrap-tools.tar.xz  $(nix-store -r /nix/store/9y4qnwflnxkjrqnfbzhsjv6zq2r0m48z-stdenv-bootstrap-tools --option binary-caches https://cache.nixos.org)/on-server/bootstrap-tools.tar.xz
nix store add-path --name busybox                 $(nix-store -r /nix/store/9y4qnwflnxkjrqnfbzhsjv6zq2r0m48z-stdenv-bootstrap-tools --option binary-caches https://cache.nixos.org)/on-server/busybox
2021-12-20 10:53:19 +01:00
github-actions[bot]
209e8d0932
Merge master into staging-next 2021-12-11 00:01:48 +00:00
Guillaume Girol
4a8f9970e2
Merge pull request #147544 from cab404/fix-stdenv-override
stdenv: move overriden stdenv in closure
2021-12-10 20:29:30 +00:00
github-actions[bot]
f11307e4b2
Merge staging-next into staging 2021-11-30 00:02:29 +00:00
oxalica
a5851f18c5
stdenv: add bootstrap files for riscv64
Bootstrap files are from
https://hydra.nixos.org/build/159891432
and
https://hydra.nixos.org/build/159891436
2021-11-30 05:03:30 +08:00
Vladimir Serov
523c701c0b
stdenv: move overriden stdenv in closure
Before that, base stdenv passed non-makeOverridable version of itself
inside. This cause it to be lost on package-name.stdenv.
2021-11-27 01:23:32 +03:00
oxalica
8cf96b9426
stdenv: patch autoconf script for riscv in stage 2 2021-11-26 00:32:33 +08:00
oxalica
fc3ea54fb3
make-bootstrap-tools: produce libatomic on riscv platform 2021-11-26 00:32:33 +08:00
toonn
5d23e617ec stdenv: Pass standalone argument for libcxxabi 2021-11-24 15:17:13 -08:00
toonn
63a3ead084 stdenv: Darwin no longer needs 10.11 workaround
Co-authored-by: happysalada <raphael@megzari.com>
2021-11-24 15:17:13 -08:00
toonn
77fc5f8c14 bootstrap-tools: Introduce getLib for lib outputs
Co-authored-by: sternenseemann <sternenseemann@systemli.org>
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2021-11-24 15:17:13 -08:00
toonn
cc767e1d05 darwin.stdenv: Update to LLVM 11 and clang 11.1.0 2021-11-24 15:17:13 -08:00