Running the 0.9 release under Linux

Hey All,

The 0.9 release will run under Linux BUT its missing the Linux BerkelyDB native libraries.

here’s wisdom from your fellow community members on how to fix that:

Tigeba writes:

Brendanburns writes

Endolf writes:

[quote]
I just pursuaded my Ubuntu installation to upgrade to Feisty, from there a


apt-get installl libdb4.5-java

did the job :slight_smile:

Just have to remember to stick /usr/lib in the java.library.classpath

After a bit of a fight, I’ve managed to get deadrat RHEL4 playing too. I had to install db4_java with up2date, which puts db4.2 on, I then db4.4 from the ark distribution (rpmfind got me the initial link) here, just picked of the mirror list. extracted it with rpm2cpio and copied the lib and jar to the right places. I’m sure thats not what redhat want you to do Smiley

Version 4.2 has API changes that mean SGS won’t start up.

Hi

The link from my post re getting SGS runnin under RHEL4 is missing, so here it is again :slight_smile:

Endolf

I’m running Mandriva 2007, and I am having trouble finding or building the proper native libraries. Can anyone point me in the right direction? It seems no matter what combination of libraries I try, I get the “java.lang.UnsatisfiedLinkError: no db_java-4.5 in java.library.path” error. (Edit: I should say explicitly that I cannot find a file db_java-4.5.so, which I am guessing is the source of my problem. Anyone know where I can find one?)

Under Linux wouldn’t that be “libdb_java-4.5.so” ?

It is indeed. The trouble is that 4.5 is very new, and most distributions are not shipping it yet, so, you have 3 choices. Find a testing version for your distribution, maybe they have a more up to date version. Download the source for db4.5 java and build it. The other option, if you know enough about the workings under the cover, is to jury rig something together, which is what I had to do on red hat. It’s not version 4.5, I think it’s 4.4, but it comes with a db.jar that drops in to replace the one that comes with SGS and works. See my comments on this board regarding getting it working on RHEL4.

HTH

Endolf

Where does one find the source for libdb4.5_java? I tried downloading the ones at http://www.oracle.com/technology/software/products/berkeley-db/db/index.html, but building them gives me only libdb-4.5.so, not libdb_java-4.5.so. I tried linking the latter to the former, but SGS didn’t seem to like that either. Am I looking in the wrong place?

In the instructions with that download it gives some hints on how to build it, but I gave up before I could get it working. It needed swig or something to create the java bindings. I managed to get the library from another distribution working on redhat, and ubuntu feisty (testing) had a new enough version. The pain with linux is that dynamically linked object depend on having sometimes particular versions of other libraries, thats why we let package managers do all that work for us, so if you leave the safety of your distributions packages, you are on our own, like we are here.

Endolf

Thanks to endolf for pushing me in the right direction. I now have a server up and running without leaving my machine in an unstable state. Here’s how I got it working:

  1. Download the sources for the latest 4.5 bdb from http://www.oracle.com/technology/software/products/berkeley-db/db/index.html

  2. Extract it somewhere and cd into the build_unix directory.

  3. Execute the configure script as follows:


../dist/configure --prefix=/home/purpleguitar/foo --enable-java

You can put the libraries anywhere, of course. ~/foo seemed like a fine idea at the time. I’ll call this ${prefix}.

  1. Run the makefile the traditional way:

make install

This will “install” the bdb files into ${prefix}. In my example, it’s /home/purpleguitar/foo.

  1. To run the server, make sure that ${prefix}/lib/db.jar is in the classpath and ${prefix}/lib/libdb_java-4.5.so is in the java.library.path.

Cool

Good to hear another install running :slight_smile: