For now I solved it with LD_LIBRARY_PATH & LIBRARY_PATH (see https://github.com/SAP/bosh-kubernetes-cpi-release/blob/master/packages/bosh_kubernetes_cpi/packaging#L12-L13)
I suppose I could leave one of them out. As far as I tried that no requirement for running the resulting binary. Michael Snoyman <[email protected]> schrieb am Mi., 26. Juli 2017, 07:05: > I'm not expert on this, but I believe you'll need to set LD_CONFIG > appropriately instead of using --extra-lib-dirs. The --extra-lib-dirs is > not used during GHC sanity check if I remember correctly. > > On Sun, Jul 23, 2017 at 11:56 PM, Jan von Löwenstein < > [email protected]> wrote: > >> Hi, >> >> When I compile libgmp to a non-standard location, install a specific ghc >> version (into a non-standard location) to use with `stack --system-ghc` and >> then `stack build` my code and its dependencies using `--extra-lib-dirs` >> and `--extra-include-dirs`. Should that work? >> I get complaints from `ld` that it can't find `-Lgmp`. Apparently there >> is some validation step that attempts to link against gmp in order to, >> well, validate linking will work at runtime? >> >> Some additional questions that came to my mind: >> How would I ensure GHC itself can find libgmp (assuming there is usage of >> that in GHC code itself)? >> Do I have to ensure that my compiled code finds libgmp in the >> non-standard location and how would I do it? >> >> I did some googling on that but I am admittedly new to low level >> systems/compilation stuff so I easily got lost. >> >> Hopefully someone can help me out on that. >> >> Best regards, >> > Jan >> > >> -- >> You received this message because you are subscribed to the Google Groups >> "haskell-stack" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/haskell-stack/CAJtP4w6HsEpW5umoENyAKcjLY%2BH1M7bcK0D0utxM0g-xc3qNwA%40mail.gmail.com >> <https://groups.google.com/d/msgid/haskell-stack/CAJtP4w6HsEpW5umoENyAKcjLY%2BH1M7bcK0D0utxM0g-xc3qNwA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "haskell-stack" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/CAJtP4w5crSczKpjCQo%2BNSqYUEpLJvDeJ0tD5YNK8VAbpRmd66g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
