-
Notifications
You must be signed in to change notification settings - Fork 843
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
stack build
segfaults on Void Linux with musl 1.1.24
#6325
Comments
@ii8, thanks for reporting. The |
OK, on Windows, that cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.35.2.
--
-- see: https://github.com/sol/hpack
name: my-project
version: 0.0.0
license: BSD3
license-file: LICENSE
build-type: Simple
executable my-project
main-is: Main.hs
other-modules:
Paths_my_project
default-language: Haskell2010 and Stack gets further - it complains about the missing |
running:
causes the same problem still with exit code -11. I have switched to just using cabal on it's own and things work fine that way. |
Does Stack detecting libc < 2.32 seem correct to you? I don't know Void Linux, but this list makes me think that glibc should be version 2.36. |
libc is musl 1.1.24, forgot to mention my bad |
Ah ha! So, for some reason, Stack is not identifying that it is a musl system. |
For |
Alternatively, if Cabal (the tool) is working for you, I assume that you have a version of GHC on the PATH that works on your system. You can instruct Stack to use that 'system' GHC, and not to download GHCs, with |
Finally, Stack's strategy for detecting musl is to look for |
system-ghc setting in yaml file is ignored, setting --system-ghc on commandline is also ignored, the same thing happens. running Here is what it looks like on void linux musl:
|
So that I can understand your 'system' GHC (if any), what does |
|
So, |
Yea I figured, but I had already commented that, with |
I'm looking but it seems difficult to find a non-hacky way to determine which libc a system is using. |
Stack looking for |
|
I doubt this is useful, but just in case
|
Thanks. That is disappointing. I think that may mean you are either (a) stuck with Void Linux-supplied GHC 9.0.2 or (b) need a later GHC that has been built by somebody specifically for Void Linux/musl - however, I am now at the boundary of my own knowledge. |
Cross-referencing to an open issue in the GHCup (installer) project: https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/368 |
I'm fine with using 9.0.2, if I need a newer one I can always compile it from source. |
stack build
segfaults on Void Linux with musl 1.1.24
I think a good solution here would be for the binaries distributed from haskell.org to be statically linked, at least these alpine musl builds, so they work on any system. |
There are fully static bindists, but they don't work well: https://downloads.haskell.org/~ghc/9.4.7/ghc-9.4.7-x86_64-alpine3_12-linux-static.tar.xz |
There are 'official' x86_64/statically-linked binary distributions of GHC for Linux: eg https://www.haskell.org/ghc/download_ghc_9_4_7.html#linux_x86_64. However, I understand them to have bugs: eg https://gitlab.haskell.org/ghc/ghc/-/issues/23043. EDIT: my post crossed with @hasufell's. |
That report was made by me hah, looks like I went through this problem before. |
I am running
stack build
on a barebones hello world project. The build fails but the output says only "While executing the build plan, Stack encountered the error:
" with no error description below, and further down it says "scroll up to its section to see the error
" with no error description above.stack.yaml:
package.yaml:
Main.hs:
stack output when you run build:
Stack version
Installed on x86_64 void-linux with it's package manager xbps. Upgraded with
stack upgrade
The text was updated successfully, but these errors were encountered: