[GHC] #8896: ghci fails on Arm - "Illegal instruction"

#8896: ghci fails on Arm - "Illegal instruction" ----------------------------+------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Keywords: arm ghci | Operating System: Linux Architecture: arm | Type of failure: GHCi crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ----------------------------+------------------------------- With the help of qemu compiled ghc 7.8.1-rc2 for raspberry pi. Ghc is successful, and ghci compiles, but ghci gets an 'Illegal instruction' error. A sample session: ccrma@satellite:~$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.0.20140228 ccrma@satellite:~$ ghci --version The Glorious Glasgow Haskell Compilation System, version 7.8.0.20140228 ccrma@satellite:~$ ghci GHCi, version 7.8.0.20140228: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... Illegal instruction ccrma@satellite:~$ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------+----------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------+----------------------------- Comment (by Ansible): If its helpful, I have ghc 7.8.1-rc2 compiled and can make it available to anyone who wants to work on this. It took me about 4 days to compile it for the PI, so its a significant undertaking. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------+----------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------+----------------------------- Comment (by nomeata): I’m surprised you get different results than I get compiling on Debian (https://buildd.debian.org/status/fetch.php?pkg=ghc&arch=armel&ver=7.8.20140228-1&stamp=1394495564 and https://buildd.debian.org/status/fetch.php?pkg=ghc&arch=armhf&ver=7.8.20140228-1&stamp=1394723755) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------+----------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------+----------------------------- Comment (by Ansible): Is that on the PI? I compiled using qemu instead of a real PI, and I used a 2G ram disk for swap. Without the swap the compile would not complete, nor would "cabal install cabal-install". Here's my build on the PI: https://dl.dropboxusercontent.com/u/80409492/ghc-7.8.1-rc2.zip and here's my .cabal folder. Compiling cabal-install also required the ram disk. https://dl.dropboxusercontent.com/u/80409492/pi_7.8.1-rc2-.cabal.zip And this is the distro I was using: https://ccrma.stanford.edu/~eberdahl/Satellite/ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------+----------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------+----------------------------- Comment (by nomeata):
Is that on the PI?
No, on some other arm machine that happens to auto-build the Debian packages. I find the high number of different failure possibilities on arm this late in the release process worrying :-( -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------+----------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------+----------------------------- Comment (by AriePeterson): Replying to [comment:3 Ansible]:
Here's my build of ghc on the PI: [...]
For reference, I tried to use your build on my rpi, under Raspbian, with some success. Ghci doesn't work though (the illegal instruction error even occurs one package earlier, when linking integer-gmp). I compiled quite a few packages succesfully. However, installing vector-0.10.9.1 fails: when compiling the module Data.Vector.Fusion.Stream.Monadic, ghc tries to link in the integer-gmp package, and this fails. This reminds me of #8212. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------+----------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------+----------------------------- Comment (by Ansible): Well glad you've gotten some use out of it, even if its not 100% success. FWIW I've been able to use 7.6.3 under Arch linux on a 'wandboard' arm computer, and there ghci works. I didn't build ghc there, just installed it with pacman. I might give 7.8 a try on that machine, since it should be able to compile it (2G ram). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------------+------------------------------ Reporter: Ansible | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: GHCi | Version: 7.8.1-rc2 Resolution: | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------ Changes (by thomie): * cc: hvr (added) * status: new => infoneeded * component: Compiler => GHCi Comment: @Ansible is this still a problem? Have you tried with 7.8.3? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------------+------------------------------ Reporter: Ansible | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: GHCi | Version: 7.8.1-rc2 Resolution: | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------ Comment (by Ansible): I have not tried 7.8 lately on the PI. I don't know when I'll get back to that, it took me quite a while (days) to compile and I'm no longer developing a haskell project on it. I will give it a try when I get a chance though, on the pcduino perhaps where I can compile ghc on the device itself. Currently ghci does not work on the pcduino, but then its not running 7.8.3 either. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: GHCi | Version: 7.8.1-rc2 Resolution: | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------+------------------------------------- Comment (by Ansible): Installed today on a banana pi running arch. Ghci works there. Maybe its the version of llvm. {{{ [root@lemaker bananapi]# pacman -Q llvm llvm 3.5.1-1 [root@lemaker bananapi]# ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.2 [root@lemaker bananapi]# ghci GHCi, version 7.8.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> 1 + 1 2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8896: ghci fails on Arm - "Illegal instruction" -------------------------------+------------------------------------ Reporter: Ansible | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: GHCi | Version: 7.8.1-rc2 Resolution: worksforme | Keywords: arm ghci Operating System: Linux | Architecture: arm Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------+------------------------------------ Changes (by thomie): * status: infoneeded => closed * resolution: => worksforme Comment: Replying to [comment:9 Ansible]:
Installed today on a banana pi running arch. Ghci works there. Maybe its the version of llvm.
Please reopen if you're still having problems. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8896#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC