[Pljava-dev] JNI_CreateJavaVM

From: lyle at lcrcomputer(dot)net (Lyle Giese)
To:
Subject: [Pljava-dev] JNI_CreateJavaVM
Date: 2006-09-25 21:43:04
Message-ID: 45184D68.60602@lcrcomputer.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

I am sorta getting the same errors you are. I have an HP ML350 with a
XEON processor and installed SuSE 9.2 (64 bit kernel). It came up
identified as x86_64 and tried to find amd64 in the Java lib
directories, which doesn't exist of course. I changed the x86_64 to be
identified as i386 and it still did not make correctly.

At that point, I get an gcc 64 bit lib error related to an incompatible
libjvm.so(in the i386 directory). But since I installed java & jvm from
the SuSE 9.2 distribution dvd, I don't know if I can fix this issue. I
may try re-installing SuSE 9.2 minus java from the dvd(if I can) and
install java from source afterwords. Not sure how difficult that will be.

I am not a programmer by any means and I don't know if there is a way to
compile this against the older gcc lib's or not.

Thanks,
Lyle

Markus Schaber wrote:

>Hi, Lyle,
>
>Lyle Giese wrote:
>
>
>>Below is what I think are the revelent parts of the enviroment and
>>ld.so.conf for compiling PL/Java as per the Wiki. This is as close as I
>>can come unless I can find out what specifically the compile process is
>>looking for that it obviously cann't find to make it not include
>>JNI_CreateJavaVM during the make process.
>>
>>
>
>I just tried my first non-GCJ build of pljava, to cross-check your
>problem, and had the same.
>
>Interestingly, the pljava.so does not reference any libjvm or others:
>
>[~/workspace/pljava] -> ldd build/objs/pljava.so 2006-09-25
>21:55:18
> linux-gate.so.1 => (0xffffe000)
> libc.so.6 => /lib/tls/libc.so.6 (0xb7e07000)
> /lib/ld-linux.so.2 (0x80000000)
>
>
>I tried to investigate, and the cc call that tries to link all together
>has some interesting output:
>
>cc -g [... snipped] -L/usr/lib -L. -L"" -ljvm -o pljava.so
>
>
>I looked into the makefiles, and it seems that the code that tries to
>compute $(JVM_LIB) fails, producing an empty string.
>
>My platform is Debian GNU linux/i386, I installed SUN j2sdk-1.5.0_06 via
>java-package, JAVA_HOME=/usr/lib/j2sdk1.5-sun
>
>"make -p" spits out:
>
>JRE_LIB := /usr/lib/j2sdk1.5-sun/jre/lib/i486
>
>However, /usr/lib/j2sdk1.5-sun/jre/lib/ does not contain an "i486"
>directory, only "i386" is present.
>
>The attached patch fixes the makefile to recognize "i486" by using
>"i386" as java_cpu, just like it handles "i686". The resulting pljava.so
>references libjvm.so and a bunch of others.
>
>Lyle: Could you please test whether that fixes your problem? If yes, TI
>suggest that Thomas reviews the patch and applies it eventually.
>
>HTH,
>Markus
>
>
>
>
>
>
>
>
>
>Thanks,
>Markus
>
>
>
>
>------------------------------------------------------------------------
>
>Index: src/C/pljava/Makefile
>===================================================================
>RCS file: /usr/local/cvsroot/pljava/org.postgresql.pljava/src/C/pljava/Makefile,v
>retrieving revision 1.37
>diff -u -r1.37 Makefile
>--- src/C/pljava/Makefile 28 May 2006 22:01:48 -0000 1.37
>+++ src/C/pljava/Makefile 25 Sep 2006 20:13:18 -0000
>@@ -55,12 +55,16 @@
> ifeq ($(host_cpu), i686)
> JRE_CPU := i386
> else
>+ ifeq ($(host_cpu), i486)
>+ JRE_CPU := i386
>+ else
> ifeq ($(host_cpu), x86_64)
> JRE_CPU := amd64
> else
> JRE_CPU := $(host_cpu)
> endif
> endif
>+ endif
>
> endif
> endif
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Pljava-dev mailing list
>Pljava-dev at gborg.postgresql.org
>http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060925/261e0d00/attachment.html>

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Markus Schaber 2006-09-26 09:05:25 [Pljava-dev] JNI_CreateJavaVM
Previous Message Thomas Hallgren 2006-09-25 20:47:09 [Pljava-dev] UDT send and receive