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

patchelf: 0.10-pre-20180108 -> 0.10-pre-20180509, minor touchup #45449

Merged
merged 2 commits into from Sep 28, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Aug 21, 2018

Useful update-- adds support for accepting multiple files as arguments
and fixes handling of large executables (>2Gb).

While touching this, modify version to include more info.

Preserving version format previously used, although not usual style.

Important updates/fixes for patchelf!

Might fix errors seen w/chrome (chromium?) but haven't checked.

Been using this more or less since the day these commits were merged
(FWIW).

  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

Useful update-- adds support for accepting multiple files as arguments
and fixes handling of large executables (>2Gb).

While touching this, modify version to include more info.

Preserving version format previously used, although not usual style.
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: patchelf

Partial log (click to expand)

/nix/store/j77p2fcr9rin2scxc912q3ydw4jyd19l-patchelf-0.9

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: patchelf

Partial log (click to expand)

/nix/store/sc4w9y5a3nszmmcyi3yhmmx6wysg66iw-patchelf-0.9

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: patchelf

Partial log (click to expand)

these paths will be fetched (0.05 MiB download, 0.16 MiB unpacked):
  /nix/store/4g22syzwd29qi5bvda2dvq66cm1xfk8c-patchelf-0.9
copying path '/nix/store/4g22syzwd29qi5bvda2dvq66cm1xfk8c-patchelf-0.9' from 'https://cache.nixos.org'...
/nix/store/4g22syzwd29qi5bvda2dvq66cm1xfk8c-patchelf-0.9

@xeji
Copy link
Contributor

xeji commented Aug 21, 2018

Let's build the real thing 😄
@GrahamcOfBorg build patchelfUnstable

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: patchelfUnstable

Partial log (click to expand)

make[2]: Leaving directory '/build/source'
make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509
shrinking /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509/bin/patchelf
gzipping man pages under /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509/share/man/
/nix/store/vp40my263xk32f07788srrgl59rycsna-binutils-2.30/bin/strip is /nix/store/vp40my263xk32f07788srrgl59rycsna-binutils-2.30/bin/strip
stripping (with command /nix/store/vp40my263xk32f07788srrgl59rycsna-binutils-2.30/bin/strip and flags -S) in /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509/bin
patching script interpreter paths in /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509
checking for references to /build in /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509...

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: patchelfUnstable

Partial log (click to expand)

const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp"))) = "/foo/bar";
                                                                ^
1 error generated.
make[2]: *** [Makefile:494: foo.o] Error 1
make[2]: Leaving directory '/private/tmp/nix-build-patchelf-0.10-pre-20180509.drv-0/source/tests'
make[1]: *** [Makefile:710: check-am] Error 2
make[1]: Leaving directory '/private/tmp/nix-build-patchelf-0.10-pre-20180509.drv-0/source/tests'
make: *** [Makefile:436: check-recursive] Error 1
builder for '/nix/store/l1pi72y5gipxdsfv16ij9fh2rmmzkd15-patchelf-0.10-pre-20180509.drv' failed with exit code 2
error: build of '/nix/store/l1pi72y5gipxdsfv16ij9fh2rmmzkd15-patchelf-0.10-pre-20180509.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: patchelfUnstable

Partial log (click to expand)

make[2]: Leaving directory '/build/source'
make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/75s48viz7qw1k0flrz4raa3xdgf2ziq8-patchelf-0.10-pre-20180509
shrinking /nix/store/75s48viz7qw1k0flrz4raa3xdgf2ziq8-patchelf-0.10-pre-20180509/bin/patchelf
gzipping man pages under /nix/store/75s48viz7qw1k0flrz4raa3xdgf2ziq8-patchelf-0.10-pre-20180509/share/man/
/nix/store/8wl4dykwswy42wxj671b6k7vk2ydxg86-binutils-2.30/bin/strip is /nix/store/8wl4dykwswy42wxj671b6k7vk2ydxg86-binutils-2.30/bin/strip
stripping (with command /nix/store/8wl4dykwswy42wxj671b6k7vk2ydxg86-binutils-2.30/bin/strip and flags -S) in /nix/store/75s48viz7qw1k0flrz4raa3xdgf2ziq8-patchelf-0.10-pre-20180509/bin
patching script interpreter paths in /nix/store/75s48viz7qw1k0flrz4raa3xdgf2ziq8-patchelf-0.10-pre-20180509
checking for references to /build in /nix/store/75s48viz7qw1k0flrz4raa3xdgf2ziq8-patchelf-0.10-pre-20180509...

@xeji
Copy link
Contributor

xeji commented Aug 21, 2018

Looks like patchelfUnstable never built on darwin, restrict to linux perhaps?

https://hydra.nixos.org/job/nixpkgs/trunk/patchelfUnstable.x86_64-darwin/all

@dtzWill
Copy link
Member Author

dtzWill commented Aug 21, 2018

If "stable" patchelf supports it, that seems like a regression worth flagging as a failure but I suppose it depends on the goals/interests of the patchelf developers (teehee whoever they are :P). Good point though, I suppose without input that's probably the best we can do.

@dezgeg
Copy link
Contributor

dezgeg commented Aug 21, 2018

Presumably doCheck = false; on Darwin will fix it, it's just compiling the test code which can't work given Darwin doesn't use ELF.

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: patchelf, patchelfUnstable

Partial log (click to expand)

 /nix/store/rm5hs2mg6rw6p1j2fsaiyx4jnspr3qxs-coreutils-8.29/bin/install -c -m 644 patchelf.1 '/nix/store/79crlgbirdlxh5cj5am2a6r5k1jych0z-patchelf-0.10-pre-20180509/share/man/man1'
make[2]: Leaving directory '/private/tmp/nix-build-patchelf-0.10-pre-20180509.drv-0/source'
make[1]: Leaving directory '/private/tmp/nix-build-patchelf-0.10-pre-20180509.drv-0/source'
post-installation fixup
gzipping man pages under /nix/store/79crlgbirdlxh5cj5am2a6r5k1jych0z-patchelf-0.10-pre-20180509/share/man/
/nix/store/5im29qx9rni3w8l3j8i2yr22sin55kxv-cctools-binutils-darwin/bin/strip is /nix/store/5im29qx9rni3w8l3j8i2yr22sin55kxv-cctools-binutils-darwin/bin/strip
stripping (with command /nix/store/5im29qx9rni3w8l3j8i2yr22sin55kxv-cctools-binutils-darwin/bin/strip and flags -S) in /nix/store/79crlgbirdlxh5cj5am2a6r5k1jych0z-patchelf-0.10-pre-20180509/bin
patching script interpreter paths in /nix/store/79crlgbirdlxh5cj5am2a6r5k1jych0z-patchelf-0.10-pre-20180509
/nix/store/4g22syzwd29qi5bvda2dvq66cm1xfk8c-patchelf-0.9
/nix/store/79crlgbirdlxh5cj5am2a6r5k1jych0z-patchelf-0.10-pre-20180509

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: patchelf, patchelfUnstable

Partial log (click to expand)

make[2]: Leaving directory '/build/source'
make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509
shrinking /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509/bin/patchelf
gzipping man pages under /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509/share/man/
/nix/store/vp40my263xk32f07788srrgl59rycsna-binutils-2.30/bin/strip is /nix/store/vp40my263xk32f07788srrgl59rycsna-binutils-2.30/bin/strip
stripping (with command /nix/store/vp40my263xk32f07788srrgl59rycsna-binutils-2.30/bin/strip and flags -S) in /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509/bin
patching script interpreter paths in /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509
checking for references to /build in /nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: patchelf, patchelfUnstable

Partial log (click to expand)

/nix/store/j77p2fcr9rin2scxc912q3ydw4jyd19l-patchelf-0.9
/nix/store/75s48viz7qw1k0flrz4raa3xdgf2ziq8-patchelf-0.10-pre-20180509

@xeji
Copy link
Contributor

xeji commented Aug 22, 2018

virtualbox uses patchelfUnstable. When I build it locally with this update, the build succeeds but there's a weird error message:

shrinking /nix/store/yrymjmjwrdzahkh7q4vv7sfg88517ddd-virtualbox-5.2.14/libexec/virtualbox/tstDeviceStructSizeRC.debug
patchelf: patchelf.cc:1046: void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym>::modifyRPath(ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym>::RPathOp, std::__cxx11::string) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; std::__cxx11::string = std::__cxx11::basic_string<char>]: Assertion `strTabAddr == rdi(shdrDynStr.sh_addr)' failed.
/nix/store/2bqrk870k6l67mddrasm7984zxp2i5ya-patchelf-0.10-pre-20180509/nix-support/setup-hook: line 7: 23173 Aborted                 patchelf --shrink-rpath "$i"
shrinking /nix/store/yrymjmjwrdzahkh7q4vv7sfg88517ddd-virtualbox-5.2.14/libexec/virtualbox/tstVMStructRC.debug
strange: no string table

This doesn't occur in the latest hydra build https://hydra.nixos.org/build/79996175 , so it might be caused by the patchelfUnstable update. Not sure it's really an issue though.

@Ekleog
Copy link
Member

Ekleog commented Sep 26, 2018

(triage) This… looks ready?

@dtzWill
Copy link
Member Author

dtzWill commented Sep 27, 2018

virtualbox uses patchelfUnstable. When I build it locally with this update, the build succeeds but there's a weird error message:

It looks like it uses patchelfUnstable but it doesn't, haha. Things look better after #47444 either with or without updating patchelfUnstable. LMK if you try it and if that's your findings as well.

@xeji
Copy link
Contributor

xeji commented Sep 28, 2018

Good catch! Indeed virtualbox uses regular patchelf because stdenv puts it in PATH before patchelfUnstable 😄 (so the patchelfUnstable dependency is quite useless)

So let's merge this now.

@xeji xeji merged commit 487f7f4 into NixOS:master Sep 28, 2018
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.

None yet

5 participants