[Pkg-db-devel] Bug#276828: db4.0: FTBFS on amd64: No linuxthreads

Daniel Schepler Daniel Schepler <schepler@math.berkeley.edu>, 276828@bugs.debian.org
Sat, 16 Oct 2004 12:15:30 -0700


--=-=-=

Package: db4.0
Severity: important
Version: 4.0.14-2

>From my build log:

...
 fakeroot debian/rules clean
dh_testdir
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
make: *** [clean] Error 127

As the subject says, this is because amd64 doesn't have Linuxthreads
available.  I've attached a patch which lets the package build on
amd64, and incidentally also lets configure know that amd64 can use
x86/gcc-assembly mutexes.
-- 
Daniel Schepler              "Please don't disillusion me.  I
schepler@math.berkeley.edu    haven't had breakfast yet."
                                 -- Orson Scott Card

--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=db4.0.diff
Content-Description: db4.0 amd64 patch

diff -urN db4.0-4.0.14.old/debian/patches/019_no_pthreads.diff db4.0-4.0.14/debian/patches/019_no_pthreads.diff
--- db4.0-4.0.14.old/debian/patches/019_no_pthreads.diff	1970-01-01 00:00:00.000000000 +0000
+++ db4.0-4.0.14/debian/patches/019_no_pthreads.diff	2004-10-16 19:07:37.858714800 +0000
@@ -0,0 +1,23 @@
+diff -urN db-4.0.14.old/dist/aclocal/mutex.ac db-4.0.14/dist/aclocal/mutex.ac
+--- db-4.0.14.old/dist/aclocal/mutex.ac	2004-10-16 19:01:26.101175000 +0000
++++ db-4.0.14/dist/aclocal/mutex.ac	2004-10-16 19:06:39.000650219 +0000
+@@ -148,6 +148,10 @@
+ if test "$db_cv_mutex" = "posix_only"; then
+ 	AC_MSG_ERROR([unable to find POSIX mutex interfaces])
+ fi
++# Debian: force POSIX/pthreads not to be used
++case "$db_cv_mutex" in
++    POSIX/pthreads*) db_cv_mutex=no ;;
++esac
+ 
+ # msemaphore: HPPA only
+ # Try HPPA before general msem test, it needs special alignment.
+@@ -319,7 +323,7 @@
+ # 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(i386) || defined(__i386__) || defined(__amd64__) || defined(__x86_64__)
+ #if defined(__GNUC__)
+ 	exit(0);
+ #endif
diff -urN db4.0-4.0.14.old/debian/rules db4.0-4.0.14/debian/rules
--- db4.0-4.0.14.old/debian/rules	2004-10-16 19:10:29.304694573 +0000
+++ db4.0-4.0.14/debian/rules	2004-10-16 18:55:46.684503398 +0000
@@ -1,7 +1,5 @@
 #!/usr/bin/make -f
 
-export LD_ASSUME_KERNEL=2.4.24
-
 CFLAGS := -O2 -Wall -g
 CC := gcc
 PWD := $(shell pwd)

--=-=-=--