angerman changed the topic of #haskell.nix to: https://input-output-hk.github.io/haskell.nix - alternative haskell infrastructure for nix; logs at https://logs.nix.samueldr.com/haskell.nix
<jackdk> I am trying to statically-link haskell code using haskell.nix and in particular pkgs-unstable.pkgsCross.musl64 . The package i'm building is an exe that uses hw-kafka-client, which binds to librdkafka. When building on glibc, everything successfully links. When building under musl, hw-kafka-client builds, but my executable fails to link. how can I fix up the linker search path to make things work?
<jackdk> I have tried using a module setting to set `packages.kafka-test.components.exes.kafka-push-test.lib = pkgs.lib.mkForce (with pkgs.pkgsCross.musl64; [rdkafka openss])`, but I still get linker errors re: openssl symbols
<jackdk> (that typo of `openss` is only present on IRC)
<angerman> jackdk: if you build from pkgsCross and the Haskell package properly references the dependencies, you don’t need to set anything specific. Haskell.nix will pick the cross packages.
<jackdk> angerman: and in theory, theory and practice are the same =) hw-kafka-client declares `extra-libraries: rdkafka`; `rdkafka.pc` declares a dependency on `libssl`, as does `rdkafka-static.pc` (not sure which is used)
<jackdk> my haskell package only declares a `build-depends: hw-kafka-client`; I would have expected it to pull in those deps (it must've done so for rdkafka, because I don't see any missing symbols for it)
<jackdk> am I missing something obvious here?
<jackdk> alternatively, is there a verbose mode I can turn on to see exactly what GHC is trying to invoke?
<jackdk> https://github.com/tweag/rules_haskell/issues/379#issuecomment-648326069 apparently libssl.a and libcrypto.a need to be linked in the right order; is there a good way to do this in haskell.nix?
SumnerEvans[m] has left #haskell.nix ["User left"]
_rvl has quit [Quit: ZNC 1.8.2 - https://znc.in]
_rvl has joined #haskell.nix
jb3 has joined #haskell.nix
jb3 has quit [Ping timeout: 240 seconds]
jb3 has joined #haskell.nix
__monty__ has joined #haskell.nix
<angerman> jackdk: in general the order in the cabal file should be respected.
<angerman> jackdk: you can also add ghc-options: -lssl -lcrypto -lssl -lcrypto -lssl
<jackdk> angerman: setting `ghc-options: -lssl` gives me `warning ... use extra-libraries: ssl` (and setting that doesn't help either)
johnny101 has quit [Ping timeout: 240 seconds]
johnny101 has joined #haskell.nix
proofofkeags has quit [Ping timeout: 260 seconds]
johnny101 has quit [Ping timeout: 265 seconds]
proofofkeags has joined #haskell.nix
johnny101 has joined #haskell.nix
johnny101 has quit [Ping timeout: 240 seconds]
johnny101 has joined #haskell.nix
johnny101 has quit [Ping timeout: 250 seconds]
johnny101 has joined #haskell.nix
johnny101 has quit [Ping timeout: 252 seconds]
johnny101 has joined #haskell.nix
jb3 has quit [Ping timeout: 246 seconds]
__monty__ has quit [Quit: leaving]