Bug with PHP-GMP and PHP 5.6?

kristian

Verified User
Joined
Nov 4, 2005
Messages
107
Location
Norway
Hi,

I have a server with PHP 7.3 and 5.6 installed:

# grep ^php[12]_release /usr/local/directadmin/custombuild/options.conf
php1_release=7.3
php2_release=5.6


I also have gmp enabled:

# grep ^gmp /usr/local/directadmin/custombuild/php_extensions.conf
gmp=yes


When I try to run ./build update_versions, this is the output I get:

# ./build update_versions
Updating PHP-GMP 5.6
Cannot build xmlrpc, because you do not have it set in php_extensions.conf file.

Sure enough, xmprpc is not enabled:

# grep ^xml /usr/local/directadmin/custombuild/php_extensions.conf
xmlrpc=no


If I set xmlrpc=yes, and re-run ./build update_versions, I get xmlrpc, but still no GMP.

Looks like it's line 28705 that makes the call to doPHPXmlrpc instead of doPHPGmp. Unsure if this is related to any specific PHP version, but I haven't seen the same issue on servers with 7.2 and 7.3 that I can remember.

# ./build version
2.0.0 (rev: 2517)
 

kristian

Verified User
Joined
Nov 4, 2005
Messages
107
Location
Norway
If I change this line 28705 to call the doPHPGmp function instead, it is successfully built for PHP 7.3.19, but for PHP 5.6.40 it fails with the following error:

Installing gmp PHP extension for PHP 5.6.40...
Found /usr/local/directadmin/custombuild/php-5.6.40.tar.gz
Extracting ...
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/php56
checking for PHP includes... -I/usr/local/php56/include/php -I/usr/local/php56/include/php/main -I/usr/local/php56/include/php/TSRM -I/usr/local/php56/include/php/Zend -I/usr/local/php56/include/php/ext -I/usr/local/php56/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /usr/local/php56/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for GNU MP support... yes, shared
configure: error: Unable to locate gmp.h
Trying to make gmp PHP extension...
make: *** No targets specified and no makefile found. Stop.


Looks like gmp support shouldn't be an issue with PHP 5.6 in general, so I'm not sure what's going on here.

I have libgmp-dev installed, that contains the gmp.h file:

# dpkg -L libgmp-dev | grep gmp.h$
/usr/include/x86_64-linux-gnu/gmp.h
 
Last edited:
Top