Trouble configuring PHP 7.1 module for Unit 1.0 on Gentoo Linux

Igor Sysoev igor at sysoev.ru
Fri Apr 13 14:40:17 UTC 2018


> On 13 Apr 2018, at 17:23, Ralph Seichter <m16+nginx at monksofcool.net> wrote:
> 
> On 13.04.2018 14:49, Igor Sysoev wrote:
> 
>>> $ ./configure php --config=/usr/lib64/php7.1/bin/php-config
>>> configuring PHP module
>>> checking for PHP ... found
>>>  + PHP SAPI: [embed cli fpm apache2handler]
>>> checking for PHP embed SAPI ... not found
>> 
>> Could you show the last lines from build/autoconf.err relevant to PHP?
> 
> Sure, here you go again. I only added word-wrapping:
> 
> ----------
> configuring PHP module ...
> checking for PHP ...
> 7.1.16
> ----------------------------------------
> checking for PHP embed SAPI
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>  cannot find -lphp7
> collect2: error: ld returned 1 exit status
> ----------
> 
>        #include <php.h>
>        #include <php_main.h>
> 
>        int main() {
>            php_request_startup();
>            return 0;
>        }
> ----------
> 
> cc -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra
>  -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g
>  -I/usr/lib64/php7.1/include/php -I/usr/lib64/php7.1/include/php/main
>  -I/usr/lib64/php7.1/include/php/TSRM
>  -I/usr/lib64/php7.1/include/php/Zend -I/usr/lib64/php7.1/include/php/ext
>  -I/usr/lib64/php7.1/include/php/ext/date/lib -o build/autotest
>  build/autotest.c -lphp7
> ----------
> 
> I've placed a full console log of the steps I've taken and the results
> displayed here: https://pastebin.com/ys2zWqnD (one week expiry).

On Gentoo you should also use --lib-path:

./configure php --config=/usr/lib64/php7.1/bin/php-config
              --lib-path=/usr/lib64/php7.1/lib64


-- 
Igor Sysoev
http://nginx.com



More information about the nginx mailing list