FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development Java

 
 
LinkBack Thread Tools
 
Old 03-26-2011, 05:34 PM
Mat Booth
 
Default Default java.library.path in Fedora

In F14's OpenJDK, the default java.library.path currently does not
include /usr/local/lib or /usr/local/lib64 so if a third party JNI
library installs itself into one of those directories then the JVM
will not know about it.

Is this a bug? I think it would be appropriate if /usr/local/lib and
/usr/local/lib64 were included in the default java.library.path

Thanks,
Mat

--
Mat Booth
http://fedoraproject.org/get-fedora
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel
 
Old 03-27-2011, 12:54 PM
John Dennis
 
Default Default java.library.path in Fedora

On 03/26/2011 02:34 PM, Mat Booth wrote:
> In F14's OpenJDK, the default java.library.path currently does not
> include /usr/local/lib or /usr/local/lib64 so if a third party JNI
> library installs itself into one of those directories then the JVM
> will not know about it.
>
> Is this a bug? I think it would be appropriate if /usr/local/lib and
> /usr/local/lib64 were included in the default java.library.path

You might want to have a look at:

https://bugzilla.redhat.com/show_bug.cgi?id=665576

where there is a lively discussion of where and how JNI libraries get
installed. I don't think there has been a resolution on the the issue
yet so you might want to add your 2 cents on the topic.

--
John Dennis <jdennis@redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel
 
Old 03-28-2011, 11:08 AM
Andrew Haley
 
Default Default java.library.path in Fedora

On 26/03/11 18:34, Mat Booth wrote:
> In F14's OpenJDK, the default java.library.path currently does not
> include /usr/local/lib or /usr/local/lib64 so if a third party JNI
> library installs itself into one of those directories then the JVM
> will not know about it.
>
> Is this a bug? I think it would be appropriate if /usr/local/lib and
> /usr/local/lib64 were included in the default java.library.path

I wouldn't have thought so. /usr/local/lib isn't really standard for
anything. Even if we could patch OpenJDK to do this, the third party
apps would immediately break with any other JRE.

Doesn't it make more sense for the app to know where its native library
is, and load it from the right place?

Andrew.
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel
 
Old 03-28-2011, 11:23 AM
Mat Booth
 
Default Default java.library.path in Fedora

On 28 March 2011 12:08, Andrew Haley <aph@redhat.com> wrote:
> On 26/03/11 18:34, Mat Booth wrote:
>> In F14's OpenJDK, the default java.library.path currently does not
>> include /usr/local/lib or /usr/local/lib64 so if a third party JNI
>> library installs itself into one of those directories then the JVM
>> will not know about it.
>>
>> Is this a bug? I think it would be appropriate if /usr/local/lib and
>> /usr/local/lib64 were included in the default java.library.path
>
> I wouldn't have thought so. */usr/local/lib isn't really standard for
> anything. *Even if we could patch OpenJDK to do this, the third party
> apps would immediately break with any other JRE.
>
> Doesn't it make more sense for the app to know where its native library
> is, and load it from the right place?
>
> Andrew.
> --

I would rather the app not have to care where the libraries are, but
for some odd reason the autotools in Fedora uses a default prefix of
/usr/local rather than /usr

If this is not a standard location then maybe this is an autotools
bug? I shouldn't have to tell the autotools where it is appropriate to
install things for the operating system it ships with :-/

Either way, I expect the default settings to just work.

--
Mat Booth
http://fedoraproject.org/get-fedora
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel
 
Old 03-28-2011, 11:34 AM
Andrew Haley
 
Default Default java.library.path in Fedora

On 28/03/11 12:23, Mat Booth wrote:
> On 28 March 2011 12:08, Andrew Haley <aph@redhat.com> wrote:
>> On 26/03/11 18:34, Mat Booth wrote:
>>> In F14's OpenJDK, the default java.library.path currently does not
>>> include /usr/local/lib or /usr/local/lib64 so if a third party JNI
>>> library installs itself into one of those directories then the JVM
>>> will not know about it.
>>>
>>> Is this a bug? I think it would be appropriate if /usr/local/lib and
>>> /usr/local/lib64 were included in the default java.library.path
>>
>> I wouldn't have thought so. /usr/local/lib isn't really standard for
>> anything. Even if we could patch OpenJDK to do this, the third party
>> apps would immediately break with any other JRE.
>>
>> Doesn't it make more sense for the app to know where its native library
>> is, and load it from the right place?
>
> I would rather the app not have to care where the libraries are, but
> for some odd reason the autotools in Fedora uses a default prefix of
> /usr/local rather than /usr
>
> If this is not a standard location then maybe this is an autotools
> bug? I shouldn't have to tell the autotools where it is appropriate to
> install things for the operating system it ships with :-/

I think autotools has done this since the year dot. It's not going to
change now.

> Either way, I expect the default settings to just work.

This isn't just a Fedora problem. Finding JNI libraries is a PITA in
general, and patching OpenJDK to do something different from every other
JRE isn't a good idea. I'm not at all sure it makes sense to fix this
locally in Fedora. We'd want to make sure this is fixed for all GNU/
Linux systems, everywhere.

Andrew.
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel
 
Old 03-28-2011, 12:27 PM
Mat Booth
 
Default Default java.library.path in Fedora

On 28 March 2011 12:34, Andrew Haley <aph@redhat.com> wrote:
> On 28/03/11 12:23, Mat Booth wrote:
>> On 28 March 2011 12:08, Andrew Haley <aph@redhat.com> wrote:
>>> On 26/03/11 18:34, Mat Booth wrote:
>>>> In F14's OpenJDK, the default java.library.path currently does not
>>>> include /usr/local/lib or /usr/local/lib64 so if a third party JNI
>>>> library installs itself into one of those directories then the JVM
>>>> will not know about it.
>>>>
>>>> Is this a bug? I think it would be appropriate if /usr/local/lib and
>>>> /usr/local/lib64 were included in the default java.library.path
>>>
>>> I wouldn't have thought so. */usr/local/lib isn't really standard for
>>> anything. *Even if we could patch OpenJDK to do this, the third party
>>> apps would immediately break with any other JRE.
>>>
>>> Doesn't it make more sense for the app to know where its native library
>>> is, and load it from the right place?
>>
>> I would rather the app not have to care where the libraries are, but
>> for some odd reason the autotools in Fedora uses a default prefix of
>> /usr/local rather than /usr
>>
>> If this is not a standard location then maybe this is an autotools
>> bug? I shouldn't have to tell the autotools where it is appropriate to
>> install things for the operating system it ships with :-/
>
> I think autotools has done this since the year dot. *It's not going to
> change now.
>
>> Either way, I expect the default settings to just work.
>
> This isn't just a Fedora problem. *Finding JNI libraries is a PITA in
> general, and patching OpenJDK to do something different from every other
> JRE isn't a good idea. *I'm not at all sure it makes sense to fix this
> locally in Fedora. *We'd want to make sure this is fixed for all GNU/
> Linux systems, everywhere.
>
> Andrew.
>


Can open, worms everywhere... :-)

For my use case I can just tell the configure script where to go,
which I can live with. Thanks for the info, though.


--
Mat Booth
http://fedoraproject.org/get-fedora
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel
 
Old 03-28-2011, 12:38 PM
Stanislav Ochotnicky
 
Default Default java.library.path in Fedora

Excerpts from Mat Booth's message of Mon Mar 28 13:23:00 +0200 2011:
> On 28 March 2011 12:08, Andrew Haley <aph@redhat.com> wrote:
> > On 26/03/11 18:34, Mat Booth wrote:
> >> In F14's OpenJDK, the default java.library.path currently does not
> >> include /usr/local/lib or /usr/local/lib64 so if a third party JNI
> >> library installs itself into one of those directories then the JVM
> >> will not know about it.
> >>
> >> Is this a bug? I think it would be appropriate if /usr/local/lib and
> >> /usr/local/lib64 were included in the default java.library.path
> >
> > I wouldn't have thought so. */usr/local/lib isn't really standard for
> > anything. *Even if we could patch OpenJDK to do this, the third party
> > apps would immediately break with any other JRE.
> >
> > Doesn't it make more sense for the app to know where its native library
> > is, and load it from the right place?
> >
> > Andrew.
> > --
>
> I would rather the app not have to care where the libraries are, but
> for some odd reason the autotools in Fedora uses a default prefix of
> /usr/local rather than /usr
>
> If this is not a standard location then maybe this is an autotools
> bug? I shouldn't have to tell the autotools where it is appropriate to
> install things for the operating system it ships with :-/
>
> Either way, I expect the default settings to just work.

I know you already solved your problem, so this is just FYI.

AFAIK autotools always default to /usr/local when doing pure
./configure. Fedora's %configure macro changes --prefix to /usr to
make this correct for us.

So if you are creating some rpm that uses autotools, you'd better use
%configure macro (it sets more things, not just --prefix).


--
Stanislav Ochotnicky <sochotnicky@redhat.com>
Software Engineer - Base Operating Systems Brno

PGP: 7B087241
Red Hat Inc. http://cz.redhat.com
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel
 
Old 03-28-2011, 02:07 PM
John Dennis
 
Default Default java.library.path in Fedora

On 03/28/2011 07:23 AM, Mat Booth wrote:
> I would rather the app not have to care where the libraries are, but
> for some odd reason the autotools in Fedora uses a default prefix of
> /usr/local rather than /usr
>
> If this is not a standard location then maybe this is an autotools
> bug? I shouldn't have to tell the autotools where it is appropriate to
> install things for the operating system it ships with :-/
>
> Either way, I expect the default settings to just work.

They do if you follow the guidelines. There are certain parameters you
must pass to configure in the RPM spec file. The Fedora packaging guide
lines cover this material, see:

Start here:
https://fedoraproject.org/wiki/Category:Package_Maintainers

In particular read this:
https://fedoraproject.org/wiki/How_to_create_an_RPM_package

--
John Dennis <jdennis@redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel
 
Old 03-28-2011, 05:48 PM
Dr Andrew John Hughes
 
Default Default java.library.path in Fedora

On 12:34 Mon 28 Mar , Andrew Haley wrote:
> On 28/03/11 12:23, Mat Booth wrote:
> > On 28 March 2011 12:08, Andrew Haley <aph@redhat.com> wrote:
> >> On 26/03/11 18:34, Mat Booth wrote:
> >>> In F14's OpenJDK, the default java.library.path currently does not
> >>> include /usr/local/lib or /usr/local/lib64 so if a third party JNI
> >>> library installs itself into one of those directories then the JVM
> >>> will not know about it.
> >>>
> >>> Is this a bug? I think it would be appropriate if /usr/local/lib and
> >>> /usr/local/lib64 were included in the default java.library.path
> >>
> >> I wouldn't have thought so. /usr/local/lib isn't really standard for
> >> anything. Even if we could patch OpenJDK to do this, the third party
> >> apps would immediately break with any other JRE.
> >>
> >> Doesn't it make more sense for the app to know where its native library
> >> is, and load it from the right place?
> >
> > I would rather the app not have to care where the libraries are, but
> > for some odd reason the autotools in Fedora uses a default prefix of
> > /usr/local rather than /usr
> >
> > If this is not a standard location then maybe this is an autotools
> > bug? I shouldn't have to tell the autotools where it is appropriate to
> > install things for the operating system it ships with :-/
>
> I think autotools has done this since the year dot. It's not going to
> change now.
>

Correct: http://www.gnu.org/software/autoconf/manual/autoconf.html#Default-Prefix

And it's the correct default IMHO so local user installations don't interfere
with system/distro-installed packages in /usr.

> > Either way, I expect the default settings to just work.
>
> This isn't just a Fedora problem. Finding JNI libraries is a PITA in
> general, and patching OpenJDK to do something different from every other
> JRE isn't a good idea. I'm not at all sure it makes sense to fix this
> locally in Fedora. We'd want to make sure this is fixed for all GNU/
> Linux systems, everywhere.
>

I agree. If it's to be done at all, it needs to be discussed on the appropriate
OpenJDK mailing list (probably core-libs-dev or hotspot-dev).

> Andrew.
> --
> java-devel mailing list
> java-devel@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/java-devel

--
Andrew

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and IcedTea
http://www.gnu.org/software/classpath
http://icedtea.classpath.org
PGP Key: F5862A37 (https://keys.indymedia.org/)
Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel
 

Thread Tools




All times are GMT. The time now is 08:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org