Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate building a statically-linked shared library #54

Open
olorin opened this issue Jul 4, 2016 · 10 comments
Open

Investigate building a statically-linked shared library #54

olorin opened this issue Jul 4, 2016 · 10 comments

Comments

@olorin
Copy link
Contributor

olorin commented Jul 4, 2016

Would require rebuilding every Haskell library and potentially GHC itself, but it's the only way I can think of to be able to distribute a binary library that customers can use without needing to install GHC and compile the Haskell themselves.

@olorin
Copy link
Contributor Author

olorin commented Jul 6, 2016

Still working on this, getting GHC to build relocatable libraries is turning out to be a bit of a pain.

@erikd-ambiata
Copy link
Contributor

Honestly, I would bring that up on the ghc-users mailing list. Its not supposed to be this hard.

@thumphries
Copy link
Contributor

hit this on the weekend when trying to statically link against musl. I can get statically linked binaries out but not PIC PIE libraries. https://ghc.haskell.org/trac/ghc/ticket/9007

@olorin
Copy link
Contributor Author

olorin commented Jul 6, 2016

hit this on the weekend when trying to statically link against musl. I can get statically linked binaries out but not PIC PIE libraries. https://ghc.haskell.org/trac/ghc/ticket/9007

Thanks, finding that might have taken me a while - not altogether encouraging though.

@nhibberd
Copy link
Member

nhibberd commented Jul 6, 2016

What versions of ghc and cabal?

@olorin
Copy link
Contributor Author

olorin commented Jul 6, 2016

What versions of ghc and cabal?

At least 7.10.2 and 8.0.1, probably 7.8.4 as well. It's a GHC issue, cabal version isn't relevant here.

@thumphries
Copy link
Contributor

thumphries commented Jul 6, 2016

a regular ol relocatable lib might still be possible, even if PIC is not :) good luck

(I thought they were the same thing until 10 minutes ago)

@olorin
Copy link
Contributor Author

olorin commented Jul 6, 2016

a regular ol relocatable lib might still be possible, even if PIC is not :) good luck

I'm confused, how do I make a relocatable shared library without PIC?

@thumphries
Copy link
Contributor

ignore me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants