Ticket #3179 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

Linking unix package fails

Reported by: eelco Owned by:
Priority: normal Milestone: 6.12.1
Component: libraries/unix Version: 6.10.2
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I just built GHC 6.10.2 from scratch on a Debian 4.0 machine. Everything seems to go well. But, when 'cabal-install'ing happstack-data, I'll get the following error:

Loading package unix-2.3.2.0 ... <command line>: can't load .so/.DLL for: 
rt (/usr/lib/librt.so: symbol __librt_multiple_threads, version GLIBC_PRIVATE 
not defined in file libc.so.6 with link time reference)

Change History

  Changed 4 years ago by antonvs

I ran into this exact error with GHC 6.10.3 on Debian 4.0, when trying to configure happstack with "runhaskell Setup.hs configure".

There's a thread here which sheds more light on the problem:

 http://www.mail-archive.com/cvs-ghc@haskell.org/msg13274.html

I attempted to use the workaround described in that thread, symlinking /usr/lib/librt.so to /lib/tls/librt.so.1, but then ran into other problems, e.g. doing "cabal install time" gave the following error:

/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/librt.so: undefined reference to `__pthread_unwind@GLIBC_PRIVATE

However, I didn't rebuild GHC after changing the symlink (don't currently have time to experiment like that), so that may have been part of the problem. I've reverted to GHC 6.10.1, which doesn't have this problem.

  Changed 4 years ago by igloo

  • difficulty set to Unknown
  • milestone set to 6.12.1

If anyone has a standalone testcase for this bug, then that would be handy.

in reply to: ↑ description   Changed 4 years ago by dufflebunk

The problem may be caused by glibc and your kernel not agreeing on using NPTL or non-NPTL threads. If you set an env var

LD_ASSUME_KERNEL=2.4.1

It should tell the system to use the non-NPTL linuxthread libraries. That gets rid of the librt error for me... although I get another error about not being able to get the version of GHC. I don't know that the new error is related to this bug.

  Changed 4 years ago by igloo

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

This looks like it is some kernel/libc mismatch, and thus not a GHC bug. If you disagree, please re-open this ticket.

Note: See TracTickets for help on using tickets.