RE: ./configure, PHP, SuSE and the AMD64

php.internals

Hans Zaunere

21 years ago
> > > > The patch shown is what SuSE did for their RPM distribution of
PHP.
> > > > > > > > One solution may be with the --with-<module>= directive is to
assume that
> > > > dir may be an absolute path as well. > > > > > > > > --with-domxml=/usr/lib64 > > > > > > No, this is too different from what PHP always has been doing...
thus a
> > > bad idea. > > > > Out of curiosity, what has PHP been doing? I always see people
specify
> > a full directory, which typically works. > > That's a co-incidence then, as this: > --with-domxml=/usr/lib > is NOT working as you might think. You always need to do: > --with-domxml=/usr > as the php checks add /lib for you.
Sorry for the confusion. Because the previous post mentioned absolute paths, above, I took it to mean with a leading slash. As you mention, /usr or /usr/local/mysql is the way to do it currently, but still there are some inconsistencies, per below.
> > As I mentioned in my original post, --with-module and > > --with-module-dir seem to have some inconsistencies themselves as > > well. What is the behavior? > > Where are the inconsistencies, can you point those out?
Here are some notes additions from my previous post. In fact, there appear to be some inconstancies, and certainly some questions:
> --with-openssl (must not have any directory after it, > which isn't inline with what ./configure --help says).
This just seems right-out broken...
> --with-zlib=/usr (this works - but what if I want to > force the 64bit library version, in /usr/lib64?)
This is seems to be related to this thread, specifically lib64.
> --with-bz2=/usr/lib64 (and this also works - which you > would think it shouldn't, compared to the zlib above?)
Just confusion... perhaps on my part, or inconsistencies in the way ./configure works.
> And lastly, take these: > > --with-curl=/usr/lib64 > --with-zlib-dir=/usr/lib64 > > Both seem to work (so far). So what is the difference > between a directive having the -dir suffix and not?
Compare --with-zlib and --with-zlib-dir, per above. Things sometimes "work" (meaning there are no obvious errors) and sometimes not; so how should the two be used? What does the suffix -dir mean and how should it be used?
> > Going back to 64bit platforms, this is going to be a problem moving > > forward. AMD64 is all over the place, and thus having lib and lib64 > > directories. While a SuSE patch works for SuSE, what about other
AMD64
> > distros? What happens on FreeBSD? Can PHP's ./configure be fixed
to be
> > flexible, as a ./configure script should be, or will platform
specific
> > hacks need to be made (which seems counter-intuitive, since that's
what
> > ./configure is for). > > PHP's ./configure needs to be fixed of course, though for now the > suggested patches are a bit suboptimal iirc. I would like to give it a
Agreed. ./configure should 1) have defaults of lib's locations 2) use system linker variables and most importantly 3) allow specific directories to be specified during ./configure time.
> shot, but I'll need to have access to a linux running on 64bit first
:) That's not a problem, see follow-up message. Thanks Derick, H

Derick Rethans

21 years ago
On Wed, 13 Oct 2004, Hans Zaunere wrote:
> > > As I mentioned in my original post, --with-module and > > > --with-module-dir seem to have some inconsistencies themselves as > > > well. What is the behavior? > > > > Where are the inconsistencies, can you point those out? > > Here are some notes additions from my previous post. > > In fact, there appear to be some inconstancies, and certainly some > questions: > > > --with-openssl (must not have any directory after it, > > which isn't inline with what ./configure --help says). > > This just seems right-out broken...
OpenSSL is a special beast, though I can't see so quickly where the message is generated.
> > --with-zlib=/usr (this works - but what if I want to > > force the 64bit library version, in /usr/lib64?) > > This is seems to be related to this thread, specifically lib64.
Yes, so it's not an inconsistency ;-)
> > --with-bz2=/usr/lib64 (and this also works - which you > > would think it shouldn't, compared to the zlib above?) > > Just confusion... perhaps on my part, or inconsistencies in the way > ./configure works.
If it works it is because we fall back to the default dir after this, so it would fallback to /usr/lib and /usr/include.
> > > And lastly, take these: > > > > --with-curl=/usr/lib64
See above.
> > --with-zlib-dir=/usr/lib64 > > > > Both seem to work (so far). So what is the difference > > between a directive having the -dir suffix and not? > > Compare --with-zlib and --with-zlib-dir, per above. Things sometimes > "work" (meaning there are no obvious errors) and sometimes not; so how > should the two be used? What does the suffix -dir mean and how should > it be used?
zlib-dir is odd indeed, it will override the dir from --with-zlib. No clue why :)
> Agreed. ./configure should 1) have defaults of lib's locations 2) use > system linker variables and most importantly 3) allow specific > directories to be specified during ./configure time.
1, sure, we do that. Not sure what you mean by 2) and 3) i don't agree with as it is common to specify the install root dir which we've been doing for ages.
> > > shot, but I'll need to have access to a linux running on 64bit first > :) > > That's not a problem, see follow-up message.
It wasn't a problem, more people already offered an account while you were sleeping ;-) Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Robert Silva

