Opened 5 years ago

Closed 2 years ago

#5982 closed bug (worksforme)

Incorrect dynamic library name in OSX

Reported by: r0ml Owned by: ekmett
Priority: normal Milestone:
Component: Compiler Version: 7.4.1
Keywords: Cc: pho@…
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: Runtime crash Test Case:
Blocked By: Blocking:
Related Tickets: #8266 Differential Rev(s):
Wiki Page:


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


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 (8)

comment:1 Changed 5 years ago by PHO

  • Cc pho@… added

comment:2 Changed 4 years ago by pcapriotti

  • difficulty set to Unknown
  • Milestone set to 7.6.1

Thanks for the report.

comment:3 Changed 4 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:4 follow-up: Changed 3 years ago by darchon

Probably now fixed with #8266

comment:5 Changed 2 years ago by thoughtpolice

  • Milestone changed from 7.6.2 to 7.10.1

Moving to 7.10.1.

comment:6 Changed 2 years ago by thoughtpolice

  • Component changed from libraries/base to Core Libraries
  • Owner set to ekmett

Moving over to new owning component 'Core Libraries'.

comment:7 in reply to: ↑ 4 Changed 2 years ago by thomie

  • Component changed from Core Libraries to Compiler
  • Milestone 7.10.1 deleted

Probably now fixed with #8266

Dynamic linking has been much improved on OS X. But please re-open if there is still an issue.

comment:8 Changed 2 years ago by thomie

  • Resolution set to worksforme
  • Status changed from new to closed

Actually closing.

Note: See TracTickets for help on using tickets.