Ticket #3930 (closed bug: wontfix)

Opened 3 years ago

Last modified 3 years ago

ghci does not consider library-dirs of dependent packages for dlopen()

Reported by: duncan Owned by:
Priority: high Milestone: 6.12.3
Component: Package system Version: 6.10.4
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: Other Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

On OSX, when ghci loads a package (eg ghci -package gtk) it uses dlopen on the .dynlib files specified in the package registration. However it appears to look only in the library-dirs of the package itself and not of the dependent packages.

This shows up with gtk2hs on OSX when the glib and gtk C libs are in a non-standard location (/opt/local/lib). The glib package registration file uses library-dirs: /opt/local/lib and the gtk package depend on the glib package. The gtk package requires the C lib libgthread-2.0.dynlib. This exists in /opt/local/lib however when loading the gtk package in ghci, it does not look in /opt/local/lib. It only does so if we modify the gtk registration file to specify library-dirs: /opt/local/lib.

This behaviour of not using the lib dirs of dependent packages is inconsistent with the static linking case. I suspect this bad behaviour is specific to OSX, because I think this has always worked in the gtk2hs windows installers.

Change History

Changed 3 years ago by igloo

  • priority changed from normal to high
  • milestone set to 6.12.3

Changed 3 years ago by simonmar

  • status changed from new to closed
  • resolution set to wontfix

After talking to Duncan about this, we agreed that all extra-libraries should be found either on the search path or on the package's library-dirs. I've opened a new ticket for ghc-pkg to check this: #4048.

Note: See TracTickets for help on using tickets.