-
Notifications
You must be signed in to change notification settings - Fork 697
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
Cannot build a statically linked binary with cabal new-* commands #5847
Comments
This may help you. They use |
I haven't gotten `new-build` to produce a statically-linked executable, but
if anyone is interested, here's a short nix script (under `./static`) that
does so:
https://github.com/sboosali/spiros/blob/master/static/README.md
it uses `pkgsMusl` from `nixpkgs`. also see the `make static` target in the
project directory.
…On Mon, Apr 8, 2019, 11:58 TANIGUCHI Kohei ***@***.***> wrote:
This
<https://www.reddit.com/r/haskell/comments/6xuiy7/building_static_binaries_program_a_convoluted/dmjqode/>
may help you. They use stack but I try the ld-options way with cabal new-*
and it works.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5847 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACNoMSnvzlTsFiYcVDcDV-l1GG1R3IsTks5ve5FDgaJpZM4aDYjY>
.
|
did you try |
Indeed, it should work according to tests in #7236. |
We've got no info and the recommended way to build static exes is different now and works (sometimes, for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
As suggested by the error message, I'm opening an issue because I cannot reproduce a successful build with cabal new-* commands.
You can reproduce this issue using a Docker:
Working
Not working
Full trace
I'm new to the Haskell ecosystem so maybe I'm missing something.
As suggested by the error message, I've tried to add the
-fPIC
but without success...Related issue: BurntSushi/erd#40
The text was updated successfully, but these errors were encountered: