Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48558 - berkdb miscompiles on amd64 (fix included).
Summary: berkdb miscompiles on amd64 (fix included).
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-21 06:28 UTC by Ryan C. Gordon
Modified: 2004-04-22 02:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan C. Gordon 2004-04-21 06:28:15 UTC
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"
Comment 1 Travis Tilley (RETIRED) gentoo-dev 2004-04-22 02:32:12 UTC
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')
Comment 2 Travis Tilley (RETIRED) gentoo-dev 2004-04-22 02:52:24 UTC
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