Bug #80402 [NEW]: configure filtering out -lpthread
From: bjornar dot ness at gmail dot com
Operating system: linux
PHP version: Irrelevant
Package: *Configuration Issues
Bug Type: Bug
Bug description:configure filtering out -lpthread
Description:
------------
php's configure script has multiple places where it filters out
-lpthread from $LIBS
before ac_fn_c_try_link
This is likely ok for shared, but causes problems with static libs.
One example of this is when building openssl static.
# pkg-config openssl --libs
-L/usr/src/php-build/install/OpenSSL_1_1_1h/lib -lssl -lz -lcrypto
-lpthread -ldl
Problem is, when configure tries to check this rule, it filters out some
libs from
what it was told by pkg-config:
(looping through $XXXX_LIBS)
case $ac_ii in
c|c_r|pthread*) ;;
*)
LIBS="$LIBS -l$ac_ii"
;;
esac
(end loop)
ac_fn_c_try_link
ac_fn_c_try_link basically does:
$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext
$LIBS >&5
and in my case then, results in the following libs:
-lssl -lz -lcrypto -ldl
note -lpthread missing, and the test failing.
I have not managed to find a way around this without modifying the
configure file, adding -lpthread where it needs to be.
The rest of the actual build is just fine after manually adding
-lpthread to just the relevant tests.
--
Edit bug report at https://bugs.php.net/bug.php?id=80402&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80402&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80402&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80402&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80402&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80402&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80402&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80402&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80402&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80402&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80402&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80402&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80402&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80402&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80402&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80402&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80402&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80402&r=mysqlcfg
Thread (7 messages)
- bjornar dot ness at gmail dot com