Skip to content

Fixed finding CURL on systems with multiarch support #2632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

cebe
Copy link
Contributor

@cebe cebe commented Jul 14, 2017

this should fix https://bugs.php.net/bug.php?id=74125 tested on debian stretch.

This commit makes the cURL config script aware of debian/ubuntu multiarch support which installs architecture specific headers in a different location.

It checks whether the dpkg-architecture script exists and is executeable, if that is the case, the multiarch architecture is detected by calling dpkg-architecture -qDEB_HOST_MULTIARCH as
documented in debian multiarch implementation docs:

/usr/include/<triplet>: used for arch-varying headers

@cebe cebe changed the base branch from master to PHP-7.0 July 14, 2017 12:02
@cebe cebe changed the base branch from PHP-7.0 to master July 14, 2017 12:02
fixes https://bugs.php.net/bug.php?id=74125

This commit makes the cURL config script aware of debian/ubuntu
[multiarch support][1] which installs architecture specific
headers in a different location.

It checks whether the `dpkg-architecture` script exists and is
executeable, if that is the case, the multiarch architecture is
detected by calling `dpkg-architecture -qDEB_HOST_MULTIARCH` as
documented in [debian multiarch implementation docs][2]:

> `/usr/include/<triplet>`: used for arch-varying headers

[1]: https://wiki.debian.org/Multiarch
[2]: https://wiki.debian.org/Multiarch/Implementation
@cebe cebe changed the base branch from master to PHP-7.0 July 14, 2017 12:33
@cebe
Copy link
Contributor Author

cebe commented Jul 14, 2017

https://github.com/php/php-src/blob/master/CONTRIBUTING.md says to send the PR against PHP 7.0. Hope its correct now.

@Majkl578
Copy link
Contributor

Works for me on Debian Buster. 👍

My previous local quick-hack:

--- a/ext/curl/config.m4
+++ b/ext/curl/config.m4
@@ -11,7 +11,7 @@ if test "$PHP_CURL" != "no"; then
   else
     AC_MSG_CHECKING(for cURL in default path)
     for i in /usr/local /usr; do
-      if test -r $i/include/curl/easy.h; then
+      if test -r $i/include/x86_64-linux-gnu/curl/easy.h; then
         CURL_DIR=$i
         AC_MSG_RESULT(found in $i)
         break

@krakjoe
Copy link
Member

krakjoe commented Jul 25, 2017

Merged 3fd7d81

Thanks.

@krakjoe krakjoe closed this Jul 25, 2017
@cebe cebe deleted the patch-1 branch July 25, 2017 20:00
@cebe
Copy link
Contributor Author

cebe commented Aug 14, 2017

As I see, the patch was included in 7.2.0beta2, will this patch be applied to earlier versions of PHP 7 as well? e.g. 7.0 and 7.1? Should I send pull requests to the other branches?

@remicollet
Copy link
Member

@cebe please see #2694

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants