compiling gnome-libs



I'm running SuSE 7.3 with upgrade to kernel 2.4.19 .
Upon compiling gabber I was required to install
gnome-libs . As this failed which exact the same
problem as what I found later in a mail list archive I
tried the solution and it worked.

The suggested hack is from April 2001 - wouldn't it be
useful to fix the problem in the tarball ?

I tried versions 1.4.2 and 1.4.1.7

ThanX and regards, Malte
---------------------------

> WWT> <snip> ... mentions having fix for libdb3 &
gnome ...
>
> I really want to know how ?
>
> libgnome doesn't compile against libdb3 See #89670
and this thread from the
> gnome-devel mailing list 
>
>
http://mail.gnome.org/archives/gnome-devel-list/2001-March/thread.html
>
> Christian

Sorry for the latency! I wasn't reading the
debian-digest - I assumed you
would have replied to me directly. Ok, so what did I
change? I did have to
patch a file or two I think (checks local copy of
source)...

I remember having the __db185_open bug and tweaking
something to make it go
away... Aha! Ok, here's the scoop: 

The problem is the search order for -ldb1 vs -ldb and
-ldb-3.
It probably works on the upstream maintainer's machine
and he should be
notified (b/c if you don't have libdb2 installed it
will work fine as well).

You see, the libdb3 headers #define dbopen to
__db185_open. Now, it finds
the db_185.h in configure and then looks for libdb1
and libdb before
libdb-3.

However, if you're using libdb3 headers you're
screwed! You link to
the wrong lib. Even though libdb -> libdb3 the test
won't work b/c it looks
for the symbol dbopen instead of __db185_open in
libdb.

Now the fix I propose below is a bit hackish b/c it
still makes no
guarantees that you've picked the right lib out of all
those installed.

The real solution would be to test link a program that
includes db_185.h and
references dbopen and try all the possible libs.

Anyways, here's the easy fix. In configure.in find:

if test "$prefer_db1" = "yes"; then
 AC_CHECK_LIB(db1, dbopen, DB_LIB="-ldb1",
  AC_CHECK_LIB(db, dbopen, DB_LIB="-ldb", 
   AC_CHECK_LIB(db-3, __db185_open, DB_LIB="-ldb-3",
    AC_MSG_ERROR([Your db library is missing db 1.85
compatibility mode])
   )
  ) 
 )  
else
 AC_CHECK_LIB(db, dbopen, DB_LIB="-ldb",
  AC_CHECK_LIB(db1, dbopen, DB_LIB="-ldb1",
   AC_CHECK_LIB(db-3, __db185_open, DB_LIB="-ldb-3",
    AC_MSG_ERROR([Your db library is missing db 1.85
compatibility mode])
   )
  ) 
 )  
fi  

Change it to:
if test "$prefer_db1" = "yes"; then
 AC_CHECK_LIB(db1, dbopen, DB_LIB="-ldb1",
  AC_CHECK_LIB(db, dbopen, DB_LIB="-ldb", 
   AC_CHECK_LIB(db, __db185_open, DB_LIB="-ldb",
    AC_CHECK_LIB(db-3, __db185_open, DB_LIB="-ldb-3",
     AC_MSG_ERROR([Your db library is missing db 1.85
compatibility mode])
    )
   )
  ) 
 )  
else
 AC_CHECK_LIB(db, dbopen, DB_LIB="-ldb",
  AC_CHECK_LIB(db, __db185_open, DB_LIB="-ldb",
   AC_CHECK_LIB(db1, dbopen, DB_LIB="-ldb1",
    AC_CHECK_LIB(db-3, __db185_open, DB_LIB="-ldb-3",
     AC_MSG_ERROR([Your db library is missing db 1.85
compatibility mode])
    )
   )
  ) 
 )  
fi  

Anyways, you have a fix that works now. Please try it
yourself and let me
know whether or not it works out. Oh, I had to tweak
all the Build-Depends
too.

Could you please push to get this into woody? I know
you have to rebuild
half the gnome stuff b/c of relinking libgnome, but I
really need
libgnome-dev and libdb3-dev together. Not to mention
libdb2 sucks compared
to libdb3 in a big way. (don't mind me - I am just
hooked on it)

.. And having to maintain all of the gnome .debs in
parallel is getting
annoying. ;-)

PS. Be very happy you had a link error, b/c if the
symbol name had by chance
not been changed in libdb3, libgnome would be link but
be unstable.

Good luck.

-- 
Wesley W. Terpstra - Linux Developer





__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]