agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] pljava on AIX for postgres 9.1.x and IBM AIX Java 6?
Date: Fri, 12 Oct 2012 14:06:56 -0700
Message-ID: <50788670.3060903@hogranch.com> (raw)
In-Reply-To: <50777D31.70707@hogranch.com>
References: <50651F8A.1080704@hogranch.com>
<50660523.5050503@hogranch.com>
<50660A90.3020308@hogranch.com>
<5069E7C8.4090004@hogranch.com>
<5073DEED.8030504@hogranch.com>
<507472B6.3060100@hogranch.com>
<507474C0.1010304@hogranch.com>
<50749A49.8060003@hogranch.com>
<5075C351.1010101@hogranch.com>
<5075C9D9.9080303@ejurka.com>
<5075FE04.4020407@hogranch.com>
<50775D08.9030409@hogranch.com>
<5077662B.2000607@ejurka.com>
<50776924.6080504@hogranch.com>
<50777D31.70707@hogranch.com>
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
view thread (17+ messages) latest in thread
Message-ID: <50788670.3060903@hogranch.com>
Permalink: ../50788670.3060903@hogranch.com/
Also on: postgresql.org/message-id/50788670.3060903@hogranch.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] pljava on AIX for postgres 9.1.x and IBM AIX Java 6?
In-Reply-To: <50788670.3060903@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox