Location of absolute IA32 shared objects.
David-
No, you can actually check the architecture type in dlopen' and discover that you are trying to use the wrong library. (That's what I used to do before you discovered the better way of using the /etc/ld.so.cache'.)
Having said that I don't have a real strong opinion on this. You could try `/usr/ia32' first and, if there is a file there then it must be the one you want and if it isn't there then try the original path. Or, try the orignal path and, if it isn't there or has the wrong architecture, try the modified path. Either way works.
Quoted 22 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Don Dugger
Don> Bill raises an interesting problem. I'd like to suggest a Don> solution and see what everyone thinks. Since all of the shared Don> objects are loaded by code in `ld-linux.so' I can modify the Don> IA32 version of that library to first try an absolute path and, Don> if that fails, because it's missing or has the wrong Don> architecture, to then tack on a unique prefix, either something Don> like
/usr/ia32' or the contents of an environment variable Don> likeLD_IA32_PATH'.Wouldn't you have to try the prefix first? Otherwise, you might end up picking up an ia64 library.
--david_______________________________________________
ia64-list mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/ia64-list
Signature · 4 lines
Don Dugger "Censeo Toto nos in Kansa esse decisse." - D. Gale [email protected] Ph: 303/938-9838
Quoted 8 lines · Don Dugger
2) How do we deal with absolute path names in IA32 binaries? This is the question I'm concerned with right now. The sad reality of life is that there are rogue (I use the term
rogue' with tongue firmly planted in check) IA32 binaries that have hard coded absolute paths to certain libraries. I think we all agree thatstandard' libraries must be IA64 objects and, therefore, we need to find a way to deal with these rogue IA32 programs if we want them to run.
Quoted 4 lines
I have a proposed solution to 2 but it's not perfect. I was kind of hoping that someone had a better idea but it doesn't look like it. Unless someone comes up with a brainstorm I'll implement my idea and at least we should be able to run the rogue IA32 programs we know about.
Please take a look at include/asm-*/namei.h - we can define an emulation prefix for Linux/i386 (e.g. /emul/linux32) and all lookups will be tried there before falling back to the native FS, This appropeach is already used by the MIPS and SPARC ports and by linux-abi for i386.
Christoph
Signature · 1 line
Of course it doesn't work. We've performed a software upgrade.
I think there are two issues here, both important, but I was only trying to address the second question:
1) Exactly where do we put IA32 objects. Personally I don't care, to me this is just an arbitrary character string that needs to be added to path names and I use which ever one everybody agrees to. Unfortunately the Itanium specific ABI suggests where to put them but it doesn't explicitly specify where. The ABI only talks about IA64 objects, it doesn't explicitly deal with IA32 objects. A quick read of section 5.3.1 would say to me that /usr/lib/ia32', /usr/lib/ia32l32', /usr/lib/ia32l' or /usr/lib/l32' are all possible interpretations of where IA32 objects are placed. Again, I don't care, pick one. Doug is right, this is something that should be coordinated with the LSB.
2) How do we deal with absolute path names in IA32 binaries? This is the question I'm concerned with right now. The sad reality of life is that there are rogue (I use the term rogue' with tongue firmly planted in check) IA32 binaries that have hard coded absolute paths to certain libraries. I think we all agree that standard' libraries must be IA64 objects and, therefore, we need to find a way to deal with these rogue IA32 programs if we want them to run.
I have a proposed solution to 2 but it's not perfect. I was kind of hoping that someone had a better idea but it doesn't look like it. Unless someone comes up with a brainstorm I'll implement my idea and at least we should be able to run the rogue IA32 programs we know about.
Quoted 24 lines · Sunil Saxena
Have you folks looked at the "UNIX System V Application Binary Interface" at
http://developer.intel.com/design/IA-64/ ? Section 5.3.1 suggests locations for the libraries.Thanks
Sunil-----Original Message-----
From: Doug Beattie [mailto:[email protected]]
Sent: Wednesday, September 05, 2001 10:57 AM
To: Don Dugger
Cc: Bill Nottingham; [email protected]; [email protected]
Subject: Re: [Linux-ia64] Re: Wolverine RPMsDon and others:
Let's not forget what might need to be considered to allow LSB 32 bit compliant apps on IA64. Even though no one may ever certify for this, it would be nice to find out and follow a convention that would benefit all.
Doug
Signature · 4 lines
Don Dugger "Censeo Toto nos in Kansa esse decisse." - D. Gale [email protected] Ph: 303/938-9838
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Christoph Hellwig
Christoph> Please take a look at include/asm-*/namei.h - we can Christoph> define an emulation prefix for Linux/i386 Christoph> (e.g. /emul/linux32) and all lookups will be tried there Christoph> before falling back to the native FS, This appropeach is Christoph> already used by the MIPS and SPARC ports and by linux-abi Christoph> for i386.
I don't particularly like changing filenames underneath the user, but as far as I can see, it's the most systematic way to fix absolute naming issues. Unless someone has serious objections to this, I'll make this change. As far as I can see, neither LSB nor FHS address the issue of where to place emulation files, so I'll propose a prefix of "/emul/ia32-linux/" as a starter. Any objections?
(Note to Sunil: the IA-64 ABI is of no help here because we're talking
about files that are outside the standard library search paths and the issue is not really limited to shared objects only.)
--david
Quoted 3 lines · David Mosberger
As far as I can see, neither LSB nor FHS address the issue of where to place emulation files, so I'll propose a prefix of "/emul/ia32-linux/" as a starter. Any objections?
Not that I care, but this is clearly a place for a new /proc entry which can be changed by the sysadmin.
Signature · 3 lines
---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------
Quoted 8 lines · Ulrich Drepper
Quoted 3 lines · David Mosberger
As far as I can see, neither LSB nor FHS address the issue of where to place emulation files, so I'll propose a prefix of "/emul/ia32-linux/" as a starter. Any objections?
Not that I care, but this is clearly a place for a new /proc entry which can be changed by the sysadmin.
If that is the general consensus I will globally move the emul prefix stuff to /proc based values instead of compile-time defines.
Any objections?
Christoph
Signature · 1 line
Of course it doesn't work. We've performed a software upgrade.
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Ulrich Drepper
Quoted 3 lines · David Mosberger
As far as I can see, neither LSB nor FHS address the issue of where to place emulation files, so I'll propose a prefix of "/emul/ia32-linux/" as a starter. Any objections?
Quoted 7 lines
Quoted 2 lines
Not that I care, but this is clearly a place for a new /proc entry which can be changed by the sysadmin.
If that is the general consensus I will globally move the emul prefix stuff to /proc based values instead of compile-time defines.
Any objections?
RPM installs for ia32 apps/libs will need to use --prefix cat /proc/ia32prefix or whatever. If sysadmin subsequently changes the prefix, it wont work. Would a better solution be an ia32 specifc version of /etc/ld.so.conf? Or perhaps the /proc file should allow multiple search paths?
-- Mark
Quoted 5 lines · Mark Goodwin
RPM installs for ia32 apps/libs will need to use --prefix
cat /proc/ia32prefixor whatever.
If sysadmin subsequently changes the prefix, it wont work.
better solution be an ia32 specifc version of/etc/ld.so.conf? Or perhaps the /proc file should allow multiple search paths?
That was discussed before - the real issue are IA32 programms that hardcode pathes.
Christoph
Signature · 1 line
Of course it doesn't work. We've performed a software upgrade.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Ulrich Drepper
Quoted 3 lines · Uli> David Mosberger <[email protected]> writes:
Quoted 3 lines
As far as I can see, neither LSB nor FHS address the issue of where to place emulation files, so I'll propose a prefix of "/emul/ia32-linux/" as a starter. Any objections?
Uli> Not that I care, but this is clearly a place for a new /proc Uli> entry which can be changed by the sysadmin.
I'd have thought that this should be treated like "/": an unchanging prefix. Mount, symlinks, and chroot are your friend. Making it variable makes installation harder, as others have pointed out. But it's not like I care a whole lot (as long as ia64 kernel performance isn't impacted noticably).
--david
I just noticed a comment was posted on 2001-08-15 to the LSB tracking task on this subject, that a post to fhs-discuss gave the solution to the question of where ia32 vs ia64 libs should be placed.
`The /lib directory on x86 and IA64 will always contain the 32bit libraries. IA64 systems should put their libraries in /lib64.' "This way we don't need any special install hooks in the system, installer, and package. It's all hardcoded."
The description above are a paraphrase and direct quote from the post to LSB task number 32642 that was used to track what should be done for LSB compatibility.
Doug
Quoted 23 lines · David Mosberger
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines · Ulrich Drepper
Quoted 3 lines · Uli> David Mosberger <[email protected]> writes:
Quoted 3 lines
As far as I can see, neither LSB nor FHS address the issue of where to place emulation files, so I'll propose a prefix of "/emul/ia32-linux/" as a starter. Any objections?
Uli> Not that I care, but this is clearly a place for a new /proc Uli> entry which can be changed by the sysadmin.
I'd have thought that this should be treated like "/": an unchanging prefix. Mount, symlinks, and chroot are your friend. Making it variable makes installation harder, as others have pointed out. But it's not like I care a whole lot (as long as ia64 kernel performance isn't impacted noticably).
--david_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64
Signature · 4 lines
Douglas B. Beattie ------------------ Linux Test Architect - Caldera, Inc. [email protected]
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Doug Beattie
Doug> I just noticed a comment was posted on 2001-08-15 to the LSB Doug> tracking task on this subject, that a post to fhs-discuss gave Doug> the solution to the question of where ia32 vs ia64 libs should Doug> be placed.
Doug> `The /lib directory on x86 and IA64 will always contain the Doug> 32bit libraries. IA64 systems should put their libraries in Doug> /lib64.' "This way we don't need any special install hooks in Doug> the system, installer, and package. It's all hardcoded."
Doug> The description above are a paraphrase and direct quote from Doug> the post to LSB task number 32642 that was used to track what Doug> should be done for LSB compatibility.
And we already have discussed this option on the ia64 lists a long time ago and we rejected it due to source compatibility issues. /lib and /usr/lib must contain the native libraries, period.
--david
I don't normally send out agreement messages but this time I have to. As David said we've debated this many times in the past and the answer is always the same. This is an IA64 system and therefore /lib', /usr/lib', `/bin',
`/sbin' and so on all contain IA64 files. The IA32 files go elsewhere and we
work around the issues that this creates. Specifically where the IA32 objects
go doesn't concern me too much but I adamantly agree that they go elsewhere. --
Don Dugger
[email protected]
----- Original Message -----
From: "David Mosberger" <[email protected]>
To: <[email protected]>
Cc: "Ulrich Drepper" <[email protected]>; <[email protected]>
Sent: Friday, September 14, 2001 9:51 AM
Subject: Re: [Linux-ia64] Location of absolute IA32 shared objects.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
On Fri, 14 Sep 2001 08:30:22 -0600, Doug Beattie <[email protected]>
Quoted 26 lines · said:
Doug> I just noticed a comment was posted on 2001-08-15 to the LSB Doug> tracking task on this subject, that a post to fhs-discuss gave Doug> the solution to the question of where ia32 vs ia64 libs should Doug> be placed.
Doug> `The /lib directory on x86 and IA64 will always contain the Doug> 32bit libraries. IA64 systems should put their libraries in Doug> /lib64.' "This way we don't need any special install hooks in Doug> the system, installer, and package. It's all hardcoded."
Doug> The description above are a paraphrase and direct quote from Doug> the post to LSB task number 32642 that was used to track what Doug> should be done for LSB compatibility.
And we already have discussed this option on the ia64 lists a long time ago and we rejected it due to source compatibility issues. /lib and
/usr/libmust contain the native libraries, period.--david
_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · David Mosberger
On Wed, 5 Sep 2001 22:47:17 +0200, Christoph Hellwig <[email protected]> said:
Christoph> Please take a look at include/asm-*/namei.h - we can Christoph> define an emulation prefix for Linux/i386 Christoph> (e.g. /emul/linux32) and all lookups will be tried there Christoph> before falling back to the native FS, This appropeach is Christoph> already used by the MIPS and SPARC ports and by linux-abi Christoph> for i386.
David> I don't particularly like changing filenames underneath the David> user, but as far as I can see, it's the most systematic way David> to fix absolute naming issues. Unless someone has serious David> objections to this, I'll make this change. As far as I can David> see, neither LSB nor FHS address the issue of where to place David> emulation files, so I'll propose a prefix of David> "/emul/ia32-linux/" as a starter. Any objections?
Getting this to work required a little more than just changing namei.h, but nothing difficult. In any case, I have this tested now and it does the job. In case you're not familiar with how the emulation prefix works: for any IA-32 binary, absolute filename lookups will now start in /emul/ia32-linux/. If the desired file is found there, it will be used and otherwise the kernel will try to open the same filename without the prefix.
It seems to me it would make sense if the distributors would retire using /usr/i386-*-linux and switch over to /emul/ia32-linux instead. Also, it should be possible to move /lib/ld-linux.so* etc. to /emul/ia32-linux/lib.
--david
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Doug" = Doug Beattie <[email protected]> writes:
Doug> I just noticed a comment was posted on 2001-08-15 to the LSB Doug> tracking task on this subject, that a post to fhs-discuss gave Doug> the solution to the question of where ia32 vs ia64 libs should Doug> be placed.
Doug> `The /lib directory on x86 and IA64 will always contain the Doug> 32bit libraries. IA64 systems should put their libraries in Doug> /lib64.' "This way we don't need any special install hooks in Doug> the system, installer, and package. It's all hardcoded."
It's extremely nice of the FHS people to make such decisions without consulting with the people who actually deals with the architecture in question. Fortunately their silly decision wont have any effect here, native libraries go in /lib and /usr/lib. They will have to change the spec.
Keep in mind that ia32 binaries are a compatibility issue not a 'this is what we recommend you use forever on this system' type of thing.
Jes