From: | pierce at hogranch(dot)com (John R Pierce) |
---|---|
To: | |
Subject: | [Pljava-dev] pljava on AIX for postgres 9.1.x and IBM AIX Java 6? |
Date: | 2012-10-12 21:06:56 |
Message-ID: | 50788670.3060903@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
On 10/11/12 7:15 PM, John R Pierce wrote:
> $ psql -c "SELECT
> sqlj.install_jar('file:///opt/xxx/pljava/examples.jar', 'samples',
> true);"
> INFO: JVMJ9VM011W Unable to load jclscar_23: No such file or directory
> ERROR: Failed to create Java VM
>
> $ find /usr/java5_64 -name \*jclscar_23\*
> /usr/java5_64/jre/bin/libjclscar_23.so
again, I'm using the pljava-1.4.3 source tarball, and I'm only doing the
`gmail c_all` part.
can someone familiar with the Makefiles of pljava explain why the .so is
apparently being built twice ? I've browsed the Makefile and frankly
find it fairly confusing.
if I delete build/objs/*.{o,a,so) and run gmake c_all...
$ export
PATH=/usr/java5_64/jre/bin:/usr/java5_64/bin:/usr/bin:/opt/pgsql91/bin
$ export JAVA_HOME=/usr/java5_64
$ export OBJECT_MODE=64
$ export PLJAVA_LDFLAGS=-lm
$ gmake c_all
...lots of compiles omitted....
/usr/bin/ar crs libpljava.a Backend.o Exception.o ExecutionPlan.o
Function.o HashMap.o Invocation.o Iterator.o JNICalls.o PgObject.o
PgSavepoint.o SPI.o SQLInputFromChunk.o SQLInputFromTuple.o
SQLOutputToChunk.o SQLOutputToTuple.o Session.o SubXactListener.o
XactListener.o backports.o type/AclId.o type/Any.o type/Array.o
type/BigDecimal.o type/Boolean.o type/Byte.o type/Coerce.o
type/Composite.o type/Date.o type/Double.o type/ErrorData.o type/Float.o
type/HeapTupleHeader.o type/Integer.o type/JavaWrapper.o
type/LargeObject.o type/Long.o type/Oid.o type/Portal.o type/Relation.o
type/Short.o type/String.o type/Time.o type/Timestamp.o
type/TriggerData.o type/Tuple.o type/TupleDesc.o type/TupleTable.o
type/Type.o type/UDT.o type/Void.o type/byte_array.o
touch libpljava.a
/opt/pgsql91/lib/pgxs/src/makefiles/../../src/backend/port/aix/mkldexport.sh
libpljava.a >libpljava.exp
/usr/vacpp/bin/xlc -q64 -I/home/postgres/src/include -O2 -qarch=pwr5
-qtune=balanced -qnoansialias -o pljava.so libpljava.a
-Wl,-bE:libpljava.exp -L/opt/pgsql91/lib -L/home/postgres/src/lib
-Wl,-blibpath:'/opt/pgsql91/lib:/opt/pgsql91/lib:/home/postgres/src/lib:/usr/lib:/lib'
-Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE
-Wl,-bI:/opt/pgsql91/lib/postgres.imp -L. -L"/usr/java5_64/jre/bin/j9vm"
-ljvm -lm
rm -f libpljava.a
/usr/bin/ar crs libpljava.a pljava.so
/opt/pgsql91/lib/pgxs/src/makefiles/../../src/backend/port/aix/mkldexport.sh
libpljava.a > pljava
/usr/vacpp/bin/xlc -q64 -I/home/postgres/src/include -O2 -qarch=pwr5
-qtune=balanced -qnoansialias -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE -o
pljava.so libpljava.a -Wl,-bE:pljava
-Wl,-bI:/opt/pgsql91/lib/postgres.imp -L. -L"/usr/java5_64/jre/bin/j9vm"
-ljvm -lm
gmake[1]: Leaving directory `/home/postgres/src/pljava-1.4.3/build/objs'
$
I added blank lines to separate out the commands.
anyways, after building this, and putting both libpljava.a and pljava.so
into my designated runtime directory, I can run the deployer, and it
apparently works....
postgres=# \dL+
List of languages
Name | Owner | Trusted | Internal Language | Call
Handler | Validator | Inline Handler
| Access privileges
---------+----------+---------+-------------------+---------------------------+------------------------+----------------------------
------+-------------------
java | postgres | t | f |
sqlj.java_call_handler() | - | -
|
javau | postgres | f | f |
sqlj.javau_call_handler() | - | -
|
plpgsql | postgres | t | f |
plpgsql_call_handler() | plpgsql_validator(oid) |
plpgsql_inline_handler(inte
rnal) |
(3 rows)
Yet, with the proper LIBPATH defined and dynamic_library_path for good
measure, when I try and load the example.jar, I'm still getting..
postgres=# SELECT
sqlj.install_jar('file:///opt/xxx/pljava/examples.jar', 'samples', true);
INFO: JVMJ9VM011W Unable to load jclscar_23: No such file or directory
ERROR: Failed to create Java VM
postgres=# show dynamic_library_path ;
dynamic_library_path
-------------------------------------------------------
$libdir:/opt/xxx/pljava:/usr/java5_64/jre/bin
(1 row)
but I see...
$ ls -l /usr/java5_64/jre/bin/libjclscar_23.so
-r-xr-xr-x 1 bin bin 1278830 Dec 15 2010
/usr/java5_64/jre/bin/libjclscar_23.so
yet, my pljava.so seemingly loads fine...
$ echo $LIBPATH
/opt/xxx/pljava:/usr/java5_64/jre/bin
$ ldd /opt/xxx/pljava/pljava.so
/opt/xxx/pljava/pljava.so needs:
/usr/lib/libc.a(shr_64.o)
/opt/xxx/pljava/libpljava.a(pljava.so)
/usr/java5_64/jre/bin/j9vm/libjvm.a
/unix
/usr/lib/libcrypt.a(shr_64.o)
/usr/lib/libc_r.a(shr_64.o)
/usr/lib/libpthread.a(shr_xpg5_64.o)
/usr/java5_64/jre/bin/libjsig.so
/usr/java5_64/jre/bin/libj9thr23.so
so I'm stuck here. again.
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2012-10-13 01:46:47 | [Pljava-dev] pljava on AIX for postgres 9.1.x and IBM AIX Java 6? |
Previous Message | Hal Hildebrand | 2012-10-12 16:06:32 | [Pljava-dev] Installing PL/Java on Mac OS/X (Postgres 9, Mountain Lion) |