[GHC] #7921: DSO linking bug in unix package
GHC
cvs-ghc at haskell.org
Mon May 20 15:12:03 CEST 2013
#7921: DSO linking bug in unix package
-------------------------------+--------------------------------------------
Reporter: SimonHengel | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries/unix
Version: 7.6.3 | Keywords:
Os: Linux | Architecture: x86_64 (amd64)
Failure: Compile-time crash | Blockedby:
Blocking: | Related:
-------------------------------+--------------------------------------------
{{{unix}}} depends on {{{libpthread}}}, but it's not listed under
{{{extra-libraries}}} in the cabal file. For that reason some programs
fail to build on Ubuntu 13.04.
Steps to reproduce:
{{{
-- Main.hs
import System.Posix.Semaphore
main :: IO ()
main = do
semUnlink "foo"
}}}
{{{
$ ghc --make Main.hs
}}}
Expected result: Program is compiled and linked.
Actual result: Liking fails with
{{{
/usr/bin/ld:
/home/foo/.install/haskell/ghc-7.6.2/lib/ghc-7.6.2/unix-2.6.0.1/libHSunix-2.6.0.1.a(Semaphore__5.o):
undefined reference to symbol 'sem_unlink@@GLIBC_2.2.5'
/usr/bin/ld: note: 'sem_unlink@@GLIBC_2.2.5' is defined in DSO /lib/x86_64
-linux-gnu/libpthread.so.0 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libpthread.so.0: could not read symbols: Invalid
operation
collect2: error: ld returned 1 exit status
}}}
This is related to
https://fedoraproject.org/wiki/UnderstandingDSOLinkChange.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7921>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list