[Mono-bugs] [Bug 74651][Blo] New - FreeBSD needs -pthread linker directive, not lib ref

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 18 Apr 2005 08:53:18 -0400 (EDT)


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 flashdict@gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74651

--- shadow/74651	2005-04-18 08:53:18.000000000 -0400
+++ shadow/74651.tmp.11480	2005-04-18 08:53:18.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 74651
+Product: Mono Tasks
+Version: 0%
+OS: other
+OS Details: FreeBSD 5/6
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: Build
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: flashdict@gmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: FreeBSD  needs -pthread linker directive, not lib ref
+
+The configure options for FreeBSD thread library are currently set to -lthr.
+
+This is incorrect, and needs to be changed to the -pthread, which is a
+linker directive, and not a specific library reference, which will tell the
+FreeBSD linker to use the currently-selected thread library.
+
+This development is rather new for FreeBSD, and I was not aware of it until
+it was pointed out to me.   The reference is here:
+
+http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk?rev=1.499&content-type=text/x-cvsweb-markup
+
+Specifically, note the comment:
+
+====================================================
+Change the default value of PTHREAD_LIBS to -pthread for 5.x and
+beyond.  This avoids linking shared libraries with the thread library,
+which causes problems when trying to change from one thread library to
+another.  Instead all binaries that link to a library that uses
+threads must themselves respect PTHREAD_LIBS.
+====================================================
+
+I will attach a patch.  This is critical for an out-of-the-box FreeBSD. 
+FreeBSD is currently linking against two thread libraries, and is broken.
+
+Thanks, and regrets for any confusion this may have caused.