Skip to content

glibc: 2.27 -> 2.30 WIP - #66528

Merged
vcunat merged 60 commits into
NixOS:stagingfrom
lblasc:glibc230
Feb 5, 2020
Merged

vcunat merged 60 commits into
NixOS:stagingfrom
lblasc:glibc230

Conversation

@lblasc

@lblasc lblasc commented Aug 12, 2019 •

Copy link
Copy Markdown
Contributor
Motivation for this change

Bump to latest glibc.

Started to fix core packages, managed to build and test rustc on x86_64.

  • can someone please point me to latest bootstrap files for i686 and x86_64 on tarballs.nixos.org so I can remove my private mirror from pkgs/stdenv/linux/bootstrap-files/* ? @grahamc @Mic92
  • hydra jobset for this would be great
  • test darwin
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @edolstra

@lblasc
lblasc requested a review from FRidh as a code owner August 12, 2019 13:43
@ofborg ofborg Bot added 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: stdenv Standard environment labels Aug 12, 2019
@ofborg ofborg Bot added 6.topic: emacs Text editor 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: steam Steam game store/launcher (store.steampowered.com) 6.topic: vim Advanced text editor 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. and removed 6.topic: stdenv Standard environment labels Aug 12, 2019
@jonringer

Copy link
Copy Markdown
Contributor

You're a madman, and i support you on your journey ❤️

However, such a universal package may cause a lot more heart-ache than it's worth. (don't want you to get burnt out)

@Mic92

Mic92 commented Aug 13, 2019

Copy link
Copy Markdown
Member

cc @LnL7

@Ma27

Ma27 commented Feb 4, 2020

Copy link
Copy Markdown
Member

In any case, we need to finish tarballs.nixos.org ASAP (it would've been better weeks ago or earlier, but here we are). I originally thought that bootstraps generated from 19.09 should be enough – that's what I tested above and they still seem to work fine (re-checked x86_64 now; EDIT: also aarch64 and i686, after a while).

👍 - I talked with a few people at FOSDEM how we could improve the situation with bootstrap files (e.g. by using stuff from a binary cache by default), but this is something we should take care of after the branchoff.

Still, I can't see a real reason to avoid generating them from recent unstable channel

Same here - I actually built the aarch64 bootstrap stuff with a gcc8 since the gcc9 changes weren't on master back then, so this should be fine :)

By looking at the commits, we probably "can't" avoid changing all hashes from what's been currently built in the experimental Hydra jobset. (Though if someone told me the commits they were generated from and no build impurity changed the hashes from what's in cache.nixos.org already...)

Unfortunately I'm not sure anymore - I only built the aarch64 stuff as it was broken with glibc before :/

Any thoughts about this?
After that, I'll try "forcing" someone to upload what we've agreed on.

Overall 👍

@vcunat

vcunat commented Feb 5, 2020

Copy link
Copy Markdown
Member

Oh, I missed one bit: i686-linux. I had re-tested glibc build but the next step of building the default compiler fails :-/ https://hydra.nixos.org/job/nixpkgs/glibc-230/wine.x86_64-linux

@vcunat

vcunat commented Feb 5, 2020 •

Copy link
Copy Markdown
Member

I worked around that by enableLTO = !stdenv.isi686; which sounds acceptable to me. Interested parties can improve that later. I suspect update of bootstrapping tarballs would not be involved in this issue anyway...

OK, let's take the easier way: c5aabb0 from 19.09. This time I re-tested full stdenv bootstrap on these three platforms.

@peti: I heard you have credentials for tarballs.nixos.org – can you upload these for us?

We need to upload:

EDIT: I forgot to mention (again) that you can directly nix build /nix/store/this-path to get those below from cache.nixos.org.

Evidence

... that we're not switching to something suspicious. (Bootstrapping is sensitive; see e.g. classic "Trusting Trust".)

## It is official 19.09-included commit
git checkout c5aabb0d60
git branch --contains | grep release-19.09

## Verify that /nix/store paths match
for system in x86_64-linux i686-linux aarch64-linux; do
    cat "$(nix-build pkgs/top-level/release.nix -Q -A stdenvBootstrapTools.${system}.dist)"/nix-support/hydra-build-products
done | grep tarball 2>/dev/null
# file tarball /nix/store/21zzaia2nca8p5vpcrklrdqlj843q2wf-stdenv-bootstrap-tools/on-server/bootstrap-tools.tar.xz
# file tarball /nix/store/l1r0lyzdr2n5qqz68rwxnh71qjd5s4ay-stdenv-bootstrap-tools/on-server/bootstrap-tools.tar.xz
# file tarball /nix/store/fwrp466vixrzc63l4kvlslalfsxkjnvk-stdenv-bootstrap-tools/on-server/bootstrap-tools.tar.xz

## The optional re-upload without changing:
nix-build pkgs/stdenv/linux/bootstrap-files/aarch64.nix -A busybox
# copying path '/nix/store/y5kymk0pdj7pszxskf9xazg5825alizg-busybox' from 'https://cache.nixos.org'...
# /nix/store/y5kymk0pdj7pszxskf9xazg5825alizg-busybox

@peti

peti commented Feb 5, 2020

Copy link
Copy Markdown
Member

@peti: I heard you have credentials for tarballs.nixos.org – can you upload these for us?

I am sorry, but that seems to be a misunderstanding. I have no privileged access to tarballs.nixos.org. I don't even know who does, I'm afraid.

@vcunat

vcunat commented Feb 5, 2020

Copy link
Copy Markdown
Member

Thanks for the fast reaction. I guess I have to ping @edolstra, as I don't know about anyone else.

@vcunat

vcunat commented Feb 5, 2020

Copy link
Copy Markdown
Member

@Ma27

I talked with a few people at FOSDEM how we could improve the situation with bootstrap files (e.g. by using stuff from a binary cache by default), but this is something we should take care of after the branchoff.

There seems to be some misunderstanding. Bootstrap files are substituted from cache.nixos.org (if present); see e.g. log from busybox a couple posts above.

  • The regular Hydra job as of now doesn't produce these as separate files, so it's the same files but nested deeper in other /nix/store paths and can't be directly re-used. Still, it's not difficult to nix build $file and then nix-prefetch-url file://$file
  • Users with different location of nix store can't use the official binary cache (the hash parts are changed), so it's good to have working fixed-output fetches for them to bootstrap from. Hence tarballs.nixos.org
  • These fetches also serve as backup in case the files got garbage-collected from the cache, though I suspect in our case that's just a theoretical possibility for now.

Maybe I forgot some point. We certainly had at least one GitHub discussion about the (non-)utility of tarballs.nixos.org.

as a workaround to fix build after updating stdenv bootstrap
(in the followup commit).  Interested parties can improve this later.
From Hydra's binaries for c5aabb0 (19.09).
This time I re-tested full stdenv bootstrap on these three platforms.
NixOS#66528 (comment)
@edolstra

edolstra commented Feb 5, 2020

Copy link
Copy Markdown
Member

@vcunat Thanks, I've copied the files.

I suppose the diff of the glibc-upgrade branch is a bit cleaner
without including these unnecessary changes.
@vcunat

vcunat commented Feb 5, 2020

Copy link
Copy Markdown
Member

Confirmed, except for the optional one (but that one doesn't matter).

@edolstra

edolstra commented Feb 5, 2020

Copy link
Copy Markdown
Member

No, I copied it as well. Note that you have a typo in the URL (http://tarballs.nixos/org...).

@lblasc

lblasc commented Feb 5, 2020

Copy link
Copy Markdown
Contributor Author

@vcunat @Ma27 it was a pleasure working with you guys! I've started this as a learning experience to investigate how NixOS bootstrapping works, I'm very pleased to have contribution which rebuilds the whole dependency tree 🔥 on three major archs 😁

@vcunat

vcunat commented Feb 5, 2020

Copy link
Copy Markdown
Member

Oh, right, typo; pushed as cf24265. First x86_64 binaries should start compiling today; the rest when staging-next get rotated.

@lblasc: it's a bit unlucky that it was a difficult case and took us so much time – about half a year. Usually changes aren't so cumbersome, even mass rebuilds get merged basically every week.

@vcunat

vcunat commented Feb 5, 2020

Copy link
Copy Markdown
Member

Repeated note: 32-bit ARMs are quite certainly broken by this PR. /cc @dezgeg (again) Regenerating bootstrap tools for them might suffice to fix them, but I don't have a good way of testing the builds natively.

I suspect cross-building these platforms might keep working, except I now see that this PR broke evaluation of (all?) cross stuff 🤕

@Ma27

Ma27 commented Feb 5, 2020

Copy link
Copy Markdown
Member

I suspect cross-building these platforms might keep working, except I now see that this PR broke evaluation of (all?) cross stuff

Can you please point me to a Hydra eval where I can see the errors?

@FRidh FRidh mentioned this pull request Feb 5, 2020
10 tasks
@lopsided98 lopsided98 mentioned this pull request Feb 11, 2020
1 of 10 tasks
@jcumming

Copy link
Copy Markdown
Contributor

Uh-oh. These bootstrap tools no work on SLES 11-SP4 3.0.101-108.87-default kernels:

Unpacking the bootstrap tools...
Patching the bootstrap tools...
FATAL: kernel too old

@Ma27

Ma27 commented Feb 11, 2020

Copy link
Copy Markdown
Member

Just to properly understand your issue: you're using Nix on Sles11sp4 and our new bootstrap tools break the setup, right?

However I'd like to point out that I'm pretty much against putting additional effort in fixing stuff for unmaintained versions of other distros (well unless you're paying for LTSS, but that's another story), but that's just my opinion :)

@vcunat

vcunat commented Feb 11, 2020

Copy link
Copy Markdown
Member

@jcumming: did it even work before this PR? I've never looked into this for SLES/SLED. We haven't changed this part for quite a long time:

"--enable-kernel=3.2.0" # can't get below with glibc >= 2.26

We have special patch to allow RHEL 6 -like kernels. That reminds me I last verified the real compatibility with that on glibc-2.26-131... so even though you don't get this nice refusal, some parts might not work on those kernels anymore. Well, today I suspect we might even drop RHEL 6 support 🤷‍♀️ I personally don't feel it's important anymore.

@vcunat

vcunat commented Feb 11, 2020 •

Copy link
Copy Markdown
Member

To be clear, it isn't that much about bootstap... but about running anything built with our libc (i.e. with our stdenv).

@vcunat

vcunat commented Feb 11, 2020 •

Copy link
Copy Markdown
Member

Actually, I think previous service packs with 2.6.32 kernel would not give you the error message, by co-incidence with RHEL 6 :-)

@infinisil infinisil mentioned this pull request Feb 21, 2020
1 task done
@vbgl vbgl mentioned this pull request Feb 25, 2020
2 of 10 tasks
@Ma27 Ma27 mentioned this pull request Feb 2, 2021
6 of 12 tasks
@thefloweringash thefloweringash mentioned this pull request Feb 26, 2021
9 of 21 tasks
@arapov arapov mentioned this pull request Apr 26, 2022
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 6.topic: stdenv Standard environment 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.