-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Reintroduce 'static' flag #9068
Comments
Did you try what the commit above suggests?
|
I know this works. But why an extra configuration file? |
And yes: I have tried installing https://github.com/commercialhaskell/stack with It does not work either:
Cross reference: https://github.com/benz0li/commercialhaskell-stack/tree/add-dev-containers/.devcontainer#build-and-install-stack (adding FYI @mpilgrem With |
@jgm If you think the current state is user-friendly enough, you can close the issue. |
|
Really interesting: Tested with the Default Dev Container on my MacBook Pro M2 ( BTW I assume the following statement to be correct:
Footnotes |
The suggestion, then, would be to reverse this change? All the old I'm still unclear about the value of adding it back... No extra config file is needed; you can specify the option on the command line as you saw above (and presumably also in cabal ghc-options?), at least on Linux ... on macOS you can't get fully static linking anyway. |
Yes, in its functionality.
Adding
Works with Does not work with
True. Therefore,
Enable building a statically linked
on Linux. Thank you for reconsidering. |
Well, not exactly. On macOS, you still won't get a fully static build. Nor will you on linux unless you use something like alpine. I didn't want people using this flag and then thinking they had a static build when they didn't. I think that's the confusion I'd hoped to avoid. But yes, the flag might be convenient for people who know what they're doing. On the other hand, such people will know what to do without the flag, too. |
Using cabal
It is impossible to create a statically linked binary with
cabal install
: haskell/cabal#7236ℹ️ This is only possible with
cabal build
.Using stack
It is possible to create a statically linked binary with
stack install
: Using--flag=<executable>:static
👉 E.g. for statically linking stack using stack.
Describe your proposed improvement and the problem it solves.
Unfortunately, I do not know what needs to be changed in order to create a statically linked pandoc binary with
stack install
.What I know is that the 'static' flag was removed at some point:
Describe alternatives you've considered.
The supposedly equivalent
stack install --ghc-options '-static -optl-static -optl-pthread' pandoc-cli
does not work:Cross references:
The text was updated successfully, but these errors were encountered: