php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75973 php 7.2.2 configure not recognizing curl 7.58.0
Submitted: 2018-02-16 21:11 UTC Modified: 2018-02-20 14:20 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: warren dot zaccone at ericsson dot net Assigned:
Status: Closed Package: *Configuration Issues
PHP Version: 7.2.2 OS: Solaris 10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: warren dot zaccone at ericsson dot net
New email:
PHP Version: OS:

 

 [2018-02-16 21:11 UTC] warren dot zaccone at ericsson dot net
Description:
------------
php 7.2.2 configure fails with: 

checking for libcurl.pc... using /usr/local/lib/pkgconfig/libcurl.pc
checking for cURL 7.10.5 or greater... configure: error: cURL version 7.10.5 or later is required to compile php with cURL support

however I have curl  7.58.0 installed

# which curl
/usr/local/bin/curl
# curl -V
curl 7.58.0 (sparc-sun-solaris2.10) libcurl/7.58.0 OpenSSL/1.0.2n zlib/1.2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy



this seems to be a difference in behavior in php 7.2.2 or php 7.x on Solaris 10.

 I am upgrading from 5.6 to 7.2.2

here is my configure command for 7.2.2 (same as I used successfully for 5.6)

configure --prefix=/usr/local/apache/lib --exec-prefix=$apache_dir --with
-apxs2=/usr/local/apache/bin/apxs --with-openssl=/usr/local/apache/ssl --with-curl=/usr/local --enable-sockets --enable-ftp --enable-soap --without-pear --with-oci8=instantclient,/usr/local/instantclient_11_2 --with-pcre-regex=/usr/local --enable-opcache=no


To determine if this was new behavior with php 7 ,   I did a quick test configuring php 5.6.33 immediately afterward and the check for curl is successful as shown below:
 
checking for cURL support... yes
checking for cURL 7.10.5 or greater... libcurl 7.58.0
checking for SSL support in libcurl... yes



Test script:
---------------
export CC="/usr/local/bin/gcc"
export CFLAGS="-std=gnu99 -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
export LDFLAGS="-L/usr/local/lib -R/usr/local/lib"

rm config.cache

configure --prefix=/usr/local/apache/lib --exec-prefix=$apache_dir --with
-apxs2=/usr/local/apache/bin/apxs --with-openssl=/usr/local/apache/ssl --with-curl=/usr/local --enable-sockets --enable-ftp --enable-soap --without-pear --with-oci8=instantclient,/usr/local/instantclient_11_2 --with-pcre-regex=/usr/local --enable-opcache=no

config.log 

configure:23235: checking whether to enable ctype functions
configure:23270: result: yes
configure:23538: checking for cURL support
configure:23574: result: yes
configure:23627: checking for libcurl.pc
configure:23635: result: using /usr/local/lib/pkgconfig/libcurl.pc
configure:23650: checking for cURL 7.10.5 or greater
configure:23657: error: cURL version 7.10.5 or later is required to compile php
with cURL support



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-20 14:20 UTC] warren dot zaccone at ericsson dot net
-Status: Open +Status: Closed
 [2018-02-20 14:20 UTC] warren dot zaccone at ericsson dot net
I am closing my own issue.  I determined the cause.   This is not a problem with PHP.   My file /usr/local/lib/pkgconfig/libcurl.pc had an invalid keyword in it that caused the test for in the PHP configure to fail.  

I changed configure to add --print-errors after $PKG_CONFIG to determine the cause.

 if $PKG_CONFIG --print-errors --atleast-version=7.10.5 $PKNAME; then
 [2018-06-03 08:00 UTC] kenny at ksolutionsng dot com
What is the invalid keyword you found in /usr/local/lib/pkgconfig/libcurl.pc . I am having the same issue with php7.2.4 ans php7.2.6 and couldn't find anything wrong with libcurl.pc
 [2018-06-25 03:23 UTC] acgrid at gmail dot com
Thanks for your suggestion to add --print-errors.
In my situation, it resolved by issuing `export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/` to let pkgconfig to find right libcurl.pc
 [2019-10-04 21:19 UTC] jon at isparks dot com
For me the keyword that cause the problem in the libcurl.pc file was "URL".  I commented that out, and it worked.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 04:01:31 2024 UTC