21 years ago
For #2, I believe he is referring to searching LD_LIBRARY_PATH directories for libraries rather than hardcoding /lib everywhere (which is how its done now). #3 would be something to effect of --with-libdir=lib64,lib Since just about every extension has custom code to check for the existance (and path) of include files and libraries, wouldn't it just be easier to create PHP_FIND_INCLUDE|LIBRARY macros to handle this functionality? Internally, it could use several mechanisms: LD_LIBRARY_PATH (not very common, none of my linux boxes define this by default), --with-libdir or just hardcoded paths for lib and lib64. It may not be standard, but it would certainly be a lot more flexible as well as a cleaner solution than what is in use currently. Bob Silva -----Original Message----- From: Derick Rethans [mailto:derick@php.net] Sent: Wednesday, October 13, 2004 11:22 PM To: Hans Zaunere Cc: internals@lists.php.net Subject: RE: [PHP-DEV] ./configure, PHP, SuSE and the AMD64 On Wed, 13 Oct 2004, Hans Zaunere wrote:
> > > As I mentioned in my original post, --with-module and > > > --with-module-dir seem to have some inconsistencies themselves as > > > well. What is the behavior? > > > > Where are the inconsistencies, can you point those out? > > Here are some notes additions from my previous post. > > In fact, there appear to be some inconstancies, and certainly some > questions: > > > --with-openssl (must not have any directory after it, > > which isn't inline with what ./configure --help says). > > This just seems right-out broken...
OpenSSL is a special beast, though I can't see so quickly where the message is generated.
> > --with-zlib=/usr (this works - but what if I want to > > force the 64bit library version, in /usr/lib64?) > > This is seems to be related to this thread, specifically lib64.
Yes, so it's not an inconsistency ;-)
> > --with-bz2=/usr/lib64 (and this also works - which you > > would think it shouldn't, compared to the zlib above?) > > Just confusion... perhaps on my part, or inconsistencies in the way > ./configure works.
If it works it is because we fall back to the default dir after this, so it would fallback to /usr/lib and /usr/include.
> > > And lastly, take these: > > > > --with-curl=/usr/lib64
See above.
> > --with-zlib-dir=/usr/lib64 > > > > Both seem to work (so far). So what is the difference > > between a directive having the -dir suffix and not? > > Compare --with-zlib and --with-zlib-dir, per above. Things sometimes > "work" (meaning there are no obvious errors) and sometimes not; so how > should the two be used? What does the suffix -dir mean and how should > it be used?
zlib-dir is odd indeed, it will override the dir from --with-zlib. No clue why :)
> Agreed. ./configure should 1) have defaults of lib's locations 2) use > system linker variables and most importantly 3) allow specific > directories to be specified during ./configure time.
1, sure, we do that. Not sure what you mean by 2) and 3) i don't agree with as it is common to specify the install root dir which we've been doing for ages.
> > > shot, but I'll need to have access to a linux running on 64bit first > :) > > That's not a problem, see follow-up message.
It wasn't a problem, more people already offered an account while you were sleeping ;-) Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php