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

Fixed finding CURL on systems with multiarch support #2632

Closed
wants to merge 1 commit into
base: PHP-7.0
from

Conversation

4 participants
@cebe
Contributor

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 Jul 14, 2017

@cebe cebe changed the base branch from PHP-7.0 to master Jul 14, 2017

Fixed finding CURL on systems with multiarch support
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 Jul 14, 2017

@cebe

This comment has been minimized.

Show comment
Hide comment
@cebe

cebe Jul 14, 2017

Contributor

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

Contributor

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.

@krakjoe krakjoe added the Quickfix label Jul 17, 2017

@Majkl578

This comment has been minimized.

Show comment
Hide comment
@Majkl578

Majkl578 Jul 18, 2017

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
Contributor

Majkl578 commented Jul 18, 2017

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

This comment has been minimized.

Show comment
Hide comment
@krakjoe

krakjoe Jul 25, 2017

Member

Merged 3fd7d81

Thanks.

Member

krakjoe commented Jul 25, 2017

Merged 3fd7d81

Thanks.

@krakjoe krakjoe closed this Jul 25, 2017

@cebe cebe deleted the cebe:patch-1 branch Jul 25, 2017

@cebe

This comment has been minimized.

Show comment
Hide comment
@cebe

cebe Aug 14, 2017

Contributor

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?

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@remicollet

remicollet Aug 18, 2017

Contributor

@cebe please see #2694

Contributor

remicollet commented Aug 18, 2017

@cebe please see #2694

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment