[Nix-dev] gcc_s with Haskell packages

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Thu Jul 31 23:59:39 CEST 2014


On 07/31/2014 10:51 PM, Vladimír Čunát wrote:
> Hi.
> 
> On 07/31/2014 09:23 PM, Mateusz Kowalczyk wrote:
>> I'm trying to get the bits-extras Haskell package to compile. The caveat
>> is that it needs gcc_s as an available library.
>> [...]
>> 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?
> 
> 
> Are you sure if NIX_LDFLAGS works for cabal.mkDerivation? GCC should be 
> on link path, as stdenv is enough for that IIRC.

No, I am not sure, it is just something that I was told to try on IRC.
There are other things in NIX_LDFLAGS as evidenced by the log I posted
in the OP so it seems like it's at least looked at but I don't know if
it's relevant.

> GCC should be on link path, as stdenv is enough for that IIRC.

In this case I still don't know how to progress. If I remove gcc from
the default.nix and remove the NIX_LDFLAGS mention, runghc Setup config
-v3 gets me [1]. A quick look for gcc_s shows that -lgcc_s gets passed
to gcc (line 166) without me having to do it (that's good) but ld can't
deal with it (that's bad).

So currently I'm stuck with the right flag being passed in but ld still
failing.

At [2] is the default.nix I am using.


[1]: http://lpaste.net/108528
[2]: http://lpaste.net/108530

> 
> Vlada
> 
> 
> 
> 
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
> 


-- 
Mateusz K.


More information about the nix-dev mailing list