[Pkg-db-devel] Bug#283520: db3: removing LD_ASSUME_KERNEL=2.4.24 on amd64 needs extra patch

Goswin Brederlow Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>, 283520@bugs.debian.org
Fri, 10 Dec 2004 15:22:47 +0100


This is a multi-part MIME message sent by reportbug.

--===============8534489199181426087==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: db3
Version: 3.2.9
Followup-For: Bug #283520

Hi,

I build db3 without LD_ASSUME_KERNEL=2.4.24 on amd64 now and it
FTBFS. The reason for this is that it defaults to pthread mutexs (the
test fails with LD_ASSUME_KERNEL=2.4.24) but pthread won't be linked
into libdb3. Subsequently using libdb3 results in unresolved symbols.

Attached is a patch that moves the test for x86/gcc-assembly mutexs
before the pthread test, which is what is used with
LD_ASSUME_KERNEL=2.4.24.

It would be nice if this patch + making LD_ASSUME_KERNEL conditional
could be pushed into sarge so the unofficial sarge amd64 can release
without patches for core packages.

MfG
	Goswin

PS: If you undefine LD_ASSUME_KERNEL on i386 you get the same FTBFS in
case you want to test.

-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.8-frosties-1
Locale: LANG=en_US, LC_CTYPE=en_US

--===============8534489199181426087==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="024_no_pthread.diff"

# Patch by Goswin von Brederlow
#
# Move the test for x86/gcc-assembly mutexes before pthread so it is
# prefered. Without this pthread is suddenly used but not linked against
# if LD_ASSUME_KERNEL=2.4.24 is undefined (and amd64 needs this).
#
--- db-3.2.9/dist/aclocal/mutex.m4.orig	2004-12-10 14:06:07.000000000 +0000
+++ db-3.2.9/dist/aclocal/mutex.m4	2004-12-10 14:06:55.000000000 +0000
@@ -88,6 +88,18 @@
 fi
 
 
+dnl x86/gcc: FreeBSD, NetBSD, BSD/OS, Linux
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([main(){
+#if defined(i386) || defined(__i386__)
+#if defined(__GNUC__)
+	exit(0);
+#endif
+#endif
+	exit(1);
+}], [db_cv_mutex="x86/gcc-assembly"])
+fi
+
 dnl POSIX.1 pthreads: pthread_XXX
 dnl
 dnl Try with and without the -lpthread library.
@@ -326,18 +338,6 @@
 }], [db_cv_mutex="68K/gcc-assembly"])
 fi
 
-dnl x86/gcc: FreeBSD, NetBSD, BSD/OS, Linux
-if test "$db_cv_mutex" = no; then
-AC_TRY_RUN([main(){
-#if defined(i386) || defined(__i386__)
-#if defined(__GNUC__)
-	exit(0);
-#endif
-#endif
-	exit(1);
-}], [db_cv_mutex="x86/gcc-assembly"])
-fi
-
 dnl ia86/gcc: Linux
 if test "$db_cv_mutex" = no; then
 AC_TRY_RUN([main(){

--===============8534489199181426087==--