Debian Bug report logs - #382686
sun-java5-jre does not add /usr/lib/jni to the library path

version graph

Package: sun-java5-jre; Maintainer for sun-java5-jre is (unknown);

Reported by: Marc Petit-Huguenin <marc@petit-huguenin.org>

Date: Sat, 12 Aug 2006 17:18:16 UTC

Severity: important

Tags: patch, wontfix

Found in version sun-java5/1.5.0-07-1

Blocking fix for 714393: sikuli-ide command does nothing except writing "[info] locale: fr_FR" when java alternative is pointing to sun (java-6-sun)

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@ubuntu.com>:
Bug#382686; Package sun-java5-jre. Full text and rfc822 format available.

Acknowledgement sent to Marc Petit-Huguenin <marc@petit-huguenin.org>:
New Bug report received and forwarded. Copy sent to Matthias Klose <doko@ubuntu.com>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Marc Petit-Huguenin <marc@petit-huguenin.org>
To: submit@bugs.debian.org
Subject: sun-java5-jre does not add /usr/lib/jni to the library path
Date: Sat, 12 Aug 2006 10:01:35 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: sun-java5-jre
Version: 1.5.0-07-1

The Debian policy for Java[1] says:

"If a virtual machine supports native code, it must include the
directory /usr/lib/jni in its search path for these dynamic libraries."

The sun-java5-bin package does not add this directory in the library
search path.

Thanks.


[1]
http://www.debian.org/doc/packaging-manuals/java-policy/c36.html#policy-vm

- --
Marc Petit-Huguenin
Home: marc@petit-huguenin.org
Work: marc@8x8.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE3glv9RoMZyVa61cRAkMaAJ0WwwWL7KV6uKsqWClrSox7KQ0ouACeJybV
beefbcbaOCBcOsxvJj9F+dc=
=5mgx
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@ubuntu.com>:
Bug#382686; Package sun-java5-jre. Full text and rfc822 format available.

Acknowledgement sent to Jérôme Marant <jerome@marant.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@ubuntu.com>. Full text and rfc822 format available.

Message #10 received at 382686@bugs.debian.org (full text, mbox):

From: Jérôme Marant <jerome@marant.org>
To: 382686@bugs.debian.org
Subject: Any news?
Date: Sun, 26 Nov 2006 15:15:34 +0100
Hi,

Is there any reason why this bug has not been fixed yet?
Would it possible to fix it?

Thanks in advance.
-- 
Jérôme Marant



Severity set to `serious' from `normal' Request was from Arto Jantunen <viiru@debian.org> to control@bugs.debian.org. (Thu, 19 Feb 2009 11:03:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#382686; Package sun-java5-jre. (Sat, 14 Mar 2009 17:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@ubuntu.com>:
Extra info received and forwarded to list. (Sat, 14 Mar 2009 17:48:02 GMT) Full text and rfc822 format available.

Message #17 received at 382686@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@ubuntu.com>
To: 382686@bugs.debian.org
Cc: Debian Bug Tracking System <control@bugs.debian.org>, Debian Java Liste <debian-java@lists.debian.org>
Subject: Re: /usr/lib/jni in library path for sun-java[56]
Date: Sat, 14 Mar 2009 18:45:10 +0100
severity 382686 important
tag 382686 + wontfix
thanks

these are binaries, and we are not allowed to ship those in modified form.




Severity set to `important' from `serious' Request was from Matthias Klose <doko@ubuntu.com> to control@bugs.debian.org. (Sat, 14 Mar 2009 17:48:04 GMT) Full text and rfc822 format available.

