Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: mass rebuild complicated cleanups #48721

Merged
merged 3 commits into from
Oct 29, 2018

Conversation

oxij
Copy link
Member

@oxij oxij commented Oct 19, 2018

Motivation for this change

Continuation of #47233.

The first two patches homogenize gcc expressions (i.e. make diff between them as small as possible) in the hope that they could be merged into a single expression eventually.

I have no idea whether the third patch does the right thing.

Things done
  • Running on top of this for two months without issues.

/cc @Ericson2314

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: llvm_5, stdenv

Partial log (click to expand)

these paths will be fetched (37.43 MiB download, 216.54 MiB unpacked):
  /nix/store/3drlhmj7fvl8sfa9np6nb8axk28p3419-llvm-5.0.2-lib
  /nix/store/9vy4mcydwrdxsybiwrfb9r1yc5j7m7i8-llvm-5.0.2
copying path '/nix/store/3drlhmj7fvl8sfa9np6nb8axk28p3419-llvm-5.0.2-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/9vy4mcydwrdxsybiwrfb9r1yc5j7m7i8-llvm-5.0.2' from 'https://cache.nixos.org'...
/nix/store/9vy4mcydwrdxsybiwrfb9r1yc5j7m7i8-llvm-5.0.2
/nix/store/9pifap75pkb9ifmdqh0irn8wgc3q38s6-stdenv-linux

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: llvm_5, stdenv

Partial log (click to expand)

/nix/store/26wnsb2s0p7n0dbm6l3q28qd3nwmzjdi-llvm-5.0.2-python/share/opt-viewer/opt-viewer.py: interpreter directive changed from "/usr/bin/env python2.7" to "/nix/store/74b1xd5srd6ja54xwznvbrd5hcfl6k1n-python-2.7.15/bin/python2.7"
/nix/store/26wnsb2s0p7n0dbm6l3q28qd3nwmzjdi-llvm-5.0.2-python/share/opt-viewer/opt-stats.py: interpreter directive changed from "/usr/bin/env python2.7" to "/nix/store/74b1xd5srd6ja54xwznvbrd5hcfl6k1n-python-2.7.15/bin/python2.7"
/nix/store/26wnsb2s0p7n0dbm6l3q28qd3nwmzjdi-llvm-5.0.2-python/share/opt-viewer/opt-diff.py: interpreter directive changed from "/usr/bin/env python2.7" to "/nix/store/74b1xd5srd6ja54xwznvbrd5hcfl6k1n-python-2.7.15/bin/python2.7"
checking for references to /build in /nix/store/26wnsb2s0p7n0dbm6l3q28qd3nwmzjdi-llvm-5.0.2-python...
shrinking RPATHs of ELF executables and libraries in /nix/store/1zmm9vy864psdnmxmv75nbmd8w9dx9sh-llvm-5.0.2-lib
shrinking /nix/store/1zmm9vy864psdnmxmv75nbmd8w9dx9sh-llvm-5.0.2-lib/lib/libLLVM-5.0.so
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/1zmm9vy864psdnmxmv75nbmd8w9dx9sh-llvm-5.0.2-lib/lib
patching script interpreter paths in /nix/store/1zmm9vy864psdnmxmv75nbmd8w9dx9sh-llvm-5.0.2-lib
checking for references to /build in /nix/store/1zmm9vy864psdnmxmv75nbmd8w9dx9sh-llvm-5.0.2-lib...

@Ericson2314
Copy link
Member

Thanks!!

The last commit should just be dropped; everything else is good. The issue is while technically it is correct to set that env var based on the target platform, the vast majority of package are not sensitiveness to the target platform, and so we'd like to keep it that way way. With that uncommented, all build-time deps of cross compiled packages on darwin must be rebuilt, which is a big annoyance.

The solutions I want is @lheckemann's stuff to use absolute dt_needed / sonames, and avoid all this rpath stuff everywhere (on linux and darwin).

@oxij oxij force-pushed the tree/mass-rebuild-complicated-cleanups branch from 84b48cb to 91ea34a Compare October 19, 2018 19:45
@oxij
Copy link
Member Author

oxij commented Oct 19, 2018 via email

@GrahamcOfBorg GrahamcOfBorg removed the 6.topic: stdenv Standard environment label Oct 19, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: llvm_5

