[Haskell-cafe] Building a shared library with FFI on x86_64

Henk-Jan van Tuyl hjgtuyl at chello.nl
Thu Jan 27 23:47:15 CET 2011


On Thu, 27 Jan 2011 20:59:06 +0100, Eric Webster <ew at uw.edu> wrote:

> I have a project that involves building a shared library containing code
> generated by GHC and exposed using the foreign function interface to
> other C programs that link against it. I'm able to build a functioning
> library without issue on 32bit x86 systems using GHC 6.8.2 and 6.12.3.
> When I try to build on a 64bit x86 system I get a relocation error that
> advises I include -fPIC. Including -fPIC does not help though. I'm
> wondering if I'm either doing something wrong or if this could be a
> problem with GHC.

I found your problem described at
   http://ubuntuforums.org/showthread.php?t=643081
and
   http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3

Regards,
Henk-Jan van Tuyl


-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--



More information about the Haskell-Cafe mailing list