!bDUkZPhyIGWRzkmgVM:matrix.org

Stack and Stackage

33 Members
stack (https://haskellstack.org) and Stackage (https://stackage.org), the Haskell build tool and stable package repository. Code/issues: https://github.com/commercialhaskell/stack . See also #stack-users, #stack-collaborators and #stackage on the Haskell Foundation slack server and #haskell-stack on Libera IRC.5 Servers

Load older messages


SenderMessageTime
18 Apr 2024
@mpilgrem:matrix.orgMike Pilgrem He sm: The key ingredient is Olivier Benz's unofficial GHC musl binary distributions. He only makes them available via his Docker images. 21:05:58
@mpilgrem:matrix.orgMike Pilgrem * sm: The key ingredient is Olivier Benz's unofficial GHC musl binary distributions. He only makes them available via his Docker images. 21:06:28
@simonmic:matrix.orgsmoh I see, I didn't quite get that on first reading (my brain read "do the build with funny options in alpine linux")21:07:33
@simonmic:matrix.orgsmthat's a great reference link (ghc-musl). Thought it's not really clear why a special docker image is required for this task, when cabal just needs a single flag.21:10:06
@simonmic:matrix.orgsm * that's a great reference link (ghc-musl). Though it's not really clear why a special docker image is required for this task, when cabal just needs a single flag.21:10:15
@simonmic:matrix.orgsm * that's a great reference link (ghc-musl). Though it's not really clear (in the ghc-musl readme either) why a special docker image is required for this task, when cabal just needs a single flag.21:10:33
@simonmic:matrix.orgsm * that's a great reference link (ghc-musl). Though it's not really clear (in the ghc-musl readme either) why a special docker image is required for this task, when cabal just needs alpine and a single command-line flag.21:16:34
@mpilgrem:matrix.orgMike Pilgrem sm: as a Windows user, I am 'flying on instruments' here but I understand that: (1) there is (a) 'glibc' and (b) lightweight 'musl libc' (2) if you are producing statically-linked executables, you really want 'musl libc' (because it is lightweight) (3) the GHC project does not itself produce 'musl libc' versions of GHC (4) but people (including Olivier Benz) have created 'musl libc' versions of GHC (5) and Olivier's versions are available only in the form of Docker images. 22:32:23
@simonmic:matrix.orgsmAs I understand it building on Alpine linux takes care of the musl libc part. But possibly building with this custom GHC produces a more static executable than cabal's flag, I know it's not a simple binary description22:48:55
@simonmic:matrix.orgsmIt's also possible that the ghc installed by ghcup on Alpine already includes similar special sauce for static linking22:50:56
@mpilgrem:matrix.orgMike Pilgrem sm: I came across this series of blog posts, which include a Stack v Cabal comparison, which may be of interest: https://www.extrema.is/blog/2022/03/24/ghc-musl-part-1 23:08:01
@simonmic:matrix.orgsmgood find!23:10:37
@simonmic:matrix.orgsmtwo years old, but things probably haven't changed too much23:11:24
19 Apr 2024
@b:chreekat.netchreekatI believe that it is literally impossible to achieve a fully statically-linked binary with glibc08:04:24
@b:chreekat.netchreekatGHC has some ... experimental? Broken? (It's hard to ascertain because of abuse of CI) bindists that may in theory be used to create statically-linked binaries08:07:08
@b:chreekat.netchreekate.g. https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-alpine3_12-linux.tar.xz08:07:39
@b:chreekat.netchreekatThat has a dynamically-linked GHC that can nonetheless, possibly, be used to generate statically-linked executables08:08:02
@b:chreekat.netchreekat * That is a dynamically-linked GHC that can nonetheless, possibly, be used to generate statically-linked executables08:08:08
@b:chreekat.netchreekat

Some hint to their purpose and state of brokenness can be seen from the code that generates CI jobs:

     -- Fully static build, in theory usable on any linux distribution.
     , fullyStaticBrokenTests (standardBuildsWithConfig Amd64 (Linux Alpine312) (splitSectionsBroken static))
     -- Dynamically linked build, suitable for building your own static executables on alpine
     , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine312) (splitSectionsBroken vanilla))
     , disableValidate (standardBuildsWithConfig AArch64 (Linux Alpine318) (splitSectionsBroken vanilla))
     , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine318) (splitSectionsBroken vanilla))
     , fullyStaticBrokenTests (disableValidate (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine312) staticNativeInt)))
08:09:03
@b:chreekat.netchreekat"broken"..."disable"...08:09:25
@mpilgrem:matrix.orgMike Pilgrem sm From 7 Oct 2015: https://www.fpcomplete.com/blog/static-compilation-with-stack/ 09:45:31
@mpilgrem:matrix.orgMike Pilgrem * sm From 7 Oct 2016: https://www.fpcomplete.com/blog/static-compilation-with-stack/ 09:46:00
@b:chreekat.netchreekatI've now published most of the stackage deployment configuration: https://github.com/commercialhaskell/stackage-infrastructure09:53:22
20 Apr 2024
@mpilgrem:matrix.orgMike Pilgrem

Should Stack augment the Stack-supplied MSYS2 with pkgconf?

I am consulting on the above topic (there is also a related Stack issue #1586, from 2016). The context is this: Haskell package zlib is popular: on Hackage, over 7,700 packages depend on it (including stack). From version 0.7 (now included in nightly-2024-04-11), by default, it will not build with Stack unless either (a) executable pkg-config is on the PATH or (b) --flag zlib:-pkg-config is passed. MSYS2 does not provide pkg-config 'out of the box', but it can be installed using stack exec -- pacman -S pkgconf. Historically, the Stack-supplied MSYS2 has been what the MSYS2 project provides 'out of the box' and it has been left to users to decide what, if any, other MSYS2 packages they install.

20:15:09
22 Apr 2024
@b:chreekat.netchreekatI just discovered https://docs.haskellstack.org/en/stable/yaml_configuration/#building-ghc-from-source . I wonder if it works09:28:02
@mpilgrem:matrix.orgMike Pilgrem chreekat: On building GHC from source with Stack, relatively recently I've got it to work on Windows but I think it is fragile. 23:19:47
23 Apr 2024
@b:chreekat.netchreekat Mike Pilgrem: well that's remarkable 05:38:22
@chrisdornan:matrix.orgChris Dornan joined the room.14:32:56
@chrisdornan:matrix.orgChris Dornan set a profile picture.15:12:17
25 Apr 2024
@tewuzij:beeper.comNguyễn Trọng Cường joined the room.14:28:59

There are no newer messages yet.


Back to Room ListRoom Version: