On Thu, Mar 06, 2003 at 07:27:05PM +0800, James Devenish wrote: > In message <[EMAIL PROTECTED]> > on Thu, Mar 06, 2003 at 10:25:14AM +0000, Joe Orton wrote: > > Hi, I've got a bunch of fixes for systems which have system libraries in > > /usr/lib64 rather than /usr/lib - these are needed for some upcoming > > 64-bit Linux ports. These fixes are based on patches from SuSE > > developers <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>. > > > > Should I submit changes to ext/*/config.m4 in bulk or individually? > > > > Here's the first fix to prevent adding /usr/lib64 to LDFLAGS: > [...] > > + -L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/) ;; > > Of all the problems I've had using PHP on 64-bit platforms (e.g. bug > #21973, which refers mainly to lib directory naming under commercial > 64-bit environments), this was not one of them -- yay. > > So I am curious: > - What is the purpose of having the mechanism to remove or not remove > /usr/lib (and why not do the same for /lib and other vendor > directories)? > > - Why do 64-bit Linux operating systems need the special hard-coded > treatment? > - Will the same be done for other operating systems?
/usr/lib64 exists so that you can have 64-bit libraries installed alongside 32-bit libraries in /usr/lib - this is a precedent that comes from Sun or SGI or somewhere I believe. IRIX is the top Google hit for "lib64" in any case. (In fact I think you can get /usr/lib32 as well for some IRIX/MIPS, since there are two different flavours of 32-bit ABI) Adding /usr/lib64 or /usr/lib to the library search path at minimum causes a re-ordering of the library search path, which means in some circumstances you pick up the wrong versions of libraries. e.g. if you have a libfoo in /usr/lib, but you want to compile against a different version you have installed in /home/jim/lib, you start with -L/home/jim/lib -lfoo. If the configure script then adds -L/usr/lib to LDFLAGS, you might end up with the system libfoo again, which is wrong. On a lib64 system, if you do have the 32-bit libraries installed in /usr/lib, but want to compile against the 64-bit libraries in /usr/lib64, adding /usr/lib to the library search path breaks everything horribly, since you pick up the 32-bit libc etc. Regards, joe -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php