[Mono-bugs] [Bug 51359][Min] New - librt shouldn't always be used for sem_init
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 24 Nov 2003 17:23:21 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by recht@netbsd.org.
http://bugzilla.ximian.com/show_bug.cgi?id=51359
--- shadow/51359 2003-11-24 17:23:20.000000000 -0500
+++ shadow/51359.tmp.11737 2003-11-24 17:23:20.000000000 -0500
@@ -0,0 +1,55 @@
+Bug#: 51359
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details: NetBSD-current
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: recht@netbsd.org
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: librt shouldn't always be used for sem_init
+
+Description of Problem:
+configure is only looking at librt for sem_init. On (at least)
+NetBSD-current and Linux it's also defined in libpthread and mono is linked
+against libpthread on these platforms anyway. So look first there.
+Idea and implementation (one liner) from Python. The original check-in
+message is here:
+
+http://mail.python.org/pipermail/patches/2003-May/012342.html
+
+Steps to reproduce the problem:
+configure && ldd
+
+Actual Results:
+linked against librt and libpthread
+
+Expected Results:
+linked against libpthread only
+
+How often does this happen?
+always
+
+Additional Information:
+
+--- configure.in.orig 2003-11-23 13:01:06.000000000 +0100
++++ configure.in 2003-11-24 23:13:19.000000000 +0100
+@@ -599,7 +599,10 @@
+ dnl ********************************
+ dnl *** Checks for semaphore lib ***
+ dnl ********************************
+- AC_CHECK_LIB(rt, sem_init, LIBS="$LIBS -lrt")
++ AC_SEARCH_LIBS(sem_init, pthread rt posix4)
++ # 'Real Time' functions on Solaris
++ # posix4 on Solaris 2.6
++ # pthread (first!) on Linux
+
+ dnl ********************************
+ dnl *** Checks for timezone stuff **