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

mpd_clientlib, ncmpc: fix on Darwin #34445

Merged
merged 2 commits into from Feb 1, 2018
Merged

Conversation

vbgl
Copy link
Contributor

@vbgl vbgl commented Jan 31, 2018

Motivation for this change

On Darwin, the dynamic library is broken, which make software linked to this library unusable (mpd, ncmpcpp, etc.):

$ nix-build -A mpd_clientlib && otool -L result/lib/libmpdclient.2.dylib
/nix/store/if3cvcqqxv22pgjyk3fk3a95v6gdwv4c-libmpdclient-2.13
result/lib/libmpdclient.2.dylib:
	@rpath/libmpdclient.2.dylib (compatibility version 0.0.0, current version 0.0.0)

$ nix-build -A mpd && ./result/bin/mpd
/nix/store/qlz1pcyf5k4qlwh8jc8rnvv025v3jjny-mpd-0.20.15
dyld: Library not loaded: @rpath/libmpdclient.2.dylib
  Referenced from: …/./result/bin/mpd
  Reason: image not found
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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.

@LnL7 LnL7 merged commit fa56fc4 into NixOS:master Feb 1, 2018
@LnL7
Copy link
Member

LnL7 commented Feb 1, 2018

We should probably fix meson at some point, but this is harmless if the install_name is already correct so we can do this until then.

@LnL7
Copy link
Member

LnL7 commented Feb 1, 2018

A simple solution for meson would be to do exactly this in a setup-hook.

@vbgl vbgl deleted the mpd_clientlib-darwin branch February 2, 2018 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants