On 18/11/2010 11:24, Christian Maeder wrote:
Am 18.11.2010 11:12, schrieb Simon Marlow:
On 17/11/2010 14:34, Christian Maeder wrote:
ghc can be built without and with libffi.

Which build option are you referring to here?

I did not use any explicit build option, but just created a
binary-distribution from sources without having /usr/lib/libffi.

We ship GHC with a copy of libffi, you don't need it installed on your system. Indeed, GHC shouldn't ever use the installed one.

libffi is required for
FFI support in GHCi, and for FFI "wrapper" imports.  However on x86 and
x86_64 we don't normally use libffi for wrappers, because we have a
native implementation that is a bit faster (this is the
UseLibFFIForAdjustors build option).

What advantage do I gain in
the latter case? The packages that come with ghc (displayed by "ghc-pkg
dump") don't use it.

The RTS should depend on it.

"ghc-pkg describe rts" only lists:
  extra-libraries: m rt dl

$ ghc-pkg field rts depends
depends: builtin_ffi

$ ghc-pkg describe ffi
name: ffi
version: 1.0
id: builtin_ffi
...

also for the official ghc-7.0.1-i386-unknown-linux.tar.bz2 that is
linked against libffi (I hope not, unnecessarily). Does this mean that
GHCi is based on a different RTS?

That does seem strange.  My 32-bit GHC here doesn't link against libffi:

$ ldd ghc-stage2
        linux-gate.so.1 =>  (0x4001d000)
        libncurses.so.5 => /lib/libncurses.so.5 (0x40029000)
        librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x40061000)
        libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0x4006b000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x4006f000)
        libgmp.so.3 => /usr/lib/libgmp.so.3 (0x40073000)
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x400d4000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x400fa000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x40114000)
        /lib/ld-linux.so.2 (0x40000000)

Cheers,
        Simon



C.


Cheers,
     Simon


Thanks Christian


Am 16.11.2010 13:03, schrieb Christian Maeder:
http://new-www.haskell.org/ghc/dist/7.0.1/ghc-7.0.1-i386-unknown-linux.tar.bz2


./configure failed with:

checking for path to top of build tree... utils/ghc-pwd/ghc-pwd: error
while loading shared libraries: libffi.so.5: cannot open shared object
file: No such file or directory
configure: error: cannot determine current directory

ldd utils/ghc-pwd/ghc-pwd
          linux-gate.so.1 =>    (0xffffe000)
          libutil.so.1 =>   /lib/libutil.so.1 (0xb7718000)
          libdl.so.2 =>   /lib/libdl.so.2 (0xb7713000)
          libm.so.6 =>   /lib/libm.so.6 (0xb76e9000)
          libffi.so.5 =>   not found
          libgmp.so.3 =>   /usr/lib/libgmp.so.3 (0xb7693000)
          librt.so.1 =>   /lib/librt.so.1 (0xb7689000)
          libc.so.6 =>   /lib/libc.so.6 (0xb751e000)
          /lib/ld-linux.so.2 (0xb7745000)
          libpthread.so.0 =>   /lib/libpthread.so.0 (0xb7503000)

The 64Bit version works, though.

Christian


Am 16.11.2010 01:09, schrieb Ian Lynagh:
How to get it
~~~~~~~~~~~~~

The easy way is to go to the web page, which should be
self-explanatory:

          http://www.haskell.org/ghc/


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to