Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 162114

Summary: PHP does not detect GMP library, build fails
Product: [Fedora] Fedora Reporter: Graham Leggett <minfrin>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-04 16:02:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Graham Leggett 2005-06-30 00:12:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050512 Red Hat/1.7.8-1.1.3.1

Description of problem:
When trying to build the php-5.0.4-10 RPM, it attempts to find the GMP library, and despite the gmp-4.1.4 library library and devel package being installed, the ./configure fails like so:

checking for GNU MP support... yes
checking for __gmp_randinit_lc_2exp_size in -lgmp... no
checking for gmp_randinit_lc_2exp_size in -lgmp... no
configure: error: GNU MP Library version 4.1.2 or greater required.

The workaround is to remove --with-gmp from the ./configure line in the php spec file and build.


Version-Release number of selected component (if applicable):
php-5.0.4-10

How reproducible:
Always

Steps to Reproduce:
xxx

Additional info:

Comment 1 Joe Orton 2005-06-30 13:16:31 UTC
1) what's the output of "rpm -q gmp gmp-devel"?

2) please attach the build-cgi/config.log produced from a failed build

Is this is a Raw Hide box or an FC4 box?

Comment 2 Graham Leggett 2005-07-01 22:53:17 UTC
The rpm -q is:

gmp-4.1.4-6
gmp-devel-4.1.4-6

The packages are from Raw Hide (rpmfind's "Fedora development").

They are being built on an RHEL4 box with the end goal of supporting rpms of
httpd v2.1 (which depends on at least php v5, which depends on gmp newer than
4.1.2).

config.log looks like this:

configure:52480: checking for GNU MP support
configure:52519: result: yes
configure:52622: checking for __gmp_randinit_lc_2exp_size in -lgmp
configure:52652: gcc -o conftest -O2 -g -pipe -m32 -march=i386 -mtune=pentium4
-fno-strict-aliasing  -L/usr/local/lib   -L/usr/kerberos/lib conftest.c -lgmp 
-ldb -lcurl -lbz2 -lz -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5
-lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err
-lk5crypto -lresolv -ldl -lz -lcurl -lssl -lcrypto -lgssapi_krb5 -lkrb5
-lcom_err -lk5crypto -lresolv -ldl -lz -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
-lresolv -lidn -lssl -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err
-lk5crypto -lresolv -ldl -lz -lz >&5
/tmp/ccSqErUa.o(.text+0xd): In function `main':
/usr/src/redhat/BUILD/php-5.0.4/build-cgi/conftest.c:264: undefined reference to
`__gmp_randinit_lc_2exp_size'
collect2: ld returned 1 exit status
configure:52658: $? = 1
configure: failed program was:
[snip]
configure:52684: result: no
configure:52783: checking for gmp_randinit_lc_2exp_size in -lgmp
configure:52813: gcc -o conftest -O2 -g -pipe -m32 -march=i386 -mtune=pentium4
-fno-strict-aliasing  -L/usr/local/lib   -L/usr/kerberos/lib conftest.c -lgmp 
-ldb -lcurl -lbz2 -lz -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5
-lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err
-lk5crypto -lresolv -ldl -lz -lcurl -lssl -lcrypto -lgssapi_krb5 -lkrb5
-lcom_err -lk5crypto -lresolv -ldl -lz -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
-lresolv -lidn -lssl -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err
-lk5crypto -lresolv -ldl -lz -lz >&5
/tmp/ccasjjws.o(.text+0xd): In function `main':
/usr/src/redhat/BUILD/php-5.0.4/build-cgi/conftest.c:264: undefined reference to
`gmp_randinit_lc_2exp_size'
collect2: ld returned 1 exit status
configure:52819: $? = 1
configure: failed program was:


Comment 3 Joe Orton 2005-07-04 16:02:53 UTC
RHEL4 does not have gmp-4.1.4-6, it has -3.  So if you've rebuilt various random
Raw Hide components on a RHEL4 box and something has broken along the way,
that's not really a surprise.  The php-5.0.4-10 binary RPM as shipped in FC4 was
built against the gmp-4.1.4-6 binary RPM as shipped in FC4, so there is no
problem with Raw Hide.

(there is no dependency between 2.1 and PHP 5, anyway, the 4.3.11 release has
got the autoconf support for using 2.1.x/apr-1.x correctly)

Comment 4 Graham Leggett 2005-07-04 19:35:57 UTC
No, no random components of Raw Hide were built on the RHEL4 box. The sequence
of events went like this:

- Attempt to build PHP v5.0.4 (as required by httpd v2.1.6) against RHEL4
shipped gmp v4.1.4-3 library: Build fails claiming GMP library is not found.

- Assume that GMP as shipped with RHEL4 is broken, build and install GMP
v4.1.4-6 onto the RHEL4 box.

- Attempt to build PHP v5.0.4 against gmp v4.1.4-6 library: Builds fails again
in the same place with the same error.

To sum up, it is currently impossible to install Apache httpd v2.1.6 + php v5 on
an RHEL4 box without manually removing --with-gmp from the php build.

Will try the same combination of builds on some other boxes and see what the
results are, at this stage there definitely is a bug.