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

Bring back statically linked stack binaries #4088

Closed
nh2 opened this issue Jun 14, 2018 · 14 comments
Closed

Bring back statically linked stack binaries #4088

nh2 opened this issue Jun 14, 2018 · 14 comments
Labels
component: releases Platform support, automation

Comments

@nh2
Copy link
Collaborator

nh2 commented Jun 14, 2018

As explained on #4087, and partially on #2387, we lost static stack binaries for Stack 1.7 due to Alpine Linux not supporting GHC 8.2.

Not having static stack creates a couple of problems:

This issue tracks getting static stack back.

@mitchty
Copy link
Contributor

mitchty commented Jun 14, 2018

Note, Alpine Linux 3.8 will have 8.4.3, but only for x86_64 right now. alpinelinux/aports#4255

@nh2
Copy link
Collaborator Author

nh2 commented Jun 14, 2018

Here's another way I just got to work: https://github.com/nh2/static-haskell-nix/blob/master/static-stack

That's one command to build a fully static stack (1.6.5 as of writing) with nix's musl toolchain.

@dbaynard dbaynard added the component: releases Platform support, automation label Jun 19, 2018
@dbaynard
Copy link
Contributor

Just reading the description of #4087 is concerning; the alpine linux build process seems quite ad-hoc and fragile. I'm not sure how the project leads go about new releases, but given stack itself has nix support, it would make sense for static builds to be produced using nix.

I'd like to recommend using nix for building releases, replacing alpine linux. Is your static-stack project suitable for that?

@borsboom
Copy link
Contributor

I'd like to recommend using nix for building releases, replacing alpine linux. Is your static-stack project suitable for that?

Agreed, if there was a way to use stack --nix with this I'd be all for switching to it as the standard way to build static binaries.

@mitchty
Copy link
Contributor

mitchty commented Jun 25, 2018

@dbaynard its.... not all it could be, restrictions like no network access, not being able to build a subpackage with a different version, and other things greatly make packaging harder than it really need be.

That and I've literally spent the past 3 months on and off trying to get the cross compilation to work to no avail is making me wonder how much effort I should spend in that regard if I can just use nix.

@borsboom
Copy link
Contributor

@mitchty What about just a GHC bindist that can be installed on Alpine (or documented process for building a working GHC from source), rather than trying to make an APK package?

@mitchty
Copy link
Contributor

mitchty commented Jun 25, 2018

@borsboom That wouldn't be too hard to do, would also generally solve #2387 as well.

Would it be better to get "official" support for alpine linux so that we get official bindists? Otherwise we end up where I was prior to upstreaming ghc to alpine linux community, aka: who do we trust to build/host etc...

@borsboom
Copy link
Contributor

borsboom commented Jun 25, 2018

Would it be better to get "official" support for alpine linux so that we get official bindists?

Yes, that would be awesome.

@nh2
Copy link
Collaborator Author

nh2 commented Jun 28, 2018

Agreed, if there was a way to use stack --nix with this I'd be all for switching to it as the standard way to build static binaries.

This may be possible, I just haven't tried it yet. At least in theory, supplying a musl-supported --system-ghc with stack --nix and have stack use that should work fine.

@dbaynard
Copy link
Contributor

dbaynard commented Jul 23, 2018

It would be good to have a static version of 1.8 when that is ready for release

@nh2
Copy link
Collaborator Author

nh2 commented Dec 7, 2018

This was done with v1.9.1, using https://github.com/nh2/static-haskell-nix/blob/master/static-stack as described above.

@nh2 nh2 closed this as completed Dec 7, 2018
@dtzWill
Copy link

dtzWill commented Dec 7, 2018 via email

@chespinoza
Copy link

Is there a way to do this without nix?

@nh2
Copy link
Collaborator Author

nh2 commented Oct 27, 2019

@chespinoza There may be one if you manage to compile Stack on Alpine.

Why are you looking for one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: releases Platform support, automation
Projects
None yet
Development

No branches or pull requests

6 participants