Opened 5 years ago

Last modified 19 months ago

#3509 new bug

libffi.so not found on Mac OS X (10.5.8)

Reported by: mwotton Owned by:
Priority: lowest Milestone: 7.6.2
Component: Build System Version: 6.11
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo)

building with dynamic libraries on Mac OS X dies with an error about libffi.so

To reproduce:

add a build.mk with "GhcLibWays = v  dyn"
sh boot && ./configure --enable-shared && make

If I copy one of the libffi*dylib files that does appear to have been built correctly to libffi.so, the build proceeds but then loops in the build process.

partial trace:

(cd .libs && rm -f libffi.5.dylib && cp -p libffi.5.0.9.dylib libffi.5.dylib)
(cd .libs && rm -f libffi.dylib && cp -p libffi.5.0.9.dylib libffi.dylib)
ar cru .libs/libffi.a  src/debug.o src/prep_cif.o src/types.o src/raw_api.o src/java_raw_api.o src/closures.o src/x86/ffi.o src/x86/darwin.o src/x86/ffi64.o src/x86/darwin64.o
"inplace/bin/mkdirhier" inplace/lib/
"cp" -p utils/hsc2hs/dist/build/tmp/hsc2hs inplace/lib/hsc2hs
ranlib: file: .libs/libffi.a(ffi64.o) has no symbols
ranlib: file: .libs/libffi.a(darwin64.o) has no symbolstouch inplace/lib/hsc2hs

ranlib .libs/libffi.a
ranlib: file: .libs/libffi.a(ffi64.o) has no symbols
ranlib: file: .libs/libffi.a(darwin64.o) has no symbols
creating libffi.la
(cd .libs && rm -f libffi.la && cp -p ../libffi.la libffi.la)
/bin/sh ./libtool --tag=CC   --mode=link gcc -Wall -g -fexceptions -w  -w -o libffi_convenience.la  src/debug.lo src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo     src/x86/ffi.lo src/x86/darwin.lo src/x86/ffi64.lo src/x86/darwin64.lo                    
ar cru .libs/libffi_convenience.a src/.libs/debug.o src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/darwin.o src/x86/.libs/ffi64.o src/x86/.libs/darwin64.o
ranlib: file: .libs/libffi_convenience.a(ffi64.o) has no symbols
ranlib: file: .libs/libffi_convenience.a(darwin64.o) has no symbols
ranlib .libs/libffi_convenience.a
ranlib: file: .libs/libffi_convenience.a(ffi64.o) has no symbols
ranlib: file: .libs/libffi_convenience.a(darwin64.o) has no symbols
creating libffi_convenience.la
(cd .libs && rm -f libffi_convenience.la && cp -p ../libffi_convenience.la libffi_convenience.la)
make[4]: Leaving directory `/Users/mwotton/projects/ghc/libffi/build'
make[3]: Leaving directory `/Users/mwotton/projects/ghc/libffi/build'
cp .libs/libffi.5.0.9.dylib /Users/mwotton/projects/ghc/libffi/libffi.5.0.9.dylib
(cd /Users/mwotton/projects/ghc/libffi && { cp -p -f libffi.5.0.9.dylib libffi.5.dylib || { rm -f libffi.5.dylib && cp -p libffi.5.0.9.dylib libffi.5.dylib; }; })
(cd /Users/mwotton/projects/ghc/libffi && { cp -p -f libffi.5.0.9.dylib libffi.dylib || { rm -f libffi.dylib && cp -p libffi.5.0.9.dylib libffi.dylib; }; })
cp .libs/libffi.lai /Users/mwotton/projects/ghc/libffi/libffi.la
cp .libs/libffi.a /Users/mwotton/projects/ghc/libffi/libffi.a
chmod 644 /Users/mwotton/projects/ghc/libffi/libffi.a
ranlib /Users/mwotton/projects/ghc/libffi/libffi.a
ranlib: file: /Users/mwotton/projects/ghc/libffi/libffi.a(ffi64.o) has no symbols
ranlib: file: /Users/mwotton/projects/ghc/libffi/libffi.a(darwin64.o) has no symbols
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
touch libffi/stamp.ffi.build-shared
"cp" libffi/libffi.a libffi/libHSffi.a
"cp" libffi/libffi.so libffi/libHSffi-ghc6.11.20090913.dylib
"cp" libffi/libffi.a libffi/libHSffi_p.a
cp: libffi/libffi.so: No such file or directory
make[1]: *** [libffi/libHSffi-ghc6.11.20090913.dylib] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
nice make -j 2  145.90s user 70.38s system 78% cpu 4:37.08 total

Attachments (1)

dylib.patch (203 bytes) - added by mwotton 5 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 5 years ago by mwotton

that patch fixes it, it seems.

Changed 5 years ago by mwotton

comment:2 Changed 5 years ago by mwotton

but it breaks it for linux.

comment:3 Changed 5 years ago by igloo

  • Description modified (diff)
  • Difficulty set to Unknown
  • Milestone set to 6.12 branch

Thanks for the report

comment:4 Changed 4 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:5 Changed 4 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:6 Changed 3 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:7 Changed 3 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:8 Changed 3 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:9 Changed 2 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:10 Changed 19 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2
Note: See TracTickets for help on using tickets.