Build fully static compiler binary using ghc-musl#4573
Build fully static compiler binary using ghc-musl#4573purefunctor merged 24 commits intomasterpurescript/purescript:masterfrom
Conversation
80eb9e3 to
997aded
Compare
c9bbd05 to
137a4fc
Compare
|
Next task to do on my end is to verify the licenses of the various dependencies that we're using to make sure that we can statically link against them. I'm on a Mac at the moment so I can't test the static build of the compiler on the daily but it passing all tests and building the package set is very promising. |
|
@purefunctor Regarding statically linked Linux binaries:
– https://github.com/benz0li/ghc-musl#gmp-licensing-restrictions Cross reference:
|
|
Hi @benz0li, many thanks for the information about licensing and apologies for the late response. Following suit from stack and pandoc, I believe the next steps would be:
After which we should be ready to distribute statically-linked binaries. |
24b6467 to
cfc51fd
Compare
cfc51fd to
8c4944b
Compare
|
@purefunctor very happy to have static binaries 😄 |
|
This PR is now ready for review! I'm also happy to take on updating https://github.com/purescript/npm-installer (and other distributions) to point to the new static binaries. |
purefunctor
left a comment
There was a problem hiding this comment.
Added comments on a few points of discussion
| build --fast --ghc-options -fwrite-ide-info | ||
|
|
||
| - run: "ci/fix-home stack exec weeder" | ||
| - run: "ci/fix-home stack exec weeder -- --hie-directory .stack-work" |
There was a problem hiding this comment.
weeder-2.8.0 seemed to have been reliant on a bug that matched . directories by default. See context here
| # We test with --haddock because haddock generation can fail if there is invalid doc-comment syntax, | ||
| # and these failures are very easy to miss otherwise. | ||
| STACK="stack --no-terminal --haddock --jobs=2" | ||
| STACK="stack --no-terminal --haddock --jobs=4" |
There was a problem hiding this comment.
| build-tool-depends: | ||
| happy:happy ==2.0.2 |
There was a problem hiding this comment.
I think this was declared before in the purescript-cst library—not having it makes cabal builds fail on my machine though!
| filepath >=1.4.301.0 && <1.5, | ||
| Glob >=0.10.2 && <0.11, | ||
| haskeline ==0.8.2, | ||
| haskeline >=0.8.2.1 && <0.9, |
There was a problem hiding this comment.
This fixes cabal builds but also introduces libtinfo to dynamically-linked executables.
There was a problem hiding this comment.
This is fine for local builds if we only build the static one in CI
| filepath >=1.4.301.0 && <1.5, | ||
| Glob >=0.10.2 && <0.11, | ||
| haskeline ==0.8.2, | ||
| haskeline >=0.8.2.1 && <0.9, |
There was a problem hiding this comment.
This is fine for local builds if we only build the static one in CI
|
It works! |
96b36f9 to
c0ae072
Compare
c0ae072 to
0ebc33c
Compare
f-f
left a comment
There was a problem hiding this comment.
Looks great now - thanks @purefunctor!
|
@purefunctor I have updated the CI requirements to include the new jobs, so the path ahead is all green - are we good to merge? |
|
Let's go for it! I'll make a post on the discourse soon
…On Thu, Jun 26, 2025, 02:54 Fabrizio Ferrai ***@***.***> wrote:
*f-f* left a comment (purescript/purescript#4573)
<#4573 (comment)>
@purefunctor <https://github.com/purefunctor> I have updated the CI
requirements to include the new jobs, so the path ahead is all green - are
we good to merge?
—
Reply to this email directly, view it on GitHub
<#4573 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP46GXFQRXZRX4Q3T6CGSF33FLV5RAVCNFSM6AAAAAB2ZXJSMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMBVHAYTOOBYGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
* Build statically-linked binaries with ghc-musl * Compliance for LGPL terms * Add changelog entry * Update dependencies * Update LICENSE * Update weeder * Fix weeder * Add more changelog entries * Argument passthrough * Update license * Update license * Build images for ARM * Checkout after Node installation * Only mount volumes for static * Drop static prefix for now * Force purge cache * Remove builds against ubuntu * Use matrix.os for cache key * Fix linux only * Set CI_STATIC to true * CI_STATIC on Linux only * Fix more linux only checks
Description of the change
Closes #4572.
Checklist: