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 > Gentoo > Gentoo Alt

 
 
LinkBack Thread Tools
 
Old 02-10-2011, 08:13 PM
Perry Smith
 
Default AIX linking adventure

On Feb 10, 2011, at 11:26 AM, Michael Haubenwallner wrote:
Although runpath search is affected by LIBPATH, I'm just fine with that.
This is the outcome of using "-L" and "-l" linker flags together.
I thought this was one of your objectives based on the fact that java sets LIBPATH
to something weird and it breaks everything.
Nope. The problem with LIBPATH set by java was that there is nothing
like "soname". Iff my binary had searched for the /file/ "libiconv.so.2"
(either archive or not) instead of "libiconv.a(libiconv.so.2)", even with
LIBPATH set to "/usr/lib" it would not have found "/usr/lib/libiconv.a"
(without "libiconv.so.2" member), but continued along LIBPATH + runpath
until it found the "libiconv.so.2" file in its usual place.
Hmmm... ok. *I had forgotten that detail.

Yes, a detail - but a really important one for package managers.

Are you oppose to hardcoded paths? *Over the past month or so,I've come to like them.
Seems we have to agree on some terms to be used first.
Yes. *
I like "fixed" for entries not affected by runtime search.
"fixed" = "hardcoded" (see above).
The other tact would be to note that PATH is either empty or not.
"A path dependency with no path" or "a dependency with a path" ?
Which "PATH" ("path") do you refer to here that can be either empty or not?

In the dump -H output above, there is a column called PATH. *That PATH. *I apologize for being
so consistently vague.

Ah, ok. But what is a "path dependency with no path" ?

That should have been just "a dependency with no path"

Yes, "/staging" is the same as "/image" - apparently I've missed
a few when replacing "/staging" by "/image". Sorry for confusion.
But that's not the reason you got lost, is it?

"lost" maybe wasn't the right term. *When I figured out image and stagingwhere probably the same, I got back on track.
 
Old 02-13-2011, 02:07 PM
Perry Smith
 
Default AIX linking adventure

On Feb 10, 2011, at 11:26 AM, Michael Haubenwallner wrote:

>>>>> Although runpath search is affected by LIBPATH, I'm just fine with that.
>>>>> This is the outcome of using "-L" and "-l" linker flags together.
>>>> I thought this was one of your objectives based on the fact that java sets LIBPATH
>>>> to something weird and it breaks everything.
>>> Nope. The problem with LIBPATH set by java was that there is nothing
>>> like "soname". Iff my binary had searched for the /file/ "libiconv.so.2"
>>> (either archive or not) instead of "libiconv.a(libiconv.so.2)", even with
>>> LIBPATH set to "/usr/lib" it would not have found "/usr/lib/libiconv.a"
>>> (without "libiconv.so.2" member), but continued along LIBPATH + runpath
>>> until it found the "libiconv.so.2" file in its usual place.
>> Hmmm... ok. I had forgotten that detail.
>
> Yes, a detail - but a really important one for package managers.

It occurred to me that this was true in your particular situation but
if Java (or a user) removes key paths from LIBPATH, the runtime
search will fail. Having 100% hardcoded paths solves that issue.

So, the system you have developed solves the particular issue
with Java but not the bigger issue of setting LIBPATH to some
whacko thing.

Perry
 
Old 02-21-2011, 03:14 PM
Michael Haubenwallner
 
Default AIX linking adventure

On 02/13/2011 04:07 PM, Perry Smith wrote:
>
> On Feb 10, 2011, at 11:26 AM, Michael Haubenwallner wrote:
>
>>>>>> Although runpath search is affected by LIBPATH, I'm just fine with that.
>>>>>> This is the outcome of using "-L" and "-l" linker flags together.
>>>>> I thought this was one of your objectives based on the fact that java sets LIBPATH
>>>>> to something weird and it breaks everything.
>>>> Nope. The problem with LIBPATH set by java was that there is nothing
>>>> like "soname". Iff my binary had searched for the /file/ "libiconv.so.2"
>>>> (either archive or not) instead of "libiconv.a(libiconv.so.2)", even with
>>>> LIBPATH set to "/usr/lib" it would not have found "/usr/lib/libiconv.a"
>>>> (without "libiconv.so.2" member), but continued along LIBPATH + runpath
>>>> until it found the "libiconv.so.2" file in its usual place.
>>> Hmmm... ok. I had forgotten that detail.
>>
>> Yes, a detail - but a really important one for package managers.
>
> It occurred to me that this was true in your particular situation but
> if Java (or a user) removes key paths from LIBPATH, the runtime
> search will fail. Having 100% hardcoded paths solves that issue.
>
> So, the system you have developed solves the particular issue
> with Java but not the bigger issue of setting LIBPATH to some
> whacko thing.

Well, having LIBPATH _set_ at all is calling for troubles anyway,
and is highly discouraged - not only within Gentoo Prefix.

But as Java is an IBM binary package I can't patch, and they add
/usr/lib:/lib only, this is no longer a problem for me now.

OTOH, when "libNAME.so.1" would be found somewhere else due to
LIBPATH being set, one should assume that this should be sufficient
too. This also allows for developers to try out a fix for libNAME.so.1
before needing to replace it at the final location.

But still, LIBPATH (as LD_LIBRARY_PATH in ELF) is for exceptional
circumstances only.

/haubi/
--
Michael Haubenwallner
Gentoo on a different level
 

Thread Tools




All times are GMT. The time now is 11:18 PM.

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