[Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation

Lists: pljava-dev
From: J(dot)Kraaijeveld at Askesis(dot)nl (Joost Kraaijeveld)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 06:57:29
Message-ID: 1159772249.5314.30.camel@panoramix
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hi,

I have installed the Debian AMD64 package postgresql-8.1-pljava-gcj
1.3.0-1+b1 with apt-get install

If I try to run the installation script I get:

psql:/usr/share/postgresql-8.1-pljava/install.sql:6: ERROR: could not
load library
"/usr/lib/postgresql/8.1/lib/pljava.so": /usr/lib/postgresql/8.1/lib/pljava.so: undefined symbol: JNI_CreateJavaVM

Should I do something else other that a simple "apt-get install" and "
psql -f /usr/share/postgresql-8.1-pljava/install.sql" to make this work?

TIA

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl


From: schabi at logix-tt(dot)com (Markus Schaber)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 07:16:58
Message-ID: 4520BCEA.3060304@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hi, Joost,

Joost Kraaijeveld wrote:

> I have installed the Debian AMD64 package postgresql-8.1-pljava-gcj
> 1.3.0-1+b1 with apt-get install
>
> If I try to run the installation script I get:
>
> psql:/usr/share/postgresql-8.1-pljava/install.sql:6: ERROR: could not
> load library
> "/usr/lib/postgresql/8.1/lib/pljava.so": /usr/lib/postgresql/8.1/lib/pljava.so: undefined symbol: JNI_CreateJavaVM
>
> Should I do something else other that a simple "apt-get install" and "
> psql -f /usr/share/postgresql-8.1-pljava/install.sql" to make this work?

That seems to be a similar bug than the one that has bitten Lyle Giese
lately.

Can you show us the output of "ldd /usr/lib/postgresql/8.1/lib/pljava.so"?

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/20061002/7d55c66a/attachment.bin>


From: J(dot)Kraaijeveld at Askesis(dot)nl (Joost Kraaijeveld)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 07:26:17
Message-ID: 1159773977.5314.32.camel@panoramix
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

On Mon, 2006-10-02 at 09:16 +0200, Markus Schaber wrote:
> Can you show us the output of "ldd /usr/lib/postgresql/8.1/lib/pljava.so"?

Yes I can:

panoramix:~$ ldd /usr/lib/postgresql/8.1/lib/pljava.so
libgcj.so.70 => /usr/lib/libgcj.so.70 (0x00002add4d7ea000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002add5028a000)
libc.so.6 => /lib/libc.so.6 (0x00002add50397000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00002add505d3000)
librt.so.1 => /lib/librt.so.1 (0x00002add506e9000)
libdl.so.2 => /lib/libdl.so.2 (0x00002add507f2000)
libz.so.1 => /usr/lib/libz.so.1 (0x00002add508f5000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl


From: schabi at logix-tt(dot)com (Markus Schaber)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 07:44:06
Message-ID: 4520C346.4050102@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hi, Joost,

Joost Kraaijeveld wrote:
> On Mon, 2006-10-02 at 09:16 +0200, Markus Schaber wrote:
>> Can you show us the output of "ldd /usr/lib/postgresql/8.1/lib/pljava.so"?

> Yes I can:
>
> panoramix:~$ ldd /usr/lib/postgresql/8.1/lib/pljava.so
> libgcj.so.70 => /usr/lib/libgcj.so.70 (0x00002add4d7ea000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002add5028a000)
> libc.so.6 => /lib/libc.so.6 (0x00002add50397000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x00002add505d3000)
> librt.so.1 => /lib/librt.so.1 (0x00002add506e9000)
> libdl.so.2 => /lib/libdl.so.2 (0x00002add507f2000)
> libz.so.1 => /usr/lib/libz.so.1 (0x00002add508f5000)
> /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)

So it's not the same problem, as you have the dependency on the java lib.

[~] -> objdump -t -T /usr/lib/libgcj.so.7 | grep JNI_CreateJavaVM
00826c80 g DF .text 000000a0 Base JNI_CreateJavaVM

Do you have the smbol, too?

It now looks as the Postmaster does not find the libgcj.so in its
classpath, but on the other hand, the error message should be different
(indicating a missing library, not a missing symbol).

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/20061002/980d1d63/attachment.bin>


From: J(dot)Kraaijeveld at Askesis(dot)nl (Joost Kraaijeveld)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 07:59:34
Message-ID: 1159775974.5314.40.camel@panoramix
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

On Mon, 2006-10-02 at 09:44 +0200, Markus Schaber wrote:
> Hi, Joost,
>
> Joost Kraaijeveld wrote:
> > On Mon, 2006-10-02 at 09:16 +0200, Markus Schaber wrote:
> >> Can you show us the output of "ldd /usr/lib/postgresql/8.1/lib/pljava.so"?
>
> > Yes I can:
> >
> > panoramix:~$ ldd /usr/lib/postgresql/8.1/lib/pljava.so
> > libgcj.so.70 => /usr/lib/libgcj.so.70 (0x00002add4d7ea000)
> > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002add5028a000)
> > libc.so.6 => /lib/libc.so.6 (0x00002add50397000)
> > libpthread.so.0 => /lib/libpthread.so.0 (0x00002add505d3000)
> > librt.so.1 => /lib/librt.so.1 (0x00002add506e9000)
> > libdl.so.2 => /lib/libdl.so.2 (0x00002add507f2000)
> > libz.so.1 => /usr/lib/libz.so.1 (0x00002add508f5000)
> > /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
>
> So it's not the same problem, as you have the dependency on the java lib.
>
> [~] -> objdump -t -T /usr/lib/libgcj.so.7 | grep JNI_CreateJavaVM
> 00826c80 g DF .text 000000a0 Base JNI_CreateJavaVM
>
> Do you have the smbol, too?
Nop, I do not (which explains a lot I think):

