-
Notifications
You must be signed in to change notification settings - Fork 7.9k
--libdir option default value #18579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Using PHP_LIBDIR for lib64 case Fix AS_CASE for libdir and datadir broken by quotes
Fix proposal in PR #18596 only to master to avoid file placement in stable release |
I think this would need a bit more fine tuning. Can you explain again what is actually the issue here? You'd want to build this like
and have libdir automatically set to These library directories fall into so called GNU standards special cases. When If you ask me, these installation directories are almost always simplest to manage manually per-platform basis in any build system. What PHP should do here is go more into configuring something like a library subdirectory name (with default being What current condition here does is simply appending the
|
Le 27/05/2025 à 17:49, Peter Kokot a écrit :
*petk* left a comment (php/php-src#18579) <https://github.com/php/php-
src/issues/18579#issuecomment-2913084157>
I think this would need a bit more fine tuning. Can you explain again
what is actually the issue here? You'd want to build this like
|./configure --with-libdir=lib64 |
Indeed, we use --with-libdir=lib64
But we have to build PHP twice
1/ for CLI and other SAPI
using --libdir=/usr/lib64/php
2/ for embded
using --libdir=/usr/lib64
embded use orig_libdir (default = libdir)
and there is no way to set it.
and have libdir automatically set to |/usr/lib64/php|, or, you'd want to
specify lib directory and PHP's lib directory each separately?
I'd like to build only once with
orig_libdir = /usr/lib64
libdir = /usr/lib64/php
So the test seems design for this
orig_libdir=$libdir
AS_CASE([$libdir],
['${exec_prefix}/lib'], [libdir=$libdir/php])
But it doesn't work as value is expanded in the "switch" statement,
not in "case" one (quote).
Also it uses hardcoded "lib" instead of set option (PHP_LIBDIR = lib64)
These library directories fall into so called GNU standards special
cases. When |/usr| prefix is used, the library directory should become
|/usr/lib64| on some platforms, and |/usr/lib/x86_64-linux-gnu| on some
others, and |/usr/lib| on some more GNU-default-alike platforms.
If you ask me, these installation directories are almost always simplest
to manage manually per-platform basis in any build system. What PHP
should do here is go more into configuring something like a library
subdirectory name (with default being |php|) so the extensions are
installed somewhere into |<lib-dir>/php|, and libphp into |<lib-dir>|.
And this library subdirectory can be customized to something like |
php/8.5| for different PHP versions installed. About embed library, yes
probably should also have it customizable somehow so libphp for 8.5 and
8.4 can be installed at the same time.
Users can use --libdir=/usr/lib64/php/8.5 in which case the above test
will not work, and everything will go to this dir (libphp.so, modules,
build...)
BTW for RPM we prefer to build libphp using "-release 8.5" option
(distro patch) so each version have a different soname in the common
directory, ex: /usr/lib64/libphp-8.5.so
… What current condition here does is simply appending the |php| to the
default paths (Autoconf sets it to a literal |${exec_prefix}/lib|) which
can mess things up indeed. And if I'm not mistaken, some builds even use
literal arguments like this:
|./configure --libdir='${exec_prefix}/lib64/php' |
—
Reply to this email directly, view it on GitHub <https://github.com/php/
php-src/issues/18579#issuecomment-2913084157>, or unsubscribe <https://
github.com/notifications/unsubscribe-auth/
AACCA3OWIYY3TSRFRMJHETT3ASCPLAVCNFSM6AAAAAB5KIAFHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMJTGA4DIMJVG4>.
You are receiving this because you authored the thread.Message ID: <php/
***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
Description
For years we use (for RPM build)
--libdir=/usr/lib64/php
excepted for embed SAPI which need the default path
--libdir=/usr/lib64
Since 0c07b0d this should not be necessary thanks to
orig_libdir
used for embdedBut the test does not work because of quote.
A proper test is probably (no quote + using
php_libdir
forlib64
case)Same issue with
datadir
, but this is only used forfpm/status.html
page, other usedatarootdir
. Perhaps we can drop this check (to avoid change)Help welcome on this
PHP Version
Operating System
Linux
The text was updated successfully, but these errors were encountered: