Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make it possible to directly link a haskell library with an external static C library(.a). #4042
Since it's not possible, https://github.com/jakubfijalkowski/hlibsass#static-shared-or-external-version-of-libsass says
This issue is also related to jakubfijalkowski/hlibsass#4
If a haskell binding to a C/C++ library is directly linked with a static library, we can avoid this issue.
Currently, only executables are linked with
Also, GHCi fails to load
The goal is to emulate what node-gyp does. node-gyp builds C libraries locally and binds them to binding libraries so that C libraries don't have to be installed globally. This is clean.
Cabal currently doesn't have a clean support for embedding C libraries into haskell bindings.
referenced this issue
Dec 20, 2016
For the case that @crocket described, the package provides a static library to use with the bindings. That's not something the user can select at build time; the package has to be created with that in mind. What you are describing is the user selecting whether to statically or dynamically link system libraries, and I agree that is something that should be determined at build-time.