[GHC] #10801: ghc returns ExitFailure (-4) when compiling some projects on ARM

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Unknown/Multiple Architecture: arm | Type of failure: Compile-time Test Case: compile a | crash big web project | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- I'm trying to get either yesod or scotty to build on my raspberry pi 2, which is running arch. Arch sports the newest working compiler for ghc, 7.8.2. Unfortunately llvm on arch is TOO new, and one must downgrade llvm, and the llvm downgrade packages are not available anywhere officially. I, however, happen to have these packages. These are for llvm 3.4.2-1.1. At any rate, I find I'm at an impasse with both Yesod and with Scotty. Sample output is attached. There's quite a bit of success, having compiled a lot of libraries, but it fails at the end. I thought it might be a lack of memory, so I gave it a try with a 1G swapfile as well, but that didn't help. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by Ansible): * Attachment "epic.fail" added. scotty project 'epic' fails at the link step. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by Ansible): * Attachment "yesod-form.fail" added. yesod project - fail to install library yesod-form-1.4.4.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by rwbarton): 4 is `SIGILL` (illegal instruction) so this is probably the same issue as #10375 (running a TH splice) except with a 1000x more complicated reproducer :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Ansible): could be! the weird thing is I have 7.8.2 installed on another ARM computer and I've actually been able to build my project there. Maybe its a different 7.8.2. I'm afraid to touch anything on that one and cabal hasn't been updated in 150+ days. both are running arch. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by bgamari): For the record, GHC 7.8.2 is not the newest GHC release. GHC 7.10.2 has been released and we even have an [[https://www.haskell.org/ghc/download_ghc_7_10_2#linux_armv7 ARM bindist]]. GHC 7.8.2 was still a bit shaky on ARM (really, so is 7.10.2, unfortunately). To confirm, you are using `gold` to link your binaries, right? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Ansible): I'm glad to see an arm binary for 7.10.2, but it hasn't worked for me - it fails to compile 'hello world'. I didn't know gold was recommended for 7.8.2. I followed the procedure here for enabling it: https://wiki.archlinux.org/index.php/Gold_linker "ghc --info" still reports "("ld command","/usr/bin/ld")". I guess that's normal? Is there another way to enable gold? When I had debian jessie and 7.10.2, "ghc --info" reported gold as the 'ld command'. At any rate, this is what I get for ld --version. {{{ [bburdette@alarmpi epicmeatbars]$ ld --version GNU gold (GNU Binutils 2.25.1) 1.11 Copyright (C) 2014 Free Software Foundation, Inc. }}} Unfortunately this didn't allow the link to work in my 'epic' project, but maybe it would if I recompiled everything. I'll go ahead with that and see if it helps. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Ansible): The build with gold was going ok but it got stuck on this: {{{ [bburdette@alarmpi epicmeatbars]$ cabal -j1 install stm-chans-3.0.0.4 Resolving dependencies... [1 of 1] Compiling Main ( /home/bburdette/code/stm- chans-3.0.0.4/dist/dist-sandbox-491b648e/setup/setup.hs, /home/bburdette/code/stm-chans-3.0.0.4/dist/dist-sandbox- 491b648e/setup/Main.o ) Linking /home/bburdette/code/stm-chans-3.0.0.4/dist/dist-sandbox- 491b648e/setup/setup ... /usr/local/bin/ld: error: /usr/lib/ghc-7.8.2/process-1.2.0.0/libHSprocess-1.2.0.0.a(runProcess.o): requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC /usr/local/bin/ld: error: /usr/lib/ghc-7.8.2/rts-1.0/libHSrts_thr.a(GetTime.thr_o): requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC collect2: error: ld returned 1 exit status Failed to install stm-chans-3.0.0.4 }}} I tried adding -fPIC to the stm-chan cabal, but I think it wants me to do that with process and rts. I found process-1.2.0 so I can add-source that to my sandbox with -fPIC enabled, but I don't know where rts is. I didn't see it on hackage. Maybe its part of ghc? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Ansible): ok fwiw I tried a "cabal -j1 install yesod-form-1.4.4.1" on the other project. That ended in a ExitFailure(-11) instead of -4. I didn't try to recompile everything for that though, just ran it as-is. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by rwbarton): * status: new => closed * resolution: => wontfix Comment: Oh I didn't notice earlier that this was 7.8.2. I recommend not going down this particular rabbit hole with 7.8.2 since there will not be a new release in the 7.8 line anyways (not to mention that 7.8.2 is not even the latest 7.8 release). You should try to get 7.10 working instead. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10801: ghc returns ExitFailure (-4) when compiling some projects on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: wontfix | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Compile-time | Test Case: compile a crash | big web project Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Ansible): ah. unfortunately 7.10.2 can't even compile 'hello world', much less cabal. Well it can compile 'hello world' but the resulting executable crashes. According to comments here: [https://ghc.haskell.org/trac/ghc/ticket/10375], the illegal instruction error that is currently crippling 7.10.2 has been around since at least 7.8.4. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10801#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC