php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79313 --with-curl switch behaviour change in PHP 7.4
Submitted: 2020-02-27 15:48 UTC Modified: 2020-02-27 22:10 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: fred5 at originsystems dot co dot za Assigned:
Status: Verified Package: Compile Failure
PHP Version: 7.4.3 OS: RHEL 7
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fred5 at originsystems dot co dot za
New email:
PHP Version: OS:

 

 [2020-02-27 15:48 UTC] fred5 at originsystems dot co dot za
Description:
------------
Up to 7.3.15 supports this PHP compile switch:

--with-curl=shared,${BUILD_TARGET_CURL}

where ${BUILD_TARGET_CURL} = the folder into which our latest curl compile is located (currently 7.68.0)

However 7.4 produces this error:

checking for cURL support... yes
checking for libcurl >= 7.15.5... no
configure: error: Package requirements (libcurl >= 7.15.5) were not met:

No package 'libcurl' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CURL_CFLAGS
and CURL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

I'm not sure what is going on but I can't seem to get PKG_CONFIG_PATH / CURL_CFLAGS / CURL_LIBS to have any effect, no matter what I set them to.

thanks

Test script:
---------------
n/a


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-27 15:52 UTC] fred5 at originsystems dot co dot za
-Summary: Change since PHP 7.3 +Summary: --with-curl switch behaviour change in PHP 7.4
 [2020-02-27 15:52 UTC] fred5 at originsystems dot co dot za
updating the title to hopefully be more meaningful.
 [2020-02-27 16:05 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-02-27 16:05 UTC] cmb@php.net
First, find the location of libcurl.pc; then set PKG_CONFIG_PATH
to the directory of that file.  E.g. if curl is installed in
opt/curl/, libcurl.pc is likely in opt/curl/lib/pkgconfig/, so do

PKG_CONFIG_PATH=/opt/curl/lib/pkgconfig/ ./configure …
 [2020-02-27 18:20 UTC] fred5 at originsystems dot co dot za
-Status: Feedback +Status: Assigned
 [2020-02-27 18:20 UTC] fred5 at originsystems dot co dot za
thank you. The --with-curl issue is resolved by applying your recommendation however it appears that a number of switches are now "broken" in 7.4

--with-icu-dir, --enable-libxml, --enable-wddx, --enable-hash, --enable-curl, --with-gd, --with-jpeg-dir, --with-webp-dir, --with-freetype-dir, --with-libxml-dir, --enable-zip, --with-libzip, --with-pcre-regex, --with-pcre-dir

Unfortunately I can only set PKG_CONFIG_PATH once, which means that I then cant sort out ICU or any of the other compiled locations.

So it seems to me that a more workable approach in my scenario would be to use CURL_CFLAGS and CURL_LIBS instead of PKG_CONFIG_PATH. 

Then I could use  ICU_CFLAGS and ICU_LIBS for ICU and so on for all the other switches for which I need to set library location.

With this in mind I would greatly appreciate it if you could let me know what i would need to set 
CURL_CFLAGS and CURL_LIBS to.  (from what you tell me I will then work out what to set all the others to as I'm assuming the same conceptual approach would apply) 

thanks again!
 [2020-02-27 19:07 UTC] cmb@php.net
> Unfortunately I can only set PKG_CONFIG_PATH once, […]

Indeed, but the variable has the same format as PATH, i.e. it
supports a colon delimited list of paths.

And of course, this needs to be documented in the PHP manual
proper (not only in the migration guide[1]).

[1] <https://www.php.net/manual/en/migration74.other-changes.php#migration74.other-changes.pkg-config>
 [2020-02-27 19:08 UTC] cmb@php.net
-Type: Bug +Type: Documentation Problem -Assigned To: cmb +Assigned To:
 [2020-02-27 19:08 UTC] fred5 at originsystems dot co dot za
-Status: Open +Status: Assigned -Type: Documentation Problem +Type: Bug
 [2020-02-27 19:08 UTC] fred5 at originsystems dot co dot za
I have copied all my *.pc files into a single PKGINFO directory and set PKG_CONFIG_PATH=${PKGINFO directory}

This seems to resolve all my --with-zzzzz issues, however now I am seeing the below issue (which is a provided PHP extension I can find under the PHP source folder). ...right now I can only assume the problem is being introduced because PKG_CONFIG_PATH has been set (as we have never seen this issue prior to 7.4)

I would really appreciate some help with this as it is causing real problems for our install. thanks

LATEST ERROR
------------

checking whether to enable multibyte string support... yes, shared
checking whether to enable multibyte regex support (requires oniguruma)... yes
checking for oniguruma... no
configure: error: Package requirements (oniguruma) were not met:

No package 'oniguruma' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ONIG_CFLAGS
and ONIG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
 [2020-02-27 20:30 UTC] bugreports at gmail dot com
> checking for oniguruma... no

[root@testserver:~]$ rpm -qa | grep onig
oniguruma-6.9.4-1.fc31.x86_64
oniguruma-devel-6.9.4-1.fc31.x86_64

just install or build it, it's no longer bundeled
 [2020-02-27 21:16 UTC] fred5 at originsystems dot co dot za
PHP 7.4.3 built successfully using the

PKG_CONFIG_PATH=aaa:bbb:ccc:....

approach.

(and installing oniguruma-devel)

Thank you so much for all your help!
 [2020-02-27 22:10 UTC] cmb@php.net
-Status: Assigned +Status: Verified -Type: Bug +Type: Documentation Problem
 [2020-02-27 22:10 UTC] cmb@php.net
> PHP 7.4.3 built successfully […]

Great!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC