cabal2nix icon indicating copy to clipboard operation
cabal2nix copied to clipboard

Deal with gcc_s in extra-libraries field

Open Fuuzetsu opened this issue 11 years ago • 4 comments

The bits-extra package has gcc_s in extra-libraries field. What cabal2nix does is put gcc_s as an extra argument and makes extraLibraries = [ gcc_s ];, which doesn't work because such package doesn't exist. I am told that it instead needs to do something with NIX_LDFLAGS="-lgcc_s" and have gcc as a dependency.

Fuuzetsu avatar Jul 31 '14 17:07 Fuuzetsu

You are right, it would be nice if cabal2nix would recognize that library dependency and do the right thing automatically. I'll take a look at that.

peti avatar Aug 04 '14 09:08 peti

For future reference, I should add that adding configureFlags = "--ghc-option=-lgcc_s"; is the solution to the problem as pointed out on mailing lists

Fuuzetsu avatar Aug 04 '14 15:08 Fuuzetsu

I wonder why Cabal itself doesn't manage to pass -lgcc_s in this case? It is in extra-libraries regardless of what packages are passed in (or not) from Nix.

sternenseemann avatar May 14 '22 13:05 sternenseemann

As sternenseemann pointed out in #552, only two Hackage packages require gcc_s, and both still fail to build for unrelated reasons. Is it still worth attempting to fix this here in cabal2nix (can we reasonably expect new packages to continue to use gcc_s going forward)? If not, I'll close my PR, or someone else can do it themselves.

leungbk avatar May 14 '22 13:05 leungbk