-
Notifications
You must be signed in to change notification settings - Fork 701
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
aarch64-linux: hLock: invalid argument (Invalid argument) #7950
Comments
Seems likely this is an issue with GHC; can't find any relevant reports at first glance. Results of some random digging below: You might be able to work around this by compiling cabal with the flag cabal/cabal-install/cabal-install.cabal Line 36 in 9694036
That would use an alternate locking library: https://hackage.haskell.org/package/lukko. The only place that hLock is called:
The hLock code in base is here (the base that shipped with GHC 8.10.7 is 4.14, so there might have been changes):
|
Indeed, lukko helped with similar cases, but it needs work to cope with new architectures and scenarios (no idea about yours): #7313. |
|
TIL. Thank you. Marking as not our bug, in that case. @573: please let us know when you find something about this on GHC IRC/Matrix or wherever. And please re-open if it turns out cabal is calling ghc-pkg incorrectly. |
FYI, non-collaborators cannot re-open issues. |
That's a day full of learning. Huh, and this is not a configurable setting AFAICS. Oh well. |
@phadej and @Mikolaj can you pls see build in this branch https://github.com/573/aarch64-linux-ld-issue155722-reproduce/runs/5079804025?check_suite_focus=true#step:7:83 |
@573: that may, or may not, again be BTW, I have no clue, but do you think aarch64-linux was supposed to work already in GHC 8.10? And if so, that there are no known errors in aarch64 support in 8.10 that are fixed in GHC 9.0.2? Just asking --- if you find documents or people that can answer that, perhaps the can also help you diagnose further. Please do report back! |
I have the same issue using https://hub.docker.com/_/haskell/ for multi-arch builds - is there any workaround yet? |
Judging from #8232, this seems to work for some people. Do you use cabal 3.8 and a new GHC (9.2.3 or 9.4, I guess)? |
@Mikolaj - I'm trying to use the [8.10.7-slim-buster] image on a X86 hardware setup (in our CI/CD pipeline) for multi-arch docker compiles / builds of our application - which results in this error. Works on M1 but not with the docker buildx extension. Seems it uses cabal 3.6.2.0. Is there plans to build an image that has cabal 3.8 (don't see an official release yet) in it? Happy to help testing |
I tried the new cabal (cabal-install-3.8.0.20220526) with the above docker image and same error still
|
Thank you, I will let you know. We plan to release in a week or two, but binaries installable with ghcup should be available earlier on. I've just checked and #8232 got merged very recently, as a last minute fix, so it's not yet present in the prerelease 3.8.0.20220526, but will be in 3.8.1.0. However, you may also need a newer GHC, but I don't know the details. |
The command to install cabal 3.8.1.0 (not officially released) is ghcup --no-cache install cabal -u 'https://gitlab.haskell.org/haskell/cabal/-/jobs/1124022/artifacts/raw/out/cabal-install-3.8.1.0-x86_64-linux-alpine.tar.xz?inline=false' head |
Thanks @Mikolaj - is there an aarch64 build by chance - since this is running on a arm64 container? |
Doh, of course I meant to give you the arm64 one. Does any of these look like it may be it? https://gitlab.haskell.org/haskell/cabal/-/pipelines/55001 If so, please substitute in the invocation I gave you. |
Sadly didn't help - still getting the same error on
|
That's strange. Do the directories along the path exist? Did they exist at the time of Anyway, I'd eliminate suspects further, using GHC 9.2.3 (or even 9.2.4) instead of 8.10.7. |
I remind you that EDIT: and if error still happens with newer GHC, please report it there. |
Thanks - porting the project to a newer GHC version is what I was hoping to avoid - not sure where The directory doesn't exist before the | #19 0.298 /root/.stack |
|
BTW, does it help if you manually create |
Tried that and doesn't really help. I found this: https://gitlab.haskell.org/ghc/ghc/-/issues/17918#note_376463 As mentioned the porting of the old project to GHC 9.X isn't really something that I can (or want to do) - so was hoping to find some workaround to make it work with 8.10.7 Thanks a million for helping |
Describe the bug
cabal aka the build of any project using a binfmt-enabled runner (github-actions) fails with
To Reproduce
Steps to reproduce the behavior:
Checkout linked (Additional context below) repository and run nix-build or run commands according to github-actions log.
Expected behavior
The [cabal] build should run at least until the linker.
System information
cabal
,ghc
versions:Additional context
See here for a repository reproducing this:
https://github.com/573/aarch64-linux-ld-issue155722-reproduce/runs/5044168375?check_suite_focus=true#step:6:336
The text was updated successfully, but these errors were encountered: