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

Linker limit workaround on Darwin causes buildEnv environments to conflict #25627

Open
jwiegley opened this issue May 8, 2017 · 4 comments
Open
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: darwin Running or building packages on Darwin

Comments

@jwiegley
Copy link
Contributor

jwiegley commented May 8, 2017

In commit 7131e06, a workaround was introduced to link all Haskell dylibs from a lib/links directory. However, this directory is installed into any environment that builds a Haskell executable, causing environments made with buildEnv to conflict in those files.

Since I have many such environments in my configuration, this change forces me to maintain a set of priorities. It would be better if the links directory was somehow made local to the buildEnv.

@jwiegley
Copy link
Contributor Author

jwiegley commented May 8, 2017

Note that using this throughout my configuration provides a workaround:

    (haskell.lib.justStaticExecutables haskellPackages.bench)

@henrytill
Copy link
Member

I ran into the same problem, merely trying to upgrade my user environment which contained the following:

haskellPackages.ghc
haskellPackages.cabal-install
haskellPackages.cabal2nix

which results in:

building path(s) ‘/nix/store/cs1vaznndfaivhklhv6pbni9n0l41zmj-user-environment’
Wide character in die at /nix/store/64jc9gd2rkbgdb4yjx3nrgc91bpjj5ky-buildenv.pl line 79.
collision between ‘/nix/store/jl3nflpnn9lmnwk0ap6r0rfx9pr0m0hq-cabal2nix-2.2/lib/links/libHShashable-1.2.6.0-AQZDze8miOYLRSXNmI0CCc-ghc8.0.2.dylib’ and ‘/nix/store/4b2i5k6s2cllgzr2r6hfq00g0g93cj86-cabal-install-1.24.0.2/lib/links/libHShashable-1.2.6.0-AQZDze8miOYLRSXNmI0CCc-ghc8.0.2.dylib’; use ‘nix-env --set-flag priority NUMBER PKGNAME’ to change the priority of one of the conflicting packages

I too worked around the problem by overriding cabal2nix with (haskell.lib.justStaticExecutables haskellPackages.cabal2nix).

I can't help but wonder if there's some way that paths could be merged to avoid this problem.

Ref: #22810

@mmahut
Copy link
Member

mmahut commented Aug 19, 2019

Any news on this issue?

@prusnak prusnak added the 6.topic: darwin Running or building packages on Darwin label May 9, 2020
@stale
Copy link

stale bot commented Nov 5, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

No branches or pull requests

4 participants