[Pljava-dev] Building from source for PG 8.2.4

From: ecf at goldencode(dot)com (Eric Faulhaber)
To:
Subject: [Pljava-dev] Building from source for PG 8.2.4
Date: 2007-08-31 04:52:06
Message-ID: 46D79E76.1020005@goldencode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

For months, I have been running PL/Java successfully with PostgreSQL
8.1.8 on Kubuntu Linux using the PL/Java 1.3.0 binary distribution. I
recently upgraded to PG 8.2.4 and found that the 1.3.0 pljava.so binary
would no longer work, due to the version check mechanism
(PG_MAGIC_MODULE) introduced for extensions in 8.2. So, I set out to
compile PL/Java from source with the newer version of PostgreSQL
installed...

I have now rebuilt PL/Java from the latest CVS source tree, using Sun's
Java 1.5.0_11 (had to drop back from Java 6 due to some unimplemented
JDBC 4 methods). Simply running make from the top level directory
seemed to work. Curiously, I ended up with a pljava.so that was nearly
5 times larger than the version which was distributed with the PL/Java
1.3.0 release. Any idea why this would be? Does the default build
included debug symbols?

Anyway, when I try to deploy to a database using install.sql, it
complains that it is unable to locate the JVM:

psql:install.sql:6: ERROR: could not load library
"/usr/lib/postgresql/8.2/lib/pljava.so":
/usr/lib/postgresql/8.2/lib/pljava.so: undefined symbol: JNI_CreateJavaVM

I've made all the same changes to postgresql.conf that were necessary to
get this to work with my previous PG 8.1.8 installation. Likewise, I
have set LD_LIBRARY_PATH in exactly the same way as was working before.
For Kubuntu, this is set in /etc/postgresql/8.2/<mycluster>/environment,
as in:

LD_LIBRARY_PATH =
'/usr/lib/jvm/java-1.5.0-sun/jre/lib/i386:/usr/lib/jvm/java-1.5.0-sun/jre/lib/i386/server'

And yes, I've double checked that these are valid paths to the Sun 1.5
JVM on my system.

So, I'm not sure why I'm now seeing this JVM load error, but the extra
large pljava.so has me wondering if the build really worked properly
after all. Any suggestions on what to try next?

Thanks in advance,
Eric Faulhaber

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Kris Jurka 2007-08-31 18:45:16 [Pljava-dev] Building from source for PG 8.2.4
Previous Message Peter Henderson 2007-08-30 11:13:15 [Pljava-dev] PL/Java 1.3 and PG 8.2.4