FS#54920 - [ghc] ghc --make fails to link due to incorrect dynamic libHSbase name

Attached to Project: Community Packages
Opened by Aaron Plattner (aaronp24) - Monday, 24 July 2017, 16:17 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 24 July 2017, 16:20 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Try to build a Haskell program with "ghc --make". If ghc-static is not installed, then the link step fails. If ghc-static is installed, then the link step succeeds but uses static libraries.

Additional info:
* Tested with ghc-8.0.2-3-x86_64
* The problem is that the link step uses -lHSbase-4.9.1.0, but the library is named libHSbase-4.9.1.0-ghc8.0.2.so (note the "-ghc8.0.2" suffix)

Steps to reproduce:
* echo 'main = putStrLn "Hi"' > test.hs
* ghc --make test

Fails with:
[1 of 1] Compiling Main ( test.hs, test.o )
Linking test ...
/usr/sbin/ld: cannot find -lHSbase-4.9.1.0
/usr/sbin/ld: cannot find -lHSinteger-gmp-1.0.0.1
/usr/sbin/ld: cannot find -lHSghc-prim-0.5.0.0
/usr/sbin/ld: cannot find -lHSrts
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 24 July 2017, 16:20 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#54591   FS#54597 

Loading...