Re: gnome-lib woes



On Thu, Jan 21, 1999 at 09:53:34AM -0500, Buch, Bill wrote:

> Which would be better to do.
> Get libdb version 2.6.4 and compile that
> or
> Get the newer version of libc which comes with a libdb.
> 
> If the first route is better, how do I create a shared library.  Doing a
> make only makes the static library.  So I compile everything fine, but when
> i run gnome-gen-mimedb, it cannot find the shared library libdb.so.1

  Instructions are in to .../docs/build directory, either shared_gcc.html
or shared_hp.html (if you're using something other than gcc or hp you'll
have to figure it out yourself using these as a guide). Basically its:

>1. Add the _-fpic_ option to the CFLAGS value in the Makefile.
>2. Rebuild all of your .o files. This will create a Berkeley DB
>library that contains .o files with PIC code. To build the shared
>library, then take the following steps in the library build
>directory:
>
>% mkdir tmp
>% cd tmp
>% ar xv ../libdb.a
>% gcc -shared -o libdb.so *.o
>% mv libdb.so ..
>% cd ..
>% rm -rf tmp
>
>Note, you may have to change the gcc line depending on the
>requirements of your system.
>
>The file libdb.so is your shared library.

  Since I like numbers I use the following instead of the above gcc line:

gcc -shared -Wl,-soname,libdb.so.2.6.4 -o libdb.so.2.6.4 *.o

  I all it shouldn't make a difference if you don't have a shared lib, if
gcc doesn't find one it falls back to using a static lib (if found). I'd
guess you have an old or unwanted libdb.so, pointing to a libdb.so.1 which
doesn't exist laying around somewhere.

--
I sat down beside her, said hello, offered to buy her a drink...
and then natural selection reared its ugly head.

Mike Hall <mhall@riverside.org>, (MH993)   -    http://www.riverside.org
System Administrator (*nix, Perl, CGI hacker, certified OS/2 Specialist)



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