Partial log (click to expand)

/nix/store/9vy4mcydwrdxsybiwrfb9r1yc5j7m7i8-llvm-5.0.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: llvm_5

Partial log (click to expand)

/nix/store/dlm5rcrmhivihcajhjsxjcx88sfr04nk-llvm-5.0.2

@@ -424,7 +424,8 @@ stdenv.mkDerivation ({
platforms =
stdenv.lib.platforms.linux ++
stdenv.lib.platforms.freebsd ++
stdenv.lib.platforms.illumos;
stdenv.lib.platforms.illumos ++
stdenv.lib.platforms.darwin;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC gcc 4.8 is broken on darwin. Perhaps, the same is true for 4.9. Should probably use the meta.broken attribute to indicate that.

@@ -240,7 +240,6 @@ stdenv.mkDerivation ({
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional hostPlatform.isDarwin gnused)
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you missed one on line 238 here.

@FRidh
Copy link
Member

FRidh commented Oct 21, 2018

Waiting for more feedback before merging into staging.

@oxij oxij force-pushed the tree/mass-rebuild-complicated-cleanups branch from 91ea34a to 110f16e Compare October 21, 2018 18:31
@oxij
Copy link
Member Author

oxij commented Oct 21, 2018 via email

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: llvm_5

Partial log (click to expand)

these paths will be fetched (37.43 MiB download, 216.54 MiB unpacked):
  /nix/store/8icl1pw8j94ybchwkb5lb89saklxg601-llvm-5.0.2
  /nix/store/cavwdv9nz27nj81q1v870dl8sbng3djq-llvm-5.0.2-lib
copying path '/nix/store/cavwdv9nz27nj81q1v870dl8sbng3djq-llvm-5.0.2-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/8icl1pw8j94ybchwkb5lb89saklxg601-llvm-5.0.2' from 'https://cache.nixos.org'...
/nix/store/8icl1pw8j94ybchwkb5lb89saklxg601-llvm-5.0.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: llvm_5

Partial log (click to expand)

these paths will be fetched (33.27 MiB download, 200.78 MiB unpacked):
  /nix/store/xv06wq5jhlkj6vbmsmxfbkiv0drgypkg-llvm-5.0.2
  /nix/store/zwym0v67pjqxhvcgd3l2xrjy5sqxailg-llvm-5.0.2-lib
copying path '/nix/store/zwym0v67pjqxhvcgd3l2xrjy5sqxailg-llvm-5.0.2-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/xv06wq5jhlkj6vbmsmxfbkiv0drgypkg-llvm-5.0.2' from 'https://cache.nixos.org'...
/nix/store/xv06wq5jhlkj6vbmsmxfbkiv0drgypkg-llvm-5.0.2

@oxij
Copy link
Member Author

oxij commented Oct 29, 2018 via email

@FRidh FRidh requested review from xeji and 7c6f434c October 29, 2018 17:31
Copy link
Member

@7c6f434c 7c6f434c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is an explicit fresh review request towards @xeji I want to allow some time for it to happen (or not). Ping me in 24 hours, I will merge provided @FRidh doesn't merge it by then (assuming @xeji doesn't have hash-affecting objections, of course)

@xeji
Copy link
Contributor

xeji commented Oct 29, 2018

I don't feel competent to review this since I'm not familiar with the details of our gcc and llvm expressions.

@xeji xeji removed their request for review October 29, 2018 19:09
@7c6f434c
Copy link
Member

7c6f434c commented Oct 29, 2018

I am not keeping a close track of the minor details in the expressions, but I can understand what these specific changes do, and I agree these are a mix of useful cleanups and neutral layout changes.

@7c6f434c 7c6f434c merged commit 4a85434 into NixOS:staging Oct 29, 2018
buildInputs = [ libxml2 libffi ]
# TODO(@Ericson2314): Remove next mass rebuild
++ stdenv.lib.optionals (stdenv.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform) [ libcxxabi ];
buildInputs = [ libxml2 libffi ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh for the record this is because compiler-rt is now built separately and libcxxabi was just needed for that. Overall on the LLVM side, tools and runtime libraries are never built in the same derivation, which is good.

@oxij oxij deleted the tree/mass-rebuild-complicated-cleanups branch August 12, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants