[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#625355: opensp: openjade1.3 causes FTBFS on hurd-i386



clone 625355 -1
reassign -1 openjade1.3
tags -1 + patch
thanks

Errgl, things got completely mangled with bugs. Let's fix this.

Samuel Thibault, le Fri 19 Aug 2011 13:10:18 +0200, a écrit :
> Samuel Thibault, le Fri 19 Aug 2011 12:34:44 +0200, a écrit :
> > Svante Signell, le Fri 19 Aug 2011 12:32:13 +0200, a écrit :
> > > Currently opensp does not compile on GNU/Hurd.
> > 
> > What is the *actual* error?
> 
> Ok, in a private mail you told me it's the same as we have already seen:
> the pthread assertion issue.
> 
> Now that I realized that I didn't get the issue simply because I had
> openjade already installed (and not openjade1.3), I've found the actual
> issue:
> 
> $ objdump -x /usr/bin/openjade | grep NEED
>   NEEDED               libthreads.so.0.3
>   NEEDED               libosp.so.5
>   NEEDED               libpthread.so.0.3
>   NEEDED               libnsl.so.1
>   NEEDED               libstdc++.so.6
>   NEEDED               libm.so.6
>   NEEDED               libgcc_s.so.1
>   NEEDED               libc.so.0.3
>   VERNEED              0x08051a94
>   VERNEEDNUM           0x00000005
> 
> That is, openjade links against both libthreads and libpthread. libc
> thus only early-initializes one, which is libthreads, thus pthread
> assertion issues due to missing pthread initialization. The most forward
> way to fix it is to just drop libthread use from openjade, as attached
> patch does (along with an autoconf run of course).
> 
> Samuel
--- config/configure.in.orig	2011-08-19 12:46:11.000000000 +0000
+++ config/configure.in	2011-08-19 12:46:41.000000000 +0000
@@ -172,8 +172,14 @@
 
 dnl
 dnl Check for thread support.
-AC_CHECK_LIB(threads,cthread_fork,LIB_THREADS="-lthreads",LIB_THREADS="")
-AC_SUBST(LIB_THREADS)
+case "${host}" in
+  *-*-gnu*)
+    ;;
+  *)
+    AC_CHECK_LIB(threads,cthread_fork,LIB_THREADS="-lthreads",LIB_THREADS="")
+    AC_SUBST(LIB_THREADS)
+    ;;
+esac
 
 dnl
 dnl Check if type of size_t is unsigned int
--- spgrove/threads.h.orig	2011-08-19 12:47:12.000000000 +0000
+++ spgrove/threads.h	2011-08-19 12:47:22.000000000 +0000
@@ -141,7 +141,7 @@
 
 #endif /* _MSC_VER && _MT */
 
-#if ((defined __MACH__) && !(defined __APPLE__)) || (defined __GNU__)
+#if ((defined __MACH__) && !(defined __APPLE__) && !(defined __GNU__))
 
 // For Mach, using C Threads. May or may not work as-is on your Mach-based OS.
 // Written by Raf Schietekat <RfSchtkt@maze.ruca.ua.ac.be> on 1996-11-10.

Reply to: