Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68132 - cl-elephant ebuild problem
Summary: cl-elephant ebuild problem
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Lisp Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-19 04:13 UTC by ejohnson
Modified: 2004-10-20 10:08 UTC (History)
0 users

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


Attachments
A patch made from the original elephant-2.1.tar.gz Makefile (Makefile.patch,271 bytes, patch)
2004-10-19 04:16 UTC, ejohnson
Details | Diff
A path made from the original elephant-2.1.tar.gz sleepcat.lisp (sleepycat.patch,717 bytes, patch)
2004-10-19 04:21 UTC, ejohnson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ejohnson 2004-10-19 04:13:31 UTC
elephant's c components build incorrectly.  The libdb-4.2.so and libpthread.so.0 info was removed from sleepycat.lisp by the gentoo patch.

here's an example so you can test for yourself:

bash> mkdir "test"
bash> sbcl
* (require 'elephant)
<snip>
NIL
* (ele:open-store "test")
<get dropped to the debugger>

open-store is of course the method of opening the db.  It should take 1 or more arguments and I've run into this error when I first built elephant by hand.  The  fix then and now is to alter the sleepycat.lisp file and change the Makefile location for the BerkleyDB's dir.

I've included two patches, one for sleepycat and the other for Makefile.  They are patches against the original elephant-2.1.tar.gz

Reproducible: Always
Steps to Reproduce:
1.emerge elephant
2.run a lisp implementation (I used sbcl)
3.(require 'elephant) and try to open the BerkleyDB store

Actual Results:  
An error is generated and the repl drops down to the debugger.

Expected Results:  
well opened the store so that entrys can be added

I run a threaded SBCL-0.8.15

Gentoo Base System version 1.4.16
Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.6.8.1-mm3)
=================================================================
System uname: 2.6.8.1-mm3 i686 AMD Athlon(tm)
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fforce-addr -fomit-frame-pointer
-falign-functions=4 -funroll-loops -ftracer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fforce-addr -fomit-frame-pointer
-falign-functions=4 -funroll-loops -ftracer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib alsa apm avi berkdb bitmap-fonts cdr crypt divx4linux dvd
dvdr encode esd f77 fbcon fbdev foomaticdb gdbm gif gnome gpm gtk gtk2 imlib
jpeg leim libcaca libg+libwww live mad mikmod mmx motif mpeg ncurses nls nptl
oggvorbis opengl oss pam pdflib perl pic png python quicktime readline sdl slang
sndfile spell sse ssl tcltk tcpd threads tiff truetype x86 xml2 xmms xprint xv
xvid zlib"
Comment 1 ejohnson 2004-10-19 04:16:31 UTC
Created attachment 42156 [details, diff]
A patch made from the original elephant-2.1.tar.gz Makefile

The change here is to alter BD42DIR=/usr/local/BerkeleyDB.4.2 to BD42DIR=/usr
Comment 2 ejohnson 2004-10-19 04:21:41 UTC
Created attachment 42157 [details, diff]
A path made from the original elephant-2.1.tar.gz sleepcat.lisp

The gentoo patch removes quite a bit of this info because I'm guessing that
these files are in $PATH, so this patch is really bullshit, but works.
Comment 3 Sven Wegener gentoo-dev 2004-10-19 06:26:07 UTC
common-lisp herd maintainers please consider creating a bugzilla user for your common-lisp@g.o address
Comment 4 Matthew Kennedy (RETIRED) gentoo-dev 2004-10-20 10:08:40 UTC
Thanks for providing such a detailed report.  I looked over the
Makefile and made some changes.  I set BD42DIR=/usr and replaced -ldb
with the more explicit -ldb-4.2.  These changes alone seem to fix the
problem.

$ sbcl --noinform
CL-USER(1): (require :elephant)
; loading system definition from #P"/usr/share/common-lisp/systems/uffi.asd"
; into #<PACKAGE "ASDF3958">
; registering #<SYSTEM UFFI {904B059}> as UFFI
NIL
CL-USER(2): (ele:open-store "elephant")
#<ELEPHANT:STORE-CONTROLLER {96B2259}>
CL-USER(3): (ele:add-to-root "key" "value")
"value"
CL-USER(4): (ele:get-from-root "key")
"value"
T
CL-USER(5): (ele:controller-root ele:*store-controller*)
#<ELEPHANT:BTREE {974AD29}>
CL-USER(6): (ele:close-store)
NIL
CL-USER(7): (quit)

I looked at the load foreign library changes and I have to confess, I
don't see why libdb-4.2, libpthread etc. need to be loaded explicitly
since everything necessary is already linked with libsleepycat.so from
the Makefile.

$ ldd /usr/lib/elephant/libsleepycat.so
        linux-gate.so.1 =>  (0xffffe000)
        libdb-4.2.so => /usr/lib/libdb-4.2.so (0x40020000)
        libm.so.6 => /lib/libm.so.6 (0x4010b000)
        libc.so.6 => /lib/libc.so.6 (0x4012e000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40260000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

So I think I will leave the sleepycat.lisp changes out for now.  I
will resolve this bug as fixed, but please re-open if problems
persist.