Bug #74686 [Nab]: ./configure does not respect --prefix for libxml2 (specifically xml2-config)
| From: | jonas at ogaard dot no | Date: | Fri, 02 Jun 2017 08:41:52 +0000 |
| Subject: | Bug #74686 [Nab]: ./configure does not respect --prefix for libxml2 (specifically xml2-config) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-209355@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74686&edit=1
ID: 74686
User updated by: jonas at ogaard dot no
Reported by: jonas at ogaard dot no
Summary: ./configure does not respect --prefix for libxml2
(specifically xml2-config)
Status: Not a bug
Type: Bug
Package: Compile Failure
Operating System: Red Hat 4.4.7-17
PHP Version: 7.1.5
Block user comment: N
Private report: N
New Comment:
I understand. What put me off is that the script calls the binary supplied by libxml2 (xml2-config)
which, of course, will not be affected by library paths or include dirs.
In other configuration files I've encounter (e.g. ImageMagick) it does check the PATH for the
executable, instead of the hardcoded /usr/local/bin and /usr/bin. To me, checking for the hardcoded
paths instead of $PATH seemed less intuitive.
This is the reason I filed the ticket, but if most build systems benefit from hardcoded paths all is
good.
Thanks for good responses and all your help!
Previous Comments:
------------------------------------------------------------------------
[2017-06-01 17:53:32] danack@php.net
I believe the ENV settings for the locations of libraries like
LDFLAGS='-L/home/foo/lib/' are completely separate from users' PATH
setting.
Closing as not a bug then.
------------------------------------------------------------------------
[2017-06-01 15:34:13] spam2 at rhsoft dot net
because libraries have no business with PATH at all
------------------------------------------------------------------------
[2017-06-01 14:54:40] jonas at ogaard dot no
I wholeheartedly agree, I was a bit fast when writing the ticket. And of course I agree $PREFIX has
nothing to do where the compilation scripts looks for deps - my bad.
Is there a reason why it doesn't look in $PATH at all though?
------------------------------------------------------------------------
[2017-06-01 09:58:41] danack@php.net
> but this can't possibly be intended functionality
.....why not?
PHP uses lots of libraries. Each of them need to have a flag that says which directory they are in,
which is why you can specify the library location per extension (i.e. --with-libxml-dir,
--with-imagick)
I'm pretty sure that prefix is to tell the compilation process where to build files to, not to
read them from: "--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]"
Feel free to explain further if you think this is a bug, or just allow it to close if that's
enough explanation.
------------------------------------------------------------------------
[2017-06-01 09:48:51] jonas at ogaard dot no
Description:
------------
If libxml2 lies in an unconventional prefix-path $PREFIX, running ./configure --prefix=$PREFIX does
not make the build script search $PREFIX/usr/local/bin or $PREFIX/usr/bin for xml2-config, but
instead it defaults to /usr/local/bin and /usr/bin . Luckily --with-libxml-dir=$PREFIX resolves
this, but this can't possibly be intended functionality
Test script:
---------------
./configure --prefix=$PREFIX
Expected result:
----------------
Configuration halts due to missing xml2-config file
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74686&edit=1