[GHC] #8713: libdl, libpthread may be unwanted too
GHC
ghc-devs at haskell.org
Wed Jan 29 13:22:09 UTC 2014
#8713: libdl, libpthread may be unwanted too
-------------------------------------+-------------------------------------
Reporter: ip1981 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/unix | Version: 7.6.3
Keywords: | Operating System: Other
Architecture: x86_64 (amd64) | Type of failure: GHC doesn't work
Difficulty: Moderate (less | at all
than a day) | Test Case:
Blocked By: | Blocking:
Related Tickets: |
-------------------------------------+-------------------------------------
I have GHC on an unusual system [1]
libdl.so.1, librt.so.1 and some others are "filter libraries": they do not
provide real functions (almost all is in libc.so.1), but to make thing
work libFOO.so are GNU ld linker scripts: thus linking is successful,
libFOO.so.1 is not linked in :-)
Unfortunately, runtime linker (ld.so.1) does not understand GNU ld linker
scripts. And I get errors like this:
{{{
# ghci -package unix
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package old-locale-1.0.0.5 ... linking ... done.
Loading package time-1.4.0.1 ... linking ... done.
Loading package unix-2.7.0.0 ... <command line>: can't load .so/.DLL for:
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/libdl.so
(ld.so.1: ghc: fatal: /usr/lib/gcc/x86_64-pc-
solaris2.11/4.7/../../../x86_64-illumos/libdl.so: unknown file type)
}}}
The unix package v2.6 had the same issue with librt.so too, in version 2.7
libdl.so remains.
I use the attached patch for GHC 7.6.3 to fix this issue.
In general I suggest to use AC_SEARCH_LIBS instead of AC_CHECK_LIB
[1] http://osdyson.org
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8713>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list