Lists: | pljava-dev |
---|
From: | lyle at lcrcomputer(dot)net (Lyle Giese) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-18 14:02:43 |
Message-ID: | 450EA703.5080106@lcrcomputer.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
I am trying to install Compiere w/Postgres on a SuSE 9.2 computer. All
was going well until I got to the line:
java -cp
/home/postgres/product/8.1/jlib/deploy.jar:/home/postgres/product/8.1/jdbc/lib/postgresql-8.1-407.jdbc3.jar
org.postgresql.pljava.deploy.Deployer -install -user compiere -database
cptst01
It errors out with:
org.postgresql.java.PSQLException: ERROR: could not load library
"/usr/local/pgsql/lib/pljava.so": /usr/local/pgsql/lib/pljava.so:
undefined symbol: JNI_CreateJavaVM
I looked in the build tree for pljava1.3.0 and in pljava.so it shows:
U JNI_CreateJavaVM
So I assume that this means this function is not implemented or not found.
I get no errors when running make on pljava(I can post the make log, but
there are no errors, warning etc.). I am doing this on SuSE 9.2 with
java 1.4.2-sun with devel & source libraries loaded from CD.
So what silly little thing did I miss?
Thanks,
Lyle Giese
From: | thomas at tada(dot)se (Thomas Hallgren) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-18 16:06:04 |
Message-ID: | 450EC3EC.1030409@tada.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
JNI_CreateJavaVM is the entry point to the Java VM. You need to set up your loader
environment so that the loader finds the VM. See
http://wiki.tada.se/wiki/display/pljava/Posix+Installation on LD_LIBRARY_PATH and ld.so.conf.d
Regards,
Thomas Hallgren
Lyle Giese wrote:
> I am trying to install Compiere w/Postgres on a SuSE 9.2 computer. All
> was going well until I got to the line:
>
> java -cp
> /home/postgres/product/8.1/jlib/deploy.jar:/home/postgres/product/8.1/jdbc/lib/postgresql-8.1-407.jdbc3.jar
> org.postgresql.pljava.deploy.Deployer -install -user compiere -database
> cptst01
>
> It errors out with:
> org.postgresql.java.PSQLException: ERROR: could not load library
> "/usr/local/pgsql/lib/pljava.so": /usr/local/pgsql/lib/pljava.so:
> undefined symbol: JNI_CreateJavaVM
>
> I looked in the build tree for pljava1.3.0 and in pljava.so it shows:
>
> U JNI_CreateJavaVM
>
> So I assume that this means this function is not implemented or not found.
>
> I get no errors when running make on pljava(I can post the make log, but
> there are no errors, warning etc.). I am doing this on SuSE 9.2 with
> java 1.4.2-sun with devel & source libraries loaded from CD.
>
> So what silly little thing did I miss?
>
> Thanks,
> Lyle Giese
From: | lyle at lcrcomputer(dot)net (Lyle Giese) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-18 20:12:14 |
Message-ID: | 450EFD9E.6080103@lcrcomputer.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
As far as I can tell, I am following these instructions to the letter,
but no go. What specifically is the make process looking for that it
can not find that would cause this? I susposse it's quite possible that
I am pointing this to the wrong directories.
I will also try on Wednesday to get another person here in our
department to look over what I have done to look for typos or other issues.
Thanks,
Lyle
Thomas Hallgren wrote:
>JNI_CreateJavaVM is the entry point to the Java VM. You need to set up your loader
>environment so that the loader finds the VM. See
>http://wiki.tada.se/wiki/display/pljava/Posix+Installation on LD_LIBRARY_PATH and ld.so.conf.d
>
>Regards,
>Thomas Hallgren
>
>
>Lyle Giese wrote:
>
>
>>I am trying to install Compiere w/Postgres on a SuSE 9.2 computer. All
>>was going well until I got to the line:
>>
>>java -cp
>>/home/postgres/product/8.1/jlib/deploy.jar:/home/postgres/product/8.1/jdbc/lib/postgresql-8.1-407.jdbc3.jar
>>org.postgresql.pljava.deploy.Deployer -install -user compiere -database
>>cptst01
>>
>>It errors out with:
>>org.postgresql.java.PSQLException: ERROR: could not load library
>>"/usr/local/pgsql/lib/pljava.so": /usr/local/pgsql/lib/pljava.so:
>>undefined symbol: JNI_CreateJavaVM
>>
>>I looked in the build tree for pljava1.3.0 and in pljava.so it shows:
>>
>> U JNI_CreateJavaVM
>>
>>So I assume that this means this function is not implemented or not found.
>>
>>I get no errors when running make on pljava(I can post the make log, but
>>there are no errors, warning etc.). I am doing this on SuSE 9.2 with
>>java 1.4.2-sun with devel & source libraries loaded from CD.
>>
>>So what silly little thing did I miss?
>>
>>Thanks,
>>Lyle Giese
>>
>>
>
>_______________________________________________
>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/20060918/b0cd571e/attachment.html>
From: | lyle at lcrcomputer(dot)net (Lyle Giese) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-25 19:08:35 |
Message-ID: | 45182933.6020507@lcrcomputer.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
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.
Thanks,
Lyle
JAVA_BINDIR=/usr/lib/jvm/jre/bin
JAVA_HOME=/usr/lib/jvm/jre
JAVA_ROOT=/usr/lib/jvm/jre
JRE_HOME=/usr/lib/jvm/jre
LC_CTYPE=en_US.utf-8
LD_LIBRARY_PATH=/usr/lib/jvm/java-1.4.2-sun-1.4.2.05/jre/lib/i386:
/usr/lib/jvm/java-1.4.2-sun-1.4.2.05/jre/lib/i386/client:/usr/lib/jvm/java-1.4.2-sun-1.4.2.05/jre/lib/i386/native_threads
PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/local/pgsql/bin:
/usr/local/pgsql/bin:/etc/alternatives/java_sdk_1.4.2/bin
/etc/ld.so.conf:
/usr/X11R6/lib64/Xaw95
/usr/X11R6/lib64/Xaw3d
/usr/X11R6/lib64
/usr/X11R6/lib/Xaw95
/usr/X11R6/lib/Xaw3d
/usr/X11R6/lib
/usr/x86_64-suse-linux/lib64
/usr/x86_64-suse-linux/lib
/usr/local/lib
/usr/openwin/lib
/opt/kde/lib
/opt/kde2/lib
/opt/kde3/lib
/opt/gnome/lib
/opt/gnome2/lib
/lib64
/lib
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/openwin/lib64
/opt/kde/lib64
/opt/kde2/lib64
/opt/kde3/lib64
/opt/gnome/lib64
/opt/gnome2/lib64
/usr/local/pgsql/lib
/usr/lib/jvm/java-1.4.2-sun-1.4.2.05/jre/lib/i386
/usr/lib/jvm/java-1.4.2-sun-1.4.2.05/jre/lib/i386/client
include /etc/ld.so.conf.d/*.conf
Lyle Giese wrote:
> As far as I can tell, I am following these instructions to the letter,
> but no go. What specifically is the make process looking for that it
> can not find that would cause this? I susposse it's quite possible
> that I am pointing this to the wrong directories.
>
> I will also try on Wednesday to get another person here in our
> department to look over what I have done to look for typos or other
> issues.
>
> Thanks,
> Lyle
>
> Thomas Hallgren wrote:
>
>>JNI_CreateJavaVM is the entry point to the Java VM. You need to set up your loader
>>environment so that the loader finds the VM. See
>>http://wiki.tada.se/wiki/display/pljava/Posix+Installation on LD_LIBRARY_PATH and ld.so.conf.d
>>
>>Regards,
>>Thomas Hallgren
>>
>>
>>Lyle Giese wrote:
>>
>>
>>>I am trying to install Compiere w/Postgres on a SuSE 9.2 computer. All
>>>was going well until I got to the line:
>>>
>>>java -cp
>>>/home/postgres/product/8.1/jlib/deploy.jar:/home/postgres/product/8.1/jdbc/lib/postgresql-8.1-407.jdbc3.jar
>>>org.postgresql.pljava.deploy.Deployer -install -user compiere -database
>>>cptst01
>>>
>>>It errors out with:
>>>org.postgresql.java.PSQLException: ERROR: could not load library
>>>"/usr/local/pgsql/lib/pljava.so": /usr/local/pgsql/lib/pljava.so:
>>>undefined symbol: JNI_CreateJavaVM
>>>
>>>I looked in the build tree for pljava1.3.0 and in pljava.so it shows:
>>>
>>> U JNI_CreateJavaVM
>>>
>>>So I assume that this means this function is not implemented or not found.
>>>
>>>I get no errors when running make on pljava(I can post the make log, but
>>>there are no errors, warning etc.). I am doing this on SuSE 9.2 with
>>>java 1.4.2-sun with devel & source libraries loaded from CD.
>>>
>>>So what silly little thing did I miss?
>>>
>>>Thanks,
>>>Lyle Giese
>>>
>>>
>>
>>_______________________________________________
>>Pljava-dev mailing list
>>Pljava-dev at gborg.postgresql.org
>>http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>>
>>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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/49bb1cc8/attachment.html>
From: | schabi at logix-tt(dot)com (Markus Schaber) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-25 20:16:17 |
Message-ID: | 45183911.2020205@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
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
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060925/ab1ef774/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060925/ab1ef774/attachment-0001.bin>
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 |
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>
From: | schabi at logix-tt(dot)com (Markus Schaber) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-26 09:05:25 |
Message-ID: | 4518ED55.9000600@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Hi, Lyle,
Lyle Giese wrote:
> 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.
Is it possible that you mixed 32-bit and 64-bit user space code?
You cannot mix 32-bit and 64-bit code in the same executable. As pljava
and the jdk get loaded as dynamically libraries into the postmaster, all
of PostgreSQL, pljava, the jdk/jre and all other needed libs (e. G.
zlib) need to be compiled for the same platform.
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060926/5c7a64f8/attachment.bin>
From: | lyle at lcrcomputer(dot)net (Lyle) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-26 12:46:01 |
Message-ID: | 45192109.7020500@lcrcomputer.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Guess I was tired when I wrote that last.
I had found another cpu specific 'error' in line 102 of that same
Makefile. I edited that line and then tried to run make. So there are
issues with the Makefile as you suggested.
As far as mixing 32 with 64 bit code, I installed Java and Java libs
from the SuSE distro dvd. I installed no Java source from anywhere else.
I suspect this is an issue with the distro in regard to the lib error.
Maybe if I back off and try installing on one of our old Proliant
3000's(PII 400MHz), it might work<GRIN>?!? Or install the 32 bit kernel
on the Xeon? (but then I have issues with our tape drive. I may have
to just eat that and fix the tape drive issue another way.) At least if
I put a 32 bit kernel on the Xeon, I still have a possibility of finding
an answer within a day. On the Proliant3000 it might take a week (or two?)?
Lyle
Markus Schaber wrote:
> Hi, Lyle,
>
> Lyle Giese wrote:
>
>> 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.
>>
>
> Is it possible that you mixed 32-bit and 64-bit user space code?
>
> You cannot mix 32-bit and 64-bit code in the same executable. As pljava
> and the jdk get loaded as dynamically libraries into the postmaster, all
> of PostgreSQL, pljava, the jdk/jre and all other needed libs (e. G.
> zlib) need to be compiled for the same platform.
>
> HTH,
> Markus
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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/20060926/5aa7e745/attachment.html>
From: | schabi at logix-tt(dot)com (Markus Schaber) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-26 13:41:44 |
Message-ID: | 45192E18.80702@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Hi, Lyle,
Lyle wrote:
> I had found another cpu specific 'error' in line 102 of that same
> Makefile. I edited that line and then tried to run make. So there are
> issues with the Makefile as you suggested.
Could you post your fix here, so we can review it, and it can be applied
to the CVS eventually?
> As far as mixing 32 with 64 bit code, I installed Java and Java libs
> from the SuSE distro dvd. I installed no Java source from anywhere else.
How did you install your PostgreSQL and your gcc toolchain? From the
same DVD? Then they all should be the same platform, at least, if SuSE
didn't break it.
> Maybe if I back off and try installing on one of our old Proliant
> 3000's(PII 400MHz), it might work<GRIN>?!? Or install the 32 bit kernel
> on the Xeon?
You don't need a 32-bit kernel, an 64-bit kernel for running 32-bit apps
is just fine (and might even perform better than a 32-bit kernel on some
configurations). You can also have a mixture of both 32-bit and 64-bit
applications installed on a 64-bit kernel. This leads to having some
libs available in both 32-bit and 64-bit, but apart from some wasted
disk space and RAM, it doesn't hurt.
But you have to make sure that PostgreSQL, pljava and the JDK all are
the the same "bit-number".
The "gcc 64 bit lib error related to an incompatible libjvm.so (in the
i386 directory)" you quoted in your previous message made me think that
PostgreSQL and PLJava seem to be compiled in 64-bit, whereas the JDK is
in 32-bit.
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060926/ad2c10b6/attachment.bin>
From: | lyle at lcrcomputer(dot)net (Lyle) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-26 14:18:55 |
Message-ID: | 451936CF.4020800@lcrcomputer.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Markus Schaber wrote:
> Hi, Lyle,
>
> Lyle wrote:
>
>
>> I had found another cpu specific 'error' in line 102 of that same
>> Makefile. I edited that line and then tried to run make. So there are
>> issues with the Makefile as you suggested.
>>
>
> Could you post your fix here, so we can review it, and it can be applied
> to the CVS eventually?
>
>
>> As far as mixing 32 with 64 bit code, I installed Java and Java libs
>> from the SuSE distro dvd. I installed no Java source from anywhere else.
>>
>
> How did you install your PostgreSQL and your gcc toolchain? From the
> same DVD? Then they all should be the same platform, at least, if SuSE
> didn't break it.
>
>
>> Maybe if I back off and try installing on one of our old Proliant
>> 3000's(PII 400MHz), it might work<GRIN>?!? Or install the 32 bit kernel
>> on the Xeon?
>>
>
> You don't need a 32-bit kernel, an 64-bit kernel for running 32-bit apps
> is just fine (and might even perform better than a 32-bit kernel on some
> configurations). You can also have a mixture of both 32-bit and 64-bit
> applications installed on a 64-bit kernel. This leads to having some
> libs available in both 32-bit and 64-bit, but apart from some wasted
> disk space and RAM, it doesn't hurt.
>
> But you have to make sure that PostgreSQL, pljava and the JDK all are
> the the same "bit-number".
>
> The "gcc 64 bit lib error related to an incompatible libjvm.so (in the
> i386 directory)" you quoted in your previous message made me think that
> PostgreSQL and PLJava seem to be compiled in 64-bit, whereas the JDK is
> in 32-bit.
>
>
> HTH,
> Markus
>
>
I am not a programmer and I just took the 'easy' way out and will just
point out where the issues for me were in the Makefile.
On this Xeon based machine, this script identifies the cpu as x86_64.
Line 35
ifeq ($(host_cpu), x86_64)
JRE_CPU := amd64
I hand edited this to read JRE_CPU := i386
Then in line 102, (looking back this doesn't make sense to me, but ...)
JRE_LIB := $(JDK_HOME)/lib/$(JRE_CPU)
did not get filled out correctly and I hand edited this line to
JRE_LIB := $(JDK_HOME)/lib/i386
Then I got this during make:
/usr/lib64/gcc-lib/x86-64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld:
skipping incompatible /usr/lib/jvm/jre/lib/i386/client/libjvm.so when
searching for -ljvm
In the /usr/lib/jvm/lib directory, there are no other cpu specific
directories and I don't find any java stuff under /usr/lib64 either. My
presumption at this point is that I have a distro problem(no 64 bit java
libs installed?) as java & jvm are direct from the distro dvd.
Not sure what you mean by gcc toolchain? gcc was installed via the
distro dvd.
As far as postgres goes, here is the top part of the config.log:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by PostgreSQL configure 8.1.4, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --with-perl --enable-shared
## --------- ##
## Platform. ##
## --------- ##
hostname = linux2
uname -m = x86_64
uname -r = 2.6.8-24-smp
uname -s = Linux
uname -v = #1 SMP Wed Oct 6 09:16:23 UTC 2004
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/local/sbin
PATH: /root/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /bin
PATH: /usr/games
PATH: /opt/gnome/bin
PATH: /opt/kde3/bin
PATH: /usr/lib/jvm/jre/bin
I really appreciate your assistance here!
Lyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060926/a6076748/attachment.html>
From: | schabi at logix-tt(dot)com (Markus Schaber) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-26 14:55:29 |
Message-ID: | 45193F61.7060205@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Hi, Lyle,
Lyle wrote:
> I am not a programmer
Knowing / finding out whether the installed versions are 32-bit or
64-bit is not a programmers task, but an administrators taks.
Programmers and developers are the ones writing sorce code, not the ones
installing binary packages from SuSE CDs.
So ask your sysadmin (the one that's responsible for managing your
machine), (s)he should know how to do it.
> On this Xeon based machine, this script identifies the cpu as x86_64.
Yes, that's correct so far, and AFAICS it gets this information from the
PostgreSQL header.
> In the /usr/lib/jvm/lib directory, there are no other cpu specific
> directories and I don't find any java stuff under /usr/lib64 either. My
> presumption at this point is that I have a distro problem(no 64 bit java
> libs installed?) as java & jvm are direct from the distro dvd.
Yes, it seems that you only have the 32-bit version of java installed,
as there's only a i386 directory. The RPM package should provide more
info on that, but as I'm not using a RPM based distribution, I cannot
tell you how to get it.
You can also use "objdump -f /path/to/your/libjvm.so" - that should tell
you for which architecture it is built.
> Not sure what you mean by gcc toolchain? gcc was installed via the
> distro dvd.
Yes, exactly. GCC, the Linker, etc.
Try to look at the output of "cc -v" or "gcc -v".
> uname -m = x86_64
That seems to indicate that PostgreSQL is, in fact, build for 64-bit.
To verify it, you can connect to a database, and "SELECT version();" -
this should output the platform it's compiled for.
PLJava uses the information it finds from there, by including the
PostgreSQL headers and Makefile.global, so it is built with 64-bit, too.
Your Makefile modifikations now forced the pljava makefile to recognize
the 32-bit JDK which it correctly refused before, which lead to the
linker correctly complaining about incompatible versions.
You can try the following:
- Search whether there's a 64-bit version of the JDK on the CD or on
the SuSE / Novell servers
- Search for a 64-bit version at Sun.
- Try a 64-bit version from IBM or other vendors, if available
- Recompile PostgreSQL and pljava with 32-bit
- Use GCJ instead of the SUN jdk, simply install the GCJ packages, check
whether they're current and 64-bit via "gcj -v", and then issue
"make clean; USE_GCJ=1 make all" in the pljava directory.
- Ask some linux gurus at your company, the SuSE/Novell support or sign
an support contract with a 3rd party supporter you trust.
Thanks,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060926/8d6d621d/attachment.bin>
From: | schabi at logix-tt(dot)com (Markus Schaber) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-29 12:07:47 |
Message-ID: | 451D0C93.1070008@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Hi, Lyle,
Markus Schaber wrote:
>[full quote snipped]
As there was no reply to my last mail[1], and I'm interested to know
whether it helped you:
Did you solve your problem? And how? Has it really been a 64/32 bit
mixing problem?
Thanks,
Markus
[1] If it got lost, re-read it at
http://gborg.postgresql.org/pipermail/pljava-dev/2006/000933.html
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
From: | lyle at lcrcomputer(dot)net (Lyle Giese) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-29 16:59:27 |
Message-ID: | 451D50EF.1010007@lcrcomputer.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Markus Schaber wrote:
>Hi, Lyle,
>
>Markus Schaber wrote:
>
>
>>[full quote snipped]
>>
>>
>
>As there was no reply to my last mail[1], and I'm interested to know
>whether it helped you:
>
>Did you solve your problem? And how? Has it really been a 64/32 bit
>mixing problem?
>
>Thanks,
>Markus
>
>[1] If it got lost, re-read it at
>http://gborg.postgresql.org/pipermail/pljava-dev/2006/000933.html
>
>
I have not been had time to do more. I am considering my options to get
a 64 bit java installed. I found 64 bit Java rpm's at SuSE, but need to
fullfill their dependencies first.
As of right now, I am down to a mixing of 32/64 bits sources and need to
work out my options.
Lyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060929/c11dcd58/attachment.html>
From: | schabi at logix-tt(dot)com (Markus Schaber) |
---|---|
To: | |
Subject: | [Pljava-dev] JNI_CreateJavaVM |
Date: | 2006-09-29 18:23:52 |
Message-ID: | 451D64B8.9070809@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pljava-dev |
Hi, Lyle,
Lyle Giese wrote:
>> [1] If it got lost, re-read it at
>> http://gborg.postgresql.org/pipermail/pljava-dev/2006/000933.html
>>
> I have not been had time to do more. I am considering my options to get
> a 64 bit java installed. I found 64 bit Java rpm's at SuSE, but need to
> fullfill their dependencies first.
>
> As of right now, I am down to a mixing of 32/64 bits sources and need to
> work out my options.
Don't forget that installing a 64-bit Java is not your only option. You
also can:
- Use GCJ instead of the JDK
- Install a 32-bit PostgreSQL (you'll need to recreate all databases for
this, I'm afraid).
HTH,
markus