On Wed, Apr 28, 2004, Karl Vogel wrote:

> Build of subversion fails because apr-util can't find a suitable Berkeley
> DB. This is caused by Berkeley DB needing pthreads on Tru64:
>
> http://cvs.openpkg.org/chngview?cn=16152
>
> Therefor everything that links to libdb.a also requires pthreads. apr-util
> however doesn't know this, which makes the following configure check fail:
>
> configure:19350: checking for -ldb
> configure:19411: /usr/users/kvo/openpkg/dev/bin/cc -o conftest -O2
> -I/usr/users/kvo/openpkg/dev/include/libxml2
> -I/usr/users/kvo/openpkg/dev/include   -DOSF1
> -L/usr/users/kvo/openpkg/dev/lib   conftest.c  -ldb 1>&5
> pthread_mutexattr_init
> pthread_mutexattr_destroy
> pthread_condattr_init
> pthread_condattr_destroy
> pthread_mutexattr_setpshared
> pthread_condattr_setpshared
> collect2: ld returned 1 exit status
> configure: failed program was:
> #line 19370 "configure"
> #include "confdefs.h"
>
> #include <stdio.h>
> #include <db.h>
> main ()
> {
>   int major, minor, patch;
>
>   db_version(&major, &minor, &patch);
>
>   /* Sanity check: ensure that db.h constants actually match the db library
> */
>   if (major != DB_VERSION_MAJOR
>       || minor != DB_VERSION_MINOR
>       || patch != DB_VERSION_PATCH)
>     exit (1);
>
>   /* Run-time check:  ensure the library claims to be the correct version.
> */
> [...]
>
> Adding -lpthread (or -pthread) to the compile line, makes this test succeed.
>
> Now for the difficult part.. any suggestions on how to resolve this? (not
> just for subversion but for all packages depending on Berkeley DB?
> pkg-config comes to mind... does openpkg have something similar ?!?!?)

Berkeley-DB can be told to use different types of mutexes. The default
on Tru64 seems to be Pthread API based. Look into db.spec: we for
instance force the use of x86/gcc-assembly mutexes on the usual Intel
platforms to avoid Pthread API dependencies under FreeBSD, Linux
and Solaris/x86. In openpkg.spec we go even further: we enforce the
UNIX/fcntl mutex variant which is available really everywhere. I
recommend you to try in db.spec a check for Tru64 where you enforce
mutex="UNIX/fcntl". Check whether this works as expected...

If yes, I think we should even use the following non-Tru64 related patch:

Index: db.spec
===================================================================
RCS file: /e/openpkg/cvs/openpkg-src/db/db.spec,v
retrieving revision 1.44
diff -u -d -u -d -u -d -r1.44 db.spec
--- db.spec     26 Apr 2004 08:59:43 -0000      1.44
+++ db.spec     28 Apr 2004 16:39:26 -0000
@@ -91,6 +91,7 @@
     mutex="no"
     case "%{l_platform -p}" in
         ix86-* ) mutex="x86/gcc-assembly" ;;
+        *      ) mutex="UNIX/fcntl"       ;;
     esac
     cd build_unix
     CC="%{l_cc}" \

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to