Tags added: wontfix Request was from Matthias Klose <doko@ubuntu.com> to control@bugs.debian.org. (Sat, 14 Mar 2009 17:48:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@ubuntu.com>:
Bug#382686; Package sun-java5-jre. (Fri, 12 Nov 2010 14:54:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Scott Howard <showard314@gmail.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@ubuntu.com>. (Fri, 12 Nov 2010 14:54:06 GMT) Full text and rfc822 format available.

Message #26 received at 382686@bugs.debian.org (full text, mbox):

From: Scott Howard <showard314@gmail.com>
To: Debian Java Maintainers <debian-java@lists.debian.org>, 382686@bugs.debian.org, control@bugs.debian.org
Subject: Re: /usr/lib/jni not put in java.library.path, sun java 5 and 6
Date: Fri, 12 Nov 2010 09:51:02 -0500
affects 382686 sun-java6-jre
thanks

I would to revisit this bug. I agree with the debian policy decision
to keep compiled binaries in /usr/lib/jni/, but I'm getting frequent
bug reports and emails form users of a library I maintain telling me
that I installed the library to the wrong location [1-8, and personal
correspondence]. I know we can't change the binaries, but can we
somehow export this simple variable [9] in a wrapper so that all
systems (that install sun-java) know to look in /usr/lib/jni? I think
that would be a simple solution that will satisfy users so that they
don't think our libraries are all broken.

Thanks for the consideration.

[1] https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/325506
[2] https://bugs.launchpad.net/ubuntu/+source/rxtx/+bug/380027
[3] https://bugs.launchpad.net/ubuntu/+source/arduino/+bug/664309
[4] https://bugs.launchpad.net/ubuntu/+source/rxtx/+bug/667321
[5] http://code.google.com/p/diy-zoning/issues/detail?id=8
[6] http://code.google.com/p/arduino/issues/detail?id=385
[7] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602041
[8] http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1287491932
[9] LD_LIBRARY_PATH="/usr/lib/jni${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"


Regards,
Scott




Added indication that 382686 affects sun-java6-jre Request was from Scott Howard <showard314@gmail.com> to control@bugs.debian.org. (Fri, 12 Nov 2010 14:54:08 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@ubuntu.com>:
Bug#382686; Package sun-java5-jre. (Sat, 13 Nov 2010 15:54:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Scott Howard <showard314@gmail.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@ubuntu.com>. (Sat, 13 Nov 2010 15:54:06 GMT) Full text and rfc822 format available.

Message #33 received at 382686@bugs.debian.org (full text, mbox):

From: Scott Howard <showard314@gmail.com>
To: Sylvestre Ledru <sylvestre@debian.org>
Cc: Debian Java Maintainers <debian-java@lists.debian.org>, 382686@bugs.debian.org, 325506@bugs.launchpad.net
Subject: Re: /usr/lib/jni not put in java.library.path, sun java 5 and 6
Date: Sat, 13 Nov 2010 10:52:39 -0500
Le vendredi 12 novembre 2010 à 09:51 -0500, Scott Howard a écrit :
> I would to revisit this bug. I agree with the debian policy decision
> to keep compiled binaries in /usr/lib/jni/, but I'm getting frequent
> bug reports and emails form users of a library I maintain telling me
> that I installed the library to the wrong location [1-8, and personal
> correspondence]. I know we can't change the binaries, but can we
> somehow export this simple variable [9] in a wrapper so that all
> systems (that install sun-java) know to look in /usr/lib/jni? I think
> that would be a simple solution that will satisfy users so that they
> don't think our libraries are all broken.
>[9] LD_LIBRARY_PATH="/usr/lib/jni${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"

On Fri, Nov 12, 2010 at 11:57 AM, Sylvestre Ledru <sylvestre@debian.org> wrote:
> I agree with you we should do that.
> I had a (too) quick look on this and doing some modifications
> in /etc/java-6-sun/* might fix this bug.

That would work too, I'm not too familiar with how the sun package is
put together with the properties files in /etc, but the
java.library.path property is what should be appended (or set).

a properties file that looks something like:
# Tells java to look for JNI libraries in the Debian policy location
java.library.path=/usr/lib/jni

I don't know if we would need to do some substr magic to append the
path, or if that is typically an empty variable to begin with. I
couldn't find documentation saying whether or not it should be
appended or if it is ok to set to a single directory. I also don't
know if a user setting LD_LIBRARY_PATH on their own overwrites our
java.library.path




Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@ubuntu.com>:
Bug#382686; Package sun-java5-jre. (Wed, 17 Nov 2010 15:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Scott Howard <showard314@gmail.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@ubuntu.com>. (Wed, 17 Nov 2010 15:57:03 GMT) Full text and rfc822 format available.

Message #38 received at 382686@bugs.debian.org (full text, mbox):

From: Scott Howard <showard314@gmail.com>
To: Sylvestre Ledru <sylvestre@debian.org>, control@bugs.debian.org, Marc Petit-Huguenin <marc@petit-huguenin.org>
Cc: Debian Java Maintainers <debian-java@lists.debian.org>, 382686@bugs.debian.org, 325506@bugs.launchpad.net
Subject: Re: /usr/lib/jni not put in java.library.path, sun java 5 and 6
Date: Wed, 17 Nov 2010 10:54:12 -0500
[Message part 1 (text/plain, inline)]
tags 382686 patch
thanks

On Sat, Nov 13, 2010 at 10:52 AM, Scott Howard <showard314@gmail.com> wrote:
> I also don't
> know if a user setting LD_LIBRARY_PATH on their own overwrites our
> java.library.path
>

Setting LD_LIBRARY_PATH appends java.library.path, but passing
-Djava.library.path to java overwrites java.library.path [1]

> On Fri, Nov 12, 2010 at 11:57 AM, Sylvestre Ledru <sylvestre@debian.org> wrote:
>> I agree with you we should do that.
>> I had a (too) quick look on this and doing some modifications
>> in /etc/java-6-sun/* might fix this bug.
>

sun java doesn't use a .properties file to override the system
defaults on start up.  IBM's java does [2], but there is no
corresponding feature in sun java that I can find (and others
apparently can't find it either[3].)



I created a patch (attached) for the debian packaging which replicates
what is done with javaws. I have a template in debian/ which is filled
in to point to the correct directory, then is installed into
/@BASEDIR/jre/bin. The original java binary is moved to java.real and
is called by the wrapper after properly setting LD_LIBRARY_PATH



[1]
import java.util.Properties;
public class javalibraryfinder {

   public static void main(String[] args) {
       // low level classpath, includes system jars
       System.out.println( System.getProperty( "java.library.path" ) );

   }

}



showard@s-desktop:~$ java -Djava.library.path=/TEST javalibraryfinder
/TEST

showard@s-desktop:~$ LD_LIBRARY_PATH=/TEST java javalibraryfinder
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/TEST:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib

[2] http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Frzaha%2Fsdpropf.htm
[3] http://echelog.matzon.dk/logs/browse/java/1234393200
#java channel on freenode Feb 12,2009:

[01:43:28] <nog_lorp> is there a way I can configure JVM system
properties globally for Sun Java?
[01:44:11] <nog_lorp> IBMs java docs mentions the
SystemDefault.properties file, but that is not mentioned anywhere by
sun
[01:44:15] <nog_lorp> and doesn't work
[java_library.patch (application/octet-stream, attachment)]

Added tag(s) patch. Request was from Scott Howard <showard314@gmail.com> to control@bugs.debian.org. (Wed, 17 Nov 2010 15:57:08 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@ubuntu.com>:
Bug#382686; Package sun-java5-jre. (Thu, 18 Nov 2010 14:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Scott Howard <showard314@gmail.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@ubuntu.com>. (Thu, 18 Nov 2010 14:48:03 GMT) Full text and rfc822 format available.

Message #45 received at 382686@bugs.debian.org (full text, mbox):

From: Scott Howard <showard314@gmail.com>
To: Sylvestre Ledru <sylvestre@debian.org>, Marc Petit-Huguenin <marc@petit-huguenin.org>, Debian Java Maintainers <debian-java@lists.debian.org>, 382686@bugs.debian.org, 325506@bugs.launchpad.net
Subject: Re: /usr/lib/jni not put in java.library.path, sun java 5 and 6
Date: Thu, 18 Nov 2010 09:45:18 -0500
> However, I don't see this change going in Squeeze. If you are OK, I will
> upload your modification as soon as Squeeze is out (and also in Ubuntu).
> This will allow us some deeper testing and potential side effects.
>
> How does it sound ?
> Sylvestre

Sounds great - I didn't expect it to get into squeeze/ubuntu and think
it needs testing before making into a stable release.


I don't know if you saw this:

On Wed, Nov 17, 2010 at 11:24 AM, Matthias Klose
<matthias.klose@canonical.com> wrote:
>> On Sat, Nov 13, 2010 at 10:52 AM, Scott Howard<showard314@gmail.com>  wrote:
>>> I also don't
>>> know if a user setting LD_LIBRARY_PATH on their own overwrites our
>>> java.library.path
>
> this is incomplete; only works if the jvm is called by the java binary.
>

I'm seeking some more help from java people at sun one last time
before we might have to just say that an incomplete solution might be
the only policy-compliant [1] solution for a non-free package. Please,
if anyone knows of a better way let us know (the joys of non-free
packages: features can be undocumented and a mystery!). The best fix
is to use open-jdk, which I've been suggesting to users.



[1] http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.9




Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@ubuntu.com>:
Bug#382686; Package sun-java5-jre. (Thu, 18 Nov 2010 14:57:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sylvestre Ledru <sylvestre@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@ubuntu.com>. (Thu, 18 Nov 2010 14:57:06 GMT) Full text and rfc822 format available.

Message #50 received at 382686@bugs.debian.org (full text, mbox):

From: Sylvestre Ledru <sylvestre@debian.org>
To: Scott Howard <showard314@gmail.com>
Cc: Marc Petit-Huguenin <marc@petit-huguenin.org>, Debian Java Maintainers <debian-java@lists.debian.org>, 382686@bugs.debian.org, 325506@bugs.launchpad.net, Tom Marble <tmarble@info9.net>
Subject: Re: /usr/lib/jni not put in java.library.path, sun java 5 and 6
Date: Thu, 18 Nov 2010 15:53:45 +0100
Le jeudi 18 novembre 2010 à 09:45 -0500, Scott Howard a écrit :
> > However, I don't see this change going in Squeeze. If you are OK, I will
> > upload your modification as soon as Squeeze is out (and also in Ubuntu).
> > This will allow us some deeper testing and potential side effects.
> >
> > How does it sound ?
> > Sylvestre
> 
> Sounds great - I didn't expect it to get into squeeze/ubuntu and think
> it needs testing before making into a stable release.
Indeed

> 
> I don't know if you saw this:
I did.

> On Wed, Nov 17, 2010 at 11:24 AM, Matthias Klose
> <matthias.klose@canonical.com> wrote:
> >> On Sat, Nov 13, 2010 at 10:52 AM, Scott Howard<showard314@gmail.com>  wrote:
> >>> I also don't
> >>> know if a user setting LD_LIBRARY_PATH on their own overwrites our
> >>> java.library.path
> >
> > this is incomplete; only works if the jvm is called by the java binary.
> >
> 
> I'm seeking some more help from java people at sun one last time
> before we might have to just say that an incomplete solution might be
> the only policy-compliant [1] solution for a non-free package. 

Maybe Tom (C/C of this email) can help us here.

Sylvestre






Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#382686; Package sun-java5-jre. (Fri, 19 Nov 2010 02:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@ubuntu.com>:
Extra info received and forwarded to list. (Fri, 19 Nov 2010 02:03:02 GMT) Full text and rfc822 format available.

Message #55 received at 382686@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@ubuntu.com>
To: Sylvestre Ledru <sylvestre@debian.org>
Cc: Scott Howard <showard314@gmail.com>, Marc Petit-Huguenin <marc@petit-huguenin.org>, Debian Java Maintainers <debian-java@lists.debian.org>, 382686@bugs.debian.org, 325506@bugs.launchpad.net
Subject: Re: /usr/lib/jni not put in java.library.path, sun java 5 and 6
Date: Fri, 19 Nov 2010 02:59:51 +0100
On 17.11.2010 17:09, Sylvestre Ledru wrote:
> Le mercredi 17 novembre 2010 à 10:54 -0500, Scott Howard a écrit :
>> tags 382686 patch
>> thanks
>>
>> On Sat, Nov 13, 2010 at 10:52 AM, Scott Howard<showard314@gmail.com>  wrote:
>>> I also don't
>>> know if a user setting LD_LIBRARY_PATH on their own overwrites our
>>> java.library.path
>>>
>>
>> Setting LD_LIBRARY_PATH appends java.library.path, but passing
>> -Djava.library.path to java overwrites java.library.path [1]
>>
>>> On Fri, Nov 12, 2010 at 11:57 AM, Sylvestre Ledru<sylvestre@debian.org>  wrote:
>>>> I agree with you we should do that.
>>>> I had a (too) quick look on this and doing some modifications
>>>> in /etc/java-6-sun/* might fix this bug.
>>>
>>
>> sun java doesn't use a .properties file to override the system
>> defaults on start up.  IBM's java does [2], but there is no
>> corresponding feature in sun java that I can find (and others
>> apparently can't find it either[3].)
>>
>>
>>
>> I created a patch (attached) for the debian packaging which replicates
>> what is done with javaws. I have a template in debian/ which is filled
>> in to point to the correct directory, then is installed into
>> /@BASEDIR/jre/bin. The original java binary is moved to java.real and
>> is called by the wrapper after properly setting LD_LIBRARY_PATH
> OK. Thanks for spending some time on this.
>
> However, I don't see this change going in Squeeze. If you are OK, I will
> upload your modification as soon as Squeeze is out (and also in Ubuntu).
> This will allow us some deeper testing and potential side effects.
>
> How does it sound ?

not good. The license only allows unmodified distribution, plus it only "helps" 
when calling the "java" binary, not when starting the VM in other ways.

  Matthias




Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@ubuntu.com>:
Bug#382686; Package sun-java5-jre. (Fri, 19 Nov 2010 04:54:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Scott Howard <showard314@gmail.com>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@ubuntu.com>. (Fri, 19 Nov 2010 04:54:06 GMT) Full text and rfc822 format available.

Message #60 received at 382686@bugs.debian.org (full text, mbox):

From: Scott Howard <showard314@gmail.com>
To: Matthias Klose <doko@ubuntu.com>
Cc: Sylvestre Ledru <sylvestre@debian.org>, Marc Petit-Huguenin <marc@petit-huguenin.org>, Debian Java Maintainers <debian-java@lists.debian.org>, 382686@bugs.debian.org, 325506@bugs.launchpad.net
Subject: Re: /usr/lib/jni not put in java.library.path, sun java 5 and 6
Date: Thu, 18 Nov 2010 23:51:40 -0500
On Thu, Nov 18, 2010 at 8:59 PM, Matthias Klose <doko@ubuntu.com> wrote:
> not good. The license only allows unmodified distribution, plus it only
> "helps" when calling the "java" binary, not when starting the VM in other
> ways.
>
>  Matthias

If that's the way it is, then that's it.

If the license only allows unmodified distribution, is Debian allowed
to make the wrapper for java web start?
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489833




Added indication that bug 382686 blocks 714393 Request was from Gilles Filippini <pini@debian.org> to control@bugs.debian.org. (Sat, 13 Jul 2013 13:33:18 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 00:12:40 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.