Bug 839473 - llvm-3.1 missing ghc ARM support: causing all compiled programs to segfault
llvm-3.1 missing ghc ARM support: causing all compiled programs to segfault
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: llvm (Show other bugs)
rawhide
arm Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Michel Alexandre Salim
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-12 00:53 EDT by Jens Petersen
Modified: 2012-07-14 13:33 EDT (History)
5 users (show)

See Also:
Fixed In Version: llvm-3.1-7.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-14 13:33:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
regenerated ocaml patch (4.76 KB, patch)
2012-07-12 05:14 EDT, Peter Robinson
no flags Details | Diff

  None (edit)
Description Jens Petersen 2012-07-12 00:53:12 EDT
Description of problem:
Apparently somehow llvm-3.1 is missing the ghc ARM support
that was merged into llvm-3.0.  Presumably an upstream mistake.
Anyway I think we need to patch llvm-3.1 for ARM if we want
have functioning ghc in F18 ARM.  Currently Haskell programs linked
with llvm-3.1 segfault very early on.

How reproducible:
100%

Steps to Reproduce:
1. try to build any ghc-* package with f18 arm
2. minimal testcase:
$ cat > hello.hs
main = putStrLn "hello"
$ ghc --make hello.hs
$ ./hello
  
Actual results:
Segfault!

Expected results:
no segfaults

Additional info:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-June/051119.html
Comment 1 Jens Petersen 2012-07-12 01:09:37 EDT
Just to confirm: reverting to llvm-3.0-13.fc18 fixes the ARM segfaults.
Comment 2 Jens Petersen 2012-07-12 02:19:25 EDT
According to the mail the original llvm-3.0 patch should work also for 3.1:

http://lists.cs.uiuc.edu/pipermail/llvmdev/attachments/20111014/844ce355/attachment.pl
Comment 3 Peter Robinson 2012-07-12 05:14:08 EDT
Referenced patch didn't apply cleanly on ARM. There was another one attached to the original email post that was much closer.

http://lists.cs.uiuc.edu/pipermail/llvmdev/attachments/20120624/891b3ca2/attachment-0001.pl

It needed one section manually applied so the attched patch I think is good.

The following is a scratch build if someone could test that is fixes the problem I'll push the change I have in my local git and build it properly.

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=959544
Comment 4 Peter Robinson 2012-07-12 05:14:59 EDT
Created attachment 597745 [details]
regenerated ocaml patch
Comment 5 Peter Robinson 2012-07-12 05:37:48 EDT
This is the build 

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=959567
Comment 6 Jens Petersen 2012-07-12 05:44:42 EDT
Thanks Peter for working on this.  I will try to test your build.
Comment 7 Jens Petersen 2012-07-12 21:20:50 EDT
(In reply to comment #5)
> This is the build 
> http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=959567

I successfully tested it on armv5tel and it fixes the ghc segfaults
so looks good to me (tested both hello.hs and building the hscolour
package in mock).

I can try to test armv7hl later using the koji static repo
(the arm rawhide seems to have some perl breakage today.)

Note You need to log in before you can comment on or make changes to this bug.