[Nix-dev] gcc_s with Haskell packages
Patrick Wheeler
patrick.john.wheeler at gmail.com
Fri Aug 1 06:22:17 CEST 2014
>I'm trying to get the bits-extras Haskell package to compile. The caveat
is that it needs gcc_s as an available library.
One method that has work for in past for similar problems was to use a
custom ghc using `ghcWtihPackages`. `gcc_s` would be one of the packages
you would add to the scope of ghc. I think that most all packages can then
only be added or removed by changing your custom derivation though rather
than using `nix-env -iA` however.
Alternatively it seems like you could create you own `cabal` nix derivation
that would use NIX_LDFLAGS by adding it with `--extra-lib-dir` option.
Pretty sure that option should work even when not invoking cabal directly.
Here is where you would add it:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/cabal/default.nix#L209
You could then override the definition of `cabal` in your config file so
that you could install all current packages with the new version of cabal.
A down side of this second method is that your package installs become less
pure. They could have un track dependencies that you would have to
manually keep track of.
Patrick
On Thu, Jul 31, 2014 at 2:23 PM, Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>
wrote:
> Hi,
>
> I'm trying to get the bits-extras Haskell package to compile. The caveat
> is that it needs gcc_s as an available library.
>
> What I'm currently doing is adding -lgcc_s to NIX_LDFLAGS but that does
> not seem to help as the compilation fails with:
>
> …
> /nix/store/gnk8w6qh6fwfamwy8ipl8zg149inw9rg-gcc-wrapper-4.8.3/bin/ld
> returned
> ExitFailure 1 with error message:
> /nix/store/bzvdg7g74rkw7p3zw3mqpp7ynnq4mxf1-binutils-2.23.1/bin/ld: cannot
> find -lgcc_s
> Setup: /tmp/6042.o: does not exist
>
> I tried adding gcc to buildInputs just in case but it did not seem to
> change anything. You can see my default.nix for bits-extras at [1]. I
> have also produced a more verbose than default output by using runghc on
> Setup by hand with -v3 which shows various vars, you can see that at [2].
>
> I see many packages in nixpkgs with the NIX_LDFLAGS="-lgcc_s" present
> but it does not seem to work in my case: perhaps something extra is
> needed for Haskell packages. Can anyone point me in the right direction?
>
> [1]: http://lpaste.net/108516
> [2]: http://lpaste.net/108517
>
> --
> Mateusz K.
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
--
Patrick Wheeler
Patrick.John.Wheeler at gmail.com
Patrick.Wheeler at colorado.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140731/3ab3ad73/attachment-0001.html
More information about the nix-dev
mailing list