php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76211 ext/curl does not pass --static flag for pkg-config
Submitted: 2018-04-11 16:52 UTC Modified: 2021-09-22 12:37 UTC
From: dktapps at pmmp dot io Assigned: cmb (profile)
Status: Closed Package: cURL related
PHP Version: 7.2.4 OS: Linux
Private report: No CVE-ID: None
 [2018-04-11 16:52 UTC] dktapps at pmmp dot io
Description:
------------
libcurl has libs.private in its pkg-config configuration. When attempting to statically compile curl + mbedtls with PHP, the compile process fails because statically linked libraries are not included in the configure. ext/curl does not include the necessary --static flag when calling pkg-config for libcurl.

I'm trying to build curl with mbedtls support and pkg-config statically, and the build fails because mbedtls is not linked against.

I have been working around this by forcing usage of curl-config, which works as expected.

Expected result:
----------------
PHP should be able to compile successfully with statically compiled and linked curl + mbedtls

Actual result:
--------------
compile failure.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-22 12:10 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-09-22 12:10 UTC] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?  If so, consider to submit a pull request[2].

[1] <https://www.php.net/supported-versions.php>
[2] <https://github.com/php/php-src/pulls>
 [2021-09-22 12:15 UTC] dktapps at pmmp dot io
-Status: Feedback +Status: Assigned
 [2021-09-22 12:15 UTC] dktapps at pmmp dot io
As I recall, it was fixed in this PR: https://github.com/php/php-src/pull/2749
 [2021-09-22 12:17 UTC] dktapps at pmmp dot io
Actually, my bad - the PR I linked was submitted a year earlier. I don't know if this issue still occurs because my project hasn't used mbedtls for several years (we use OpenSSL now).
 [2021-09-22 12:37 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2021-09-22 12:37 UTC] cmb@php.net
Thanks for the swift reply!  Given there was nobody else
confirming the issue, I'm assuming that it has been resolved or is
not of importance to anyone.  If somebody still wants this to be
fixed (assuming it is not), the ticket can be re-opened.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 07:01:29 2024 UTC