objdump -t -T /usr/lib/libgcj.so.70 | grep JNI_CreateJavaVM

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl


From: schabi at logix-tt(dot)com (Markus Schaber)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 08:23:03
Message-ID: 4520CC67.8080606@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hi, Joost,

Joost Kraaijeveld wrote:

>> [~] -> objdump -t -T /usr/lib/libgcj.so.7 | grep JNI_CreateJavaVM
>> 00826c80 g DF .text 000000a0 Base JNI_CreateJavaVM
>>
>> Do you have the smbol, too?
> Nop, I do not (which explains a lot I think):
>
> objdump -t -T /usr/lib/libgcj.so.70 | grep JNI_CreateJavaVM

So I think that the libgcj is broken, or does not provide JNI on AMD64
platforms.

Can you cross-check with the gcj maintainers, and the docs for AMD64,
maybe it's a documented limitation?

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/20061002/239c27a4/attachment.bin>


From: J(dot)Kraaijeveld at Askesis(dot)nl (Joost Kraaijeveld)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 12:08:04
Message-ID: 1159790884.5314.47.camel@panoramix
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

On Mon, 2006-10-02 at 10:23 +0200, Markus Schaber wrote:
> Can you cross-check with the gcj maintainers, and the docs for AMD64,
> maybe it's a documented limitation?
The function is provided for in another library:

objdump -t -T /usr/lib/gcj-4.1/libjvm.so | grep JNI_Create
0000000000000940 g DF .text 00000000000000ae Base
JNI_CreateJavaVM

I really have no idea how to solve this....

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl


From: schabi at logix-tt(dot)com (Markus Schaber)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 13:16:58
Message-ID: 4521114A.1050409@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hi, Joost,

Joost Kraaijeveld wrote:
> On Mon, 2006-10-02 at 10:23 +0200, Markus Schaber wrote:
>> Can you cross-check with the gcj maintainers, and the docs for AMD64,
>> maybe it's a documented limitation?
> The function is provided for in another library:
>
> objdump -t -T /usr/lib/gcj-4.1/libjvm.so | grep JNI_Create
> 0000000000000940 g DF .text 00000000000000ae Base
> JNI_CreateJavaVM

I just currently looked it up on one of our AMD64 machines, and noticed
that the libgcj7 package on my machine was obsolete, libgcj7-0 seems to
be current on all architectures.

[~] -> objdump -t -T /usr/lib/libgcj.so.7 | grep JNI_Create
00826c80 g DF .text 000000a0 Base JNI_CreateJavaVM

[after updating]
[~] -> objdump -t -T /usr/lib/libgcj.so.70 | grep JNI_Create
[~] {1} ->

So, it seems that, currently, the "libgcj7-0" package does not define
the symbols any more, while they were defined by "libgcj7" packages.

The right idea seems to file a bug report against libgcj7-0 that they
break pljava.

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/20061002/8d78a797/attachment.bin>


From: J(dot)Kraaijeveld at Askesis(dot)nl (Joost Kraaijeveld)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 14:22:45
Message-ID: 1159798965.5314.58.camel@panoramix
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

