[GHC] #8713: Avoid libraries if unneeded (librt, libdl, libpthread)
GHC
ghc-devs at haskell.org
Tue Aug 19 18:38:30 UTC 2014
#8713: Avoid libraries if unneeded (librt, libdl, libpthread)
-------------------------------------+-------------------------------------
Reporter: ip1981 | Owner:
Type: bug | Status: upstream
Priority: normal | Milestone:
Component: GHCi | Version: 7.6.3
Resolution: | Keywords:
Operating System: Other | Architecture: x86_64 (amd64)
Type of failure: GHCi crash | Difficulty: Moderate (less
Test Case: | than a day)
Blocking: | Blocked By:
Differential Revisions: | Related Tickets:
-------------------------------------+-------------------------------------
Comment (by ip1981):
Hi, this changes won't affect solaris. The patch make GHC only check
whether we need libdl or libpthread. If not it will not load them. On
Solaris libdl is a filter library. It exists only for backward
compatibility. dlopen() function really is not even in libc, but in
runtime linker ld.so.
As for Dyson hack:
I use GNU binutils.
I had linker (GNU ld) problems when linking filter libraries, e. g.
symbols versions mismach or so, can't remember. In come cases I was not
able to link libpthread.so or librt.so. But on Solaris, illumos and Dyson
I don't need to, because all functions are in libc (ld.so)
Unfortunately, many (== almost all ;-) packages does not check whether
they need these libraries, some of packages link them unconditionally, e.
g. gcc -ldl -lpthread, etc.
So instead of using real symlinks like libdl.so -> libdl.so.1, I made
libdl.so be a file with [GNU] linker script with does nothing. Thus every
package is happy finding these libs, and I don't have linking errors.
In the ideal world GHC should load real library, not a developer symlink,
e. i. libdl.so.1 instead of just libdl.so.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8713#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list