Commit Graph

88646 Commits

Author SHA1 Message Date
Adam Joseph
0dfed0d79b
Merge pull request #247900 from amjoseph-nixpkgs/pr/stdenv/libgcc-no-more-cycles
glibcCross: use a libgcc built separately from gcc
2023-08-15 04:09:16 +00:00
happysalada
ea95c09176 nltk-data: init at unstable-2023-02-02 2023-08-15 10:51:41 +08:00
Adam Joseph
64046f0191 glibcCross: use a libgcc built separately from gcc
### Summary

This PR completely and finally solves the gcc<->glibc circular
`buildInputs` problem, for cross compilation.  The same technique
can be applied to native builds in the future.

Closes #213453

 ### Motivation

Prior to this PR, we had the following circular `buildInputs` problem:

1. gcc has glibc in its `buildInputs`

   - a compiled copy of glibc must be present before building gcc;
     if it isn't, gcc cripples itself (`inhibit_libc`) and refuses
     to build libgcc_s.so

2. glibc has libgcc_s.so in its `buildInputs`

   - glibc `dlopen()`s libgcc_s.so in order to implement POSIX
     thread cancellation.  For security reasons `glibc` requires
     that the path to `libgcc_s.so` is [hardwired] into `glibc` at
     compile time, so it's technically not a true dynamic link -- it
     just pretends to be one.

3. libgcc_s.so is built in the same derivation as gcc

   - libgcc_s.so is built as part of the gcc build process

We must cut one of these three links in the loop.

 ### Previous Attempts

Previously https://github.com/NixOS/nixpkgs/pull/238154 had
attempted to cut link (1) by building `gcc` without `glibc`, and
using the `libgcc_s` which emerges from that build.  Unfortunately
this just doesn't work.  GCC's configure script extracts quite a lot
of information from the glibc headers (which are a build artifact --
you can't just copy them out of the source tarball) and various
`./configure`-driven linking attempts.  If `glibc` isn't around at
build time you wind up with a `libgcc_s.so` that is missing various
unwinder features (see https://github.com/NixOS/nixpkgs/issues/213453
for the most problematic one).

Musl "cuts" link (2), or rather never creates it in the first place.
["Cancellation cleanup handling in musl has no relationship to C++
exceptions and unwinding... glibc implements cancellation as an
exception"](https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread-cancellation).
IMHO Musl made the smarter decision here.  It is incredibly rare to
find a codebase that uses both POSIX thread cancellation *and* C++
exceptions.  I have never seen a codebase that uses both *and*
expects them to be aware of each other, and I would be astonished if
one existed.  Glibc paid an immense cost in complexity for something
nobody has ever used.

 ### Changes Made

This PR cuts link (3): instead of building libgcc_s.so as part of
gcc, we build it separately from gcc.  Now there is a strict acyclic
graph of `buildInputs`:

```
 gccWithoutTargetLibc
 |
 +--->glibc-nolibgcc
 |    |
 |    v
 +--->libgcc
 |    |
 |    v
 +--->glibc
 |    |
 |    v
 +--->gcc
```

In other words, there's a simple linear `buildInputs` chain
`glibc-nolibgcc` `->` `libgcc` `->` `glibc` `->` `gcc` where all
four packages are compiled by (and therefore have as a
`(native)BuildInput`) `gccWithoutTargetLibc`.

`gccWithoutTargetLibc` and `glibc-nolibgcc` are strictly
bootstrapping artifacts; nothing else has them as a `buildInput` and
they shouldn't appear in the closure of any final deployment
packages.  `glibc-nolibgcc` lacks `libgcc_s.so`, so it will segfault
if you try to use it with POSIX thread cancellation.  Fortunately
all we need from it is (a) its headers (`lib.getDev`) and (b) to use
it in the `./configure` script for `libgcc`.

When translated over to the native bootstrap, `xgcc` takes the place
of `gccWithoutTargetLibc`, and the "first `glibc`" (we build two of
them) takes the place of `glibc-nolibgcc`.  At that point our native
and cross bootstrap have the same overall architecture, and it
becomes possible to merge them (at last!)

[213453]: https://github.com/NixOS/nixpkgs/issues/213453
[238154]: https://github.com/NixOS/nixpkgs/pull/238154
[hardwired]: 7553d0fe29/pkgs/development/libraries/glibc/default.nix (L69-L88)
2023-08-14 15:09:06 -07:00
Adam Joseph
fcaa5a7556 libgcc: take from gcc unless explicitly overridden 2023-08-14 15:08:27 -07:00
Adam Joseph
f445f64207 libgcc: (re)init at 12.3.0
This commit restores the pkgs/development/libraries/gcc/libgcc
package, which was deleted by commit 9818d120be.

We need to be able to build libgcc separately from gcc in order to
avoid a circular dependency.  Nixpkgs is unusual -- unlike any other
distribution, it cannot tolerate circular dependencies between
dynamically linked libraries.  Because of this, upstream is
extremely unsympathetic to the trouble that the glibc<->gcc circular
dependency causes for us; if we don't solve it ourselves it will not
be solved.
2023-08-14 15:08:27 -07:00
Maximilian Bosch
a471325eaf
Merge pull request #221318 from mweinelt/synapse-extras
nixos/matrix-synapse: Allow passing extras, discover extras from config
2023-08-14 18:43:05 +02:00
Stefan Westerfeld
14ae6da134 gst123: init at 0.4.1
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>

Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
2023-08-14 16:36:43 +00:00
Artturi
300da0a691
Merge pull request #248988 from Artturin/matchoscopes
lib.customisation.makeScope: Make `overrideScope` consistent with `makeScopeWithSplicing`
2023-08-14 18:56:30 +03:00
Artturin
b93da3f4b7 treewide: overrideScope' -> overrideScope
`lib.makeScope` `overrideScope'` has been renamed to `overrideScope`

`fd --type f | xargs sd --string-mode "overrideScope'" "overrideScope"`
2023-08-14 18:46:47 +03:00
natsukium
edb0f26c7d python310Packages.optimum: init at 1.11.1 2023-08-14 23:24:39 +08:00
chayleaf
2fb2f3994d rizin: wrapper fixes
1. Set cutterPlugins to cutter.plugins rather than rizin.plugins which
   it was set to by mistake
2. Remove Rizin binaries from Cutter wrapper, because they aren't
   actually used by Cutter and if the user needs those binaries they
   should install Rizin separately
2023-08-14 13:53:09 +00:00
figsoda
6ab8bfb3a5
Merge pull request #248607 from figsoda/cyber 2023-08-14 09:27:20 -04:00
figsoda
74c5a69597
Merge pull request #248559 from figsoda/anko 2023-08-14 09:27:13 -04:00
figsoda
87332df335
Merge pull request #248558 from figsoda/yaegi 2023-08-14 09:27:05 -04:00
Pascal Bach
1f546bd2bc
Merge pull request #247575 from lorenz/dsview-1-3-0
dsview: 1.2.2 -> 1.3.0
2023-08-14 13:31:47 +02:00
figsoda
37458514ef icebreaker: init at unstable-2023-08-13
https://github.com/jonhoo/icebreaker
2023-08-14 11:11:57 +00:00
Nick Cao
475a4bd899
Merge pull request #248561 from figsoda/cel
cel-go: init at 0.17.1
2023-08-14 00:19:07 -06:00
Emily
ff22379181
Merge pull request #248917 from LeSuisse/init-vault-ssh-plus-0.7.0
vault-ssh-plus: init at 0.7.0
2023-08-13 22:24:35 +02:00
Bernardo Meurer
70dd76d94f
Merge pull request #247475 from qowoz/nix217 2023-08-13 13:27:20 -04:00
Weijia Wang
e44351946f
Merge pull request #248914 from nevivurn/feat/financequote-1.58
perlPackages.FinanceQuote: 1.57 -> 1.58
2023-08-13 17:25:57 +02:00
Jonas Heinrich
c5f4a46036 nixos/opensnitch: Add support for EPBF process monitor
Co-authored-by: Slime90
2023-08-13 22:19:48 +08:00
Atemu
5f98e7c92b
Merge pull request #247357 from atorres1985-contrib/emacs-update
emacs: update to 29.1
2023-08-13 16:15:36 +02:00
Thomas Gerbet
70648bee6e vault-ssh-plus: init at 0.7.0
https://github.com/isometry/vault-ssh-plus
2023-08-13 15:34:11 +02:00
Weijia Wang
51d9ac9d9b
Merge pull request #247658 from Aleksanaa/fm
fm: init at unstable-2023-07-25
2023-08-13 15:29:47 +02:00
figsoda
9186d59d26 cel-go: init at 0.17.1
https://github.com/google/cel-go
2023-08-13 09:23:32 -04:00
Yongun Seong
59dc8ca70e
perlPackages.FinanceQuote: 1.57 -> 1.58
Diff: https://github.com/finance-quote/finance-quote/compare/v1.57...v1.58
2023-08-13 21:59:29 +09:00
aleksana
3907af8387 fm: init at unstable-2023-07-25 2023-08-13 14:34:31 +02:00
Azat Bahawi
0910b6c1c9
Merge pull request #246555 from azahi/qzdl
qzdl: init at unstable-2023-04-04
2023-08-13 14:33:49 +03:00
Adam Stephens
d8b50ae319
sabnbzd: 3.7.2 -> 4.0.3 (#248411)
* sabctools: init at 7.0.2

* sabnbzd: 3.7.2 -> 4.0.3
2023-08-13 13:21:29 +02:00
Robert Scott
e5615b6ce8
Merge pull request #245036 from risicle/ris-clap-init
clap: init at 1.1.8
2023-08-13 11:13:28 +01:00
Nick Cao
2c5267fdd1
Merge pull request #248587 from baloo/baloo/certdump/fixup-2023-08-11
certdump: fixup review comments
2023-08-13 00:39:12 -06:00
Nick Cao
44eabf1f1d
Merge pull request #248424 from donovanglover/gtk4-layer-shell
gtk4-layer-shell: init at 1.0.1
2023-08-13 00:26:02 -06:00
Nick Cao
e197ab20f3
Merge pull request #248005 from matthiasbeyer/update-grantlee
grantlee: 0.5.1 -> 5.2.0
2023-08-13 00:07:46 -06:00
Nick Cao
919c0e4550
Merge pull request #248001 from matthiasbeyer/update-wt
wt: qt4 -> qt5
2023-08-13 00:04:44 -06:00
Colin
1cce306495 alsa-project: expose the scope as a top-level package to support overrides
this enables overrides of the following form:
```
pkgs.extend (_self: super: {
  alsa-project = super.alsa-project.overrideScope' (_alsaSelf: alsaSuper: {
    alsa-ucm-conf = alsaSuper.alsa-ucm-conf.overrideAttrs (_: {
      src = ...
    });
  });
)
```
2023-08-13 03:26:01 +00:00
figsoda
5f45086e20
Merge pull request #248602 from figsoda/pw 2023-08-12 20:55:27 -04:00
OTABI Tomoya
9aa5a78e71
Merge pull request #248524 from Aleksanaa/pokeget-rs
pokeget-rs: init at 1.2.0
2023-08-13 08:57:35 +09:00
Weijia Wang
31a86dc603
Merge pull request #248014 from tjni/amazon-kclpy
python310Packages.amazon-kclpy: rename from amazon_kclpy
2023-08-12 21:01:24 +02:00
Theodore Ni
60200a6183
python310Packages.amazon-kclpy: rename from amazon_kclpy 2023-08-12 11:08:06 -07:00
hacker1024
dfe2f4cd0f
nvidia-system-monitor-qt: init at 1.5 (#202844)
* maintainers: add hacker1024

* nvidia-system-monitor-qt: init at 1.5
2023-08-12 17:55:08 +02:00
Matthieu Coudron
9679fa969c
Merge pull request #246058 from antonmosich/qcal 2023-08-12 16:19:20 +02:00
Emily
9f039b93af
Merge pull request #248513 from OPNA2608/init/nuked-md
nuked-md: init at 1.2
2023-08-12 13:57:59 +02:00
Emily
7514c56c03
Merge pull request #222176 from SuperSamus/caffeine-ng
caffeine-ng: 4.0.2 -> 4.2.0
2023-08-12 13:53:55 +02:00
Emily
69655f52ef
Merge pull request #247536 from sund3RRR/conjure-init
conjure: init at 0.1.2
2023-08-12 13:21:08 +02:00
OTABI Tomoya
41d65e418b
Merge pull request #248562 from figsoda/gpython
gpython: init at 0.2.0
2023-08-12 09:56:04 +09:00
OTABI Tomoya
efc9780007
Merge pull request #247421 from codifryed/dataclass-wizard-0.22.2
dataclass-wizard: init at 0.22.2
2023-08-12 09:45:38 +09:00
figsoda
09d7be2f72 pwvucontrol: init at 0.2
https://github.com/saivert/pwvucontrol
2023-08-11 20:44:53 -04:00
OTABI Tomoya
6e55c224b3
Merge pull request #246382 from Arcayr/mitm6
mitm6: init at 0.3.0
2023-08-12 09:43:49 +09:00
figsoda
0cc75a5ec7 cyber: init at unstable-2023-08-11
https://github.com/fubark/cyber
2023-08-11 19:26:12 -04:00
Arthur Gautier
438d05615d certdump: fixup review comments
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2023-08-11 20:58:50 +00:00