Opened 5 years ago

Closed 3 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:

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

comment:1 Changed 5 years ago by PHO

Cc: pho@… added

comment:2 Changed 5 years ago by pcapriotti

difficulty: Unknown
Milestone: 7.6.1

Thanks for the report.

comment:3 Changed 5 years ago by igloo

Milestone: 7.6.17.6.2

comment:4 Changed 3 years ago by darchon

Probably now fixed with #8266

comment:5 Changed 3 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:6 Changed 3 years ago by thoughtpolice

Component: libraries/baseCore Libraries
Owner: set to ekmett

Moving over to new owning component 'Core Libraries'.

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

Component: Core LibrariesCompiler
Milestone: 7.10.1

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 3 years ago by thomie

Resolution: worksforme
Status: newclosed

Actually closing.

Note: See TracTickets for help on using tickets.