[php-src] Issue #7853: `php-config --libs` should also respond with the `-lphp` so apps know which library to link

From: Date: Wed, 29 Dec 2021 15:45:00 +0000
Subject: [php-src] Issue #7853: `php-config --libs` should also respond with the `-lphp` so apps know which library to link
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238639@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7853 Author: gdamjan ### Description Debian: ``` $ php-config --libs -lcrypt -largon2 -lresolv -lcrypt -lrt -lm -ldl -lxml2 -lssl -lcrypto -lpcre2-8 -lz -lsodium -lcrypt -largon2 -lcrypt $ php-config8.1 --libs -lcrypt -lresolv -lcrypt -lutil -lrt -lm -ldl -lxml2 -lssl -lcrypto -lpcre2-8 -lz -lsodium -largon2 -lrt -ldl -lcrypt $ php-config7.4 --libs -lcrypt -largon2 -lresolv -lcrypt -lrt -lm -ldl -lxml2 -lssl -lcrypto -lpcre2-8 -lz -lsodium -lcrypt -largon2 -lcrypt ``` Arch ``` $ php-config7 --libs -lcrypt -largon2 -lresolv -lcrypt -lreadline -lncurses -lrt -lstdc++ -lrt -lm -ldl -lacl -lsystemd -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lpcre2-8 -lz -lxml2 -lonig -lxml2 -lcrypt -largon2 -lxml2 -lxml2 -lxml2 -lz -lssl -lcrypto -lcrypt $ php-config --libs -lcrypt -largon2 -lresolv -lcrypt -lreadline -lncurses -lrt -lstdc++ -lutil -lrt -lm -ldl -lacl -lsystemd -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lpcre2-8 -lz -lxml2 -lonig -lxml2 -largon2 -lxml2 -lxml2 -lxml2 -lz -lssl -lcrypto -lcrypt ``` An application should guess which libphp to link to. It's /usr/lib/libphp.so for PHP 8 on Arch, /usr/lib/libphp7.so for PHP 7.4. On Debian there are: /usr/lib/libphp7.4.so /usr/lib/libphp7.so /usr/lib/libphp8.1.so /usr/lib/libphp8.so /usr/lib/libphp.so php-config --libs should actually specify the correct -lphp flag.

« previous php.bugs (#238639) next »