Bug #75695 [NEW]: LDAP & OpenSSL Libdir Compile Bug
| From: | me at nbishop dot name | Date: | Fri, 15 Dec 2017 23:57:23 +0000 |
| Subject: | Bug #75695 [NEW]: LDAP & OpenSSL Libdir Compile Bug | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-213127@lists.php.net to get a copy of this message | ||
From: me at nbishop dot name
Operating system: Linux (Fedora)
PHP version: 7.1.12
Package: Compile Failure
Bug Type: Bug
Bug description:LDAP & OpenSSL Libdir Compile Bug
Description:
------------
This started out at first as just a bug with compiling PHP w/ a compiled
OpenSSL but has since turned into what looks like some configure
oddities with the way --with-libdir values are attempted to be used.
1) When trying to use a compiled OpenSSL (not-packaged), PHP attempts to
use a weird combination of $PHP_OPENSSL_DIR/$PHP_LIB_DIR (see line 2369
of acinclude.m4). What it should likely be doing is using $PHP_LIB_DIR
alone as defined by --with-libdir. An alternative solution would be to
restore the old --with-openssl-libs switch that existed < PHP7
versions.
2) When trying to implement ldap support (--with-ldap), another issue is
encountered relative to --with-libdir. If no directory is specified
with the ldap switch, then it appears to try and use a hardcoded
reference of /usr/$PHP_LIB_DIR which results in it looking literally in
/usr//usr/local/lib64 for example. Unfortunately specifying a directory
does not really resolve it, with the openldap package it installs to
/usr/lib64, so specifying --with-ldap=/usr/lib64 causes it to be unable
to see the required headers (under /usr/local), and obviously using
/usr/local as the path lets it see the headers but not the actual libs.
As far as I can tell these issues are present from the start of PHP 7.0
to the current 7.2 code branch and likely would impact any linux distro
environment.
There may also be other ones, I did not test -all- switches, just the
ones I needed in this case.
I've attached a patch file that 'quick-fixes' the relevant .m4 conf
files (and passed
make test). The OpenSSL section is fairly straight
forward imo, but I likely made a mess of the LDAP attempt so anyone
wants to critique and improve that one please do lol.
If the patch file looks okay to others, I'll do a pull request on
github.
--
Edit bug report at https://bugs.php.net/bug.php?id=75695&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75695&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75695&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75695&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75695&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75695&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75695&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75695&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75695&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75695&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75695&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75695&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75695&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75695&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75695&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75695&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75695&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75695&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75695&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75695&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75695&r=mysqlcfg