Berkeley DB on amd64 builds incorrectly, picking up the wrong mutex support (or no mutex support at all?). This is well-explained in a FreeBSD bug report: http://www.freebsd.org/cgi/query-pr.cgi?pr=64886 ...and the solution appears to be adding this to the ebuild's src_compile() section: if use amd64; then myconf="${myconf} --with-mutex=x86/gcc-assembly" fi I triggered this bug when trying to use subversion.tigris.org's cvs2svn.py script. Adding this to sys-libs/db/db-4.1.25_p1-r3.ebuild definitely fixes the problem here. Reproducible: Always Steps to Reproduce: Portage 2.0.50-r6 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.2-r9, 2.6.5-gentoo-r1) =============================================================== == System uname: 2.6.5-gentoo-r1 x86_64 5 Gentoo Base System version 1.4.9 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.57-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-O3 -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config / usr/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 apache apm avi berkdb crypt curl encode foomaticdb gdbm gif gpm imap imlib jpeg libg++ libwww maildir mbox mikmod motif mpeg multilib mysql ncurses nls nogcj oggvorbis opengl oss pam pdflib perl php png python quicktime readline ruby slang spell ssl tcltk tcpd truetype xml xml2 xv zlib"
i can verify that this bug certainly exists in gentoo... lv@ayanami lv $ cat bdbtest import bsddb x = bsddb.hashopen("bsddb.test") x["one"] = "1" print x x.close() x = bsddb.hashopen("bsddb.test") print x lv@ayanami lv $ python bdbtest Traceback (most recent call last): File "bdbtest", line 2, in ? x = bsddb.hashopen("bsddb.test") File "/usr/lib/python2.3/bsddb/__init__.py", line 192, in hashopen d.open(file, db.DB_HASH, flags, mode) bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- DB_ENV->dbremove: method not permitted before open')
and after adding this line, this problem is indeed fixed: lv@ayanami lv $ python bdbtest {'one': '1'} {'one': '1'} thankyou for reporting this bug. :) the fix is now in cvs, give it some time to reach rsync