Bug 313211 (MONO51359) - librt shouldn't always be used for sem_init
Summary: librt shouldn't always be used for sem_init
Status: RESOLVED FIXED
Alias: MONO51359
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: build
Depends on:
Blocks:
 
Reported: 2003-11-25 00:23 UTC by Marc Recht
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:20:09 UTC


---- Reported by recht@netbsd.org 2003-11-24 17:23:19 MST ----

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 **



---- Additional Comments From vargaz@freemail.hu 2003-11-26 10:40:04 MST ----

Fixed in CVS.


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>NetBSD-current</cf_op_sys_details>
Unknown operating system other. Setting to default OS "Other".