[GHC] #9237: GHC not recognizing "-llibrary" form in implicit linker scripts
GHC
ghc-devs at haskell.org
Wed Jun 25 12:39:15 UTC 2014
#9237: GHC not recognizing "-llibrary" form in implicit linker scripts
---------------------------------------+----------------------------------
Reporter: mmikolajczyk | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: x86_64 (amd64)
Type of failure: Compile-time crash | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
---------------------------------------+----------------------------------
Comment (by rwbarton):
I think GHC is trying to load `/usr/lib/libcurses.so` at runtime with
`dlopen`, in order to run Template Haskell code in `Data.Range.Range`.
It's not trying to link it with `ld`. So, this is a limitation of the
system `dlopen`, and we are in "workaround" territory.
(Incidentally, my `dlopen` on Debian (libc 2.18-4) doesn't seem to handle
either `INPUT(-llibrary)` or `INPUT(filename)`.)
#2615 was from when GHC used its own custom loader rather than `dlopen`.
I'm not eager to bring any of that back, but I guess we could try to
detect a linker script if `dlopen` fails.
One thing (well, two things) I don't understand is where the dependency on
`/usr/lib/libcurses.so` is coming from, and what kind of dependency it is
exactly. Who is loading `/usr/lib/libcurses.so`: does `dlopen` load
dependencies for us, or do we track them ourselves and load them first?
Maybe we can arrange things when we build the `llvm-general-3.4.2.2`
library so that the dependency is on the real shared object
`/usr/lib/libncursesw.so`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9237#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list