Opened 2 years ago

Last modified 2 months ago

#5982 new bug

Incorrect dynamic library name in OSX

Reported by: r0ml Owned by:
Priority: normal Milestone: 7.6.2
Component: libraries/base Version: 7.4.1
Keywords: Cc: pho@…
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: Runtime crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

When building a simple program that is built using -dynamic, the resulting executable fails with the following error:

/Users/ian/zz64/ghc-7.4.1/libffi/build/inst/lib/libffi.5.dylib

Referenced from: /usr/local/lib/ghc-7.4.1/libHSrts-ghc7.4.1.dylib
Reason: image not found

[1] 90849 trace trap

The workaround in this case is to execute the following two commands:

otool -id /usr/local/lib/ghc-7.4.1/libffi.dylib /usr/local/lib/ghc-7.4.1/libffi.dylib

install_name_tool /usr/local/lib/ghc-7.4.1/libHSrts-ghc7.4.1.dylib -change /Users/ian/zz64/ghc-7.4.1/libffi/build/inst/lib/libffi.5.dylib /usr/local/lib/ghc-7.4.1/libffi.dylib

which is to say that the library at /usr/local/lib/ghc-7.4.1/libffi.dylib is identified as being /Users/ian/zz64/ghc-7.4.1/libffi/build/inst/lib/libffi.5.dylib which causes the linker to fail.

Change History (4)

comment:1 Changed 2 years ago by PHO

  • Cc pho@… added

comment:2 Changed 22 months ago by pcapriotti

  • Difficulty set to Unknown
  • Milestone set to 7.6.1

Thanks for the report.

comment:3 Changed 20 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:4 Changed 2 months ago by darchon

Probably now fixed with #8266

Note: See TracTickets for help on using tickets.