On Mon, 2006-10-02 at 15:16 +0200, Markus Schaber wrote:
> I just currently looked it up on one of our AMD64 machines, and noticed
> that the libgcj7 package on my machine was obsolete, libgcj7-0 seems to
> be current on all architectures.
[snip]
> So, it seems that, currently, the "libgcj7-0" package does not define
> the symbols any more, while they were defined by "libgcj7" packages.
>
> The right idea seems to file a bug report against libgcj7-0 that they
> break pljava.

Mmmmm. If the gjc team changed it's packaging in all architectures and
pljava is depending on an upstream package it might be wiser to change
pljava and file the report on the plajava package....

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl


From: schabi at logix-tt(dot)com (Markus Schaber)
To:
Subject: [Pljava-dev] pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-10-02 15:02:56
Message-ID: 45212A20.60204@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

reassign 390661 postgresql-8.1-pljava-gcj
thanks

Hi, Joost,

Joost Kraaijeveld wrote:
> Mmmmm. If the gjc team changed it's packaging in all architectures and
> pljava is depending on an upstream package it might be wiser to change
> pljava and file the report on the plajava package....

Yes, it seems you're right. Too bad that I already filed a bug.

So it should be reassigned to pljava.

However, I read the Debian Changes of libgcj, and did not find any clear
mentioning of why and how that was changed.

Sorry,
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/20061002/e971b659/attachment.bin>


From: schabi at logix-tt(dot)com (Markus Schaber)
To:
Subject: [Pljava-dev] Bug#390661: pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2006-11-04 11:50:15
Message-ID: 454C7E77.3060706@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Hi, Matthias,

Matthias Klose wrote:

>> So it should be reassigned to pljava.

Somehow, the but reassignment did not work. Matthias, can you try it?

>> However, I read the Debian Changes of libgcj, and did not find any clear
>> mentioning of why and how that was changed.
>
> these are changes pulled from gcc-4.2/classpath-0.92. JNI_CreateJavaVM
> can be found in libjvm.

So it seems we need to change the linker flags in the Makefile, right?

> Note that it's not necessary anymore to include the precompiled jar
> file in the library.

Personally, I see it as an advantage to have the precompiled jar
included in the library, that eases deployment.

> Building native code using dh_nativejava and/or
> aot-compile should be used instead.

dh_nativejava would be ugly for upstream, it will only fix the problem
for deban users, I presume?

> Documentation pending ...

Any progress here?

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/20061104/7d2c19d3/attachment.bin>


From: christophe(dot)roux at acoeur(dot)fr (Christophe Roux)
To:
Subject: [Pljava-dev] Bug#390661: pljava on Debian AMD64: undefined symbol: JNI_CreateJavaVM during installation
Date: 2007-01-20 15:17:33
Message-ID: loom.20070120T161007-100@post.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pljava-dev

Markus Schaber <schabi <at> logix-tt.com> writes:

>
> Hi, Matthias,
>
> Matthias Klose wrote:
>
> >> So it should be reassigned to pljava.
>
> Somehow, the but reassignment did not work. Matthias, can you try it?
>
> >> However, I read the Debian Changes of libgcj, and did not find any clear
> >> mentioning of why and how that was changed.
> >
> > these are changes pulled from gcc-4.2/classpath-0.92. JNI_CreateJavaVM
> > can be found in libjvm.
>
> So it seems we need to change the linker flags in the Makefile, right?
>
> > Note that it's not necessary anymore to include the precompiled jar
> > file in the library.
>
> Personally, I see it as an advantage to have the precompiled jar
> included in the library, that eases deployment.
>
> > Building native code using dh_nativejava and/or
> > aot-compile should be used instead.
>
> dh_nativejava would be ugly for upstream, it will only fix the problem
> for deban users, I presume?
>
> > Documentation pending ...
>
> Any progress here?
>
> Thanks,
> Markus

I read the description of the dh_nativejar command:
it can compile jar to native binary.
But what about pljava.so, using C for JNI code?
Could you tell me precisely how to modify the makefile for pljava.so
in order to
solve this problem.
I can add the problem is not specific to amd64 but occurs also
on Debian Etch i386:
I have the same problem with the following configuration:
uname -a
Linux acoeur-e 2.6.18-3-k7 #1 SMP Mon Dec 4 17:23:11 UTC 2006 i686 GNU/Linux

regards,
Christophe