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

> > 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:
> [...]
>
> Tried that patch and it seems to do the trick.

Ok, I've looked into DB even deeper and I think the following
patch should allow us to be maximum portable and still
use as fast as possible mutexes:

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 18:30:29 -0000
@@ -38,7 +38,7 @@
 Group:        Database
 License:      BSD
 Version:      %{V_version}.%{V_revision}
-Release:      20040426
+Release:      20040428

 #   package options
 %option       with_compat no
@@ -90,7 +90,13 @@
 %build
     mutex="no"
     case "%{l_platform -p}" in
-        ix86-* ) mutex="x86/gcc-assembly" ;;
+        ix86-*   ) mutex="x86/gcc-assembly"   ;;
+        ia64-*   ) mutex="ia64/gcc-assembly"  ;;
+        sparc*-* ) mutex="Sparc/gcc-assembly" ;;
+        hppa*-*  ) mutex="HPPA/gcc-assembly"  ;;
+        ppc*-*   ) mutex="PPC/gcc-assembly"   ;;
+        alpha*-* ) mutex="ALPHA/gcc-assembly" ;;
+        *        ) mutex="UNIX/fcntl"         ;;
     esac
     cd build_unix
     CC="%{l_cc}" \

In your case this now selects the ALPHA/gcc-assembly mutex in the hope
this works equally well on Tru64, but should be both portable enough and
at the same time a lot faster than the fcntl(3) fallback.

Sorry, but can you give this a try once again? If this also works,
I'll commit this to CVS.

> If this is included then I
> guess the change from:
>
> > > http://cvs.openpkg.org/chngview?cn=16152
>
> isn't needed anymore.

Yes, but it also will not hurt, I think.

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

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

Reply via email to