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

SDL2: do not propagate private dependencies #41902

Merged
merged 3 commits into from
Jul 2, 2018
Merged

Conversation

orivej
Copy link
Contributor

@orivej orivej commented Jun 12, 2018

Motivation for this change

This uses pruneLibtoolFiles from #41819 to avoid the need to propagate private dependencies to dependent packages.

Fixes #41620 by adding libGL directory to libSDL2 runpath.

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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Tested compilation of some dependent packages on NixOS and macOS.

/cc @cpages as the maintainer, @oxij as the author of the previous refactoring.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: SDL2

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/bhn1j8mkvpvccw6wj1vwgpvjg6r2f6z8-SDL2-2.0.8/lib
patching script interpreter paths in /nix/store/bhn1j8mkvpvccw6wj1vwgpvjg6r2f6z8-SDL2-2.0.8
checking for references to /build in /nix/store/bhn1j8mkvpvccw6wj1vwgpvjg6r2f6z8-SDL2-2.0.8...
shrinking RPATHs of ELF executables and libraries in /nix/store/amvmrdbz31k8jhqcpvk355pbkw4cp0yb-SDL2-2.0.8-dev
strip is /nix/store/4mf2xm9p32lzrim927yk92xhx35yaz62-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/amvmrdbz31k8jhqcpvk355pbkw4cp0yb-SDL2-2.0.8-dev/lib  /nix/store/amvmrdbz31k8jhqcpvk355pbkw4cp0yb-SDL2-2.0.8-dev/bin
patching script interpreter paths in /nix/store/amvmrdbz31k8jhqcpvk355pbkw4cp0yb-SDL2-2.0.8-dev
/nix/store/amvmrdbz31k8jhqcpvk355pbkw4cp0yb-SDL2-2.0.8-dev/bin/sdl2-config: interpreter directive changed from "/bin/sh" to "/nix/store/0aa1ngxygf1iqanfbpdb10klc7r343c0-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/amvmrdbz31k8jhqcpvk355pbkw4cp0yb-SDL2-2.0.8-dev...
/nix/store/bhn1j8mkvpvccw6wj1vwgpvjg6r2f6z8-SDL2-2.0.8

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: SDL2

Partial log (click to expand)

cannot build derivation '/nix/store/z5yfzklsaid2xvix0ws65q5vkzr5wfpa-apple-framework-Carbon.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/bmfwql66gibdysjk2626r63zbpn5nk7j-apple-framework-AudioUnit.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/assp825f2lni4nq5cwh6bsdhvgs38xy9-apple-lib-Xplugin.drv': 11 dependencies couldn't be built
cannot build derivation '/nix/store/mwrjr30grdvp979lkr8y1ah21nl3qz6z-apple-framework-AudioToolbox.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/8rcw88abkx87s6k4yzsn59hvxmxqarq6-audiofile-0.3.6.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/qxmkyzdc1r1d2850qk5jcaiw3gmdx251-mesa-8.0.5.drv': 27 dependencies couldn't be built
cannot build derivation '/nix/store/n8b99r7s77bcd3liq84v48aygbqbhfnl-apple-framework-AppKit.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/klsm0p62s16j00xsqy5c3jzwfyvlib81-apple-framework-Cocoa.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/m3hgv90sr5mx8ridzxd6ic5qxmg8synz-SDL2-2.0.8.drv': 23 dependencies couldn't be built
error: build of '/nix/store/m3hgv90sr5mx8ridzxd6ic5qxmg8synz-SDL2-2.0.8.drv' failed

@GrahamcOfBorg

This comment has been minimized.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: SDL2

Partial log (click to expand)

  /nix/store/7g3i0bw0yhzk5wvh20pk1h5f683dfv45-libpulseaudio-11.1.drv
  /nix/store/a7babb9b7pxihvfkrc91fzw2kjz9a74x-cmake-3.11.2.drv
  /nix/store/b8hkg3r2800wdd4vaf1n3jbv8j08mglp-llvm-6.0.0.drv
  /nix/store/f3bld9ni5wjycmpp275wl5siyiabky07-mesa-noglu-18.0.3.drv
  /nix/store/cn8rfsjhi0g04hjm9zq8zf240hjp9djw-libGL-1.0.0.drv
  /nix/store/s96ip415v2d76gxl84a2glvbkzmdzsar-doxygen-1.8.14.drv
  /nix/store/j00661r81lzz3vjcj5bqz63bw0dkd6q2-libxkbcommon-0.8.0.drv
  /nix/store/fass86451534y671n5hvh0rjcig6cl21-SDL2-2.0.8.drv
waiting for locks or build slots...
/nix/store/0vx7gcd8wbf3fb5m1gbxaxns28hm5gz5-SDL2-2.0.8

@oxij
Copy link
Member

oxij commented Jul 1, 2018

@GrahamcOfBorg build wesnoth
(it uses most of SDL2)

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: wesnoth

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/a09362w23fmb3wghq3348592y7byfcg2-wesnoth-1.14.3
shrinking /nix/store/a09362w23fmb3wghq3348592y7byfcg2-wesnoth-1.14.3/bin/wesnoth
shrinking /nix/store/a09362w23fmb3wghq3348592y7byfcg2-wesnoth-1.14.3/bin/wesnothd
gzipping man pages under /nix/store/a09362w23fmb3wghq3348592y7byfcg2-wesnoth-1.14.3/share/man/
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/a09362w23fmb3wghq3348592y7byfcg2-wesnoth-1.14.3/bin
patching script interpreter paths in /nix/store/a09362w23fmb3wghq3348592y7byfcg2-wesnoth-1.14.3
/nix/store/a09362w23fmb3wghq3348592y7byfcg2-wesnoth-1.14.3/share/wesnoth/data/tools/unit_tree/update-wmlunits: interpreter directive changed from "/bin/bash" to "/nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/a09362w23fmb3wghq3348592y7byfcg2-wesnoth-1.14.3...
/nix/store/a09362w23fmb3wghq3348592y7byfcg2-wesnoth-1.14.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: wesnoth

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/fx2llk6w4y167gkljfpc3q51sxrayabg-wesnoth-1.14.3
shrinking /nix/store/fx2llk6w4y167gkljfpc3q51sxrayabg-wesnoth-1.14.3/bin/wesnothd
shrinking /nix/store/fx2llk6w4y167gkljfpc3q51sxrayabg-wesnoth-1.14.3/bin/wesnoth
gzipping man pages under /nix/store/fx2llk6w4y167gkljfpc3q51sxrayabg-wesnoth-1.14.3/share/man/
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/fx2llk6w4y167gkljfpc3q51sxrayabg-wesnoth-1.14.3/bin
patching script interpreter paths in /nix/store/fx2llk6w4y167gkljfpc3q51sxrayabg-wesnoth-1.14.3
/nix/store/fx2llk6w4y167gkljfpc3q51sxrayabg-wesnoth-1.14.3/share/wesnoth/data/tools/unit_tree/update-wmlunits: interpreter directive changed from "/bin/bash" to "/nix/store/p0vy17dp9jk2mvqsxsqnb14s3797lay7-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/fx2llk6w4y167gkljfpc3q51sxrayabg-wesnoth-1.14.3...
/nix/store/fx2llk6w4y167gkljfpc3q51sxrayabg-wesnoth-1.14.3

@oxij
Copy link
Member

oxij commented Jul 2, 2018

Yep, this LGTM. Should we do the same for SDL1?

orivej added 3 commits July 2, 2018 21:34
This prevents future rebuilds on Darwin if this Linux-only postFixup changes.
There are two symlinks pointing to the same library, libSDL2.so and
libSDL2-2.0.so.0.  patchelf should run on non-symlinks instead.
Fixes NixOS#41620 by adding libGL directory to libSDL2 runpath
@orivej orivej merged commit cbd1500 into NixOS:master Jul 2, 2018
@orivej
Copy link
Contributor Author

orivej commented Jul 2, 2018

Should we do the same for SDL1?

Yes, that would be right.

@orivej orivej deleted the sdl2 branch July 2, 2018 21:45
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux and removed 10.rebuild-darwin: 101-500 10.rebuild-linux: 101-500 labels Jul 2, 2018
@orivej orivej mentioned this pull request Jul 3, 2018
9 tasks
orivej pushed a commit that referenced this pull request Jul 3, 2018
orivej added a commit that referenced this pull request Jul 3, 2018
orivej added a commit that referenced this pull request Jul 3, 2018
orivej added a commit that referenced this pull request Jul 3, 2018
orivej added a commit that referenced this pull request Jul 3, 2018
This package depends on qtmultimedia which depends on libpulse whose libtool
files add `-lcap` to the linker command line. These libtool files should be
stripped with pruneLibtoolFiles, and then libcap dependency can be removed.
@cpages
Copy link
Contributor

cpages commented Jul 4, 2018

Thanks for unblocking this and sorry for failing to act before :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants