Skip to content

GHC static libraries are not position independent in OSX

GHC static libraries are not built position-independent in OSX, which prevents the user from developing creating dynamic libraries and bundles with Haskell code.

GHC should try to build its libraries with -fPIC in the architectures which admit it.

Here is an example in OSX 10.3/ppc with GHC6.6 (built by macports)

echo "module Foo where" > Foo.hs ghc -no-hs-main -optl -bundle -fPIC -o Foo.bundle Foo.hs ld: /opt/local/lib/ghc-6.6/libHSbase.a(.o::Pack(void)) has local relocation entries in non-writable section

Trac metadata
Trac field Value
Version 6.6
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information