[Pljava-dev] JNI_CreateJavaVM

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
Thread:
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>

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Markus Schaber 2006-09-28 12:59:57 [Pljava-dev] Strange classpath problem
Previous Message Lyle 2006-09-26 14:18:55 [Pljava-dev] JNI_CreateJavaVM