|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-12-19 08:12 UTC] indeyets at gmail dot com
Description: ------------ I am trying to install package using pecl. It results in compilation error, Exactly the same error is present in latest stable version Actual result: -------------- /private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c: In function '_http_request_body_encode': /private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:209: error: 'curl_formget_callback' undeclared (first use in this function) /private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:209: error: (Each undeclared identifier is reported only once /private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:209: error: for each function it appears in.) /private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:209: error: parse error before 'phpstr_append' /private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:213: error: 'str' undeclared (first use in this function) /private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:235: error: break statement not within loop or switch /private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c: At top level: /private/tmp/pear/cache/pecl_http-1.4.0RC1/http_request_body_api.c:238: error: parse error before 'case' make: *** [http_request_body_api.lo] Error 1 ERROR: `make' failed PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 07:00:01 2025 UTC |
I was experiencing the same issue when trying to install pecl_http 1.6.0 under MacOS X 10.4.11 and PHP 5.2.6_1 (installed via MacPorts). The machine had both the Apple and MacPorts distributions of cURL. The installer was finding Apple's installation of cURL rather than the MacPorts one. Just hiding the native cURL by renaming files & folders wasn't sufficient, as the configure script wasn't checking where MacPorts had installed cURL (/opt/local). Adding '/opt/local' before '/usr' in all directory searches in the configure script seemed to work. This may not be a suitable alteration for pecl_http configuration in general; perhaps a port is in order. Does anyone have any comments on whether the fix should be integrated into the main pecl_http package, or rolled into a port for MacPorts? I'm guessing a similar fix is needed for Fink, adding '/sw' (I think) to the search paths. I also needed to manually set extension_dir in php.ini and enable the extension, but this is (probably) a different issue. Here's the patch for my changes: --- config9.m4.orig 2008-06-25 15:51:48.000000000 -0400 +++ config9.m4 2008-06-25 16:18:58.000000000 -0400 @@ -21,6 +21,9 @@ [ --with-http-magic-mime[=LIBMAGICDIR] HTTP: with magic mime response content type guessing], "no", "no") + +SEARCHDIRS="/opt/local /usr/local /usr /opt" + if test "$PHP_HTTP" != "no"; then ifdef([AC_PROG_EGREP], [ @@ -121,7 +124,7 @@ if test "$PHP_HTTP_ZLIB_COMPRESSION" != "no"; then AC_MSG_CHECKING([for zlib.h]) ZLIB_DIR= - for i in "$PHP_HTTP_ZLIB_COMPRESSION" "$PHP_ZLIB_DIR" "$PHP_ZLIB" /usr/local /usr /opt; do + for i in "$PHP_HTTP_ZLIB_COMPRESSION" "$PHP_ZLIB_DIR" "$PHP_ZLIB" $SEARCHDIRS; do if test -f "$i/include/zlib.h"; then ZLIB_DIR=$i break; @@ -151,7 +154,8 @@ if test "$PHP_HTTP_CURL_REQUESTS" != "no"; then AC_MSG_CHECKING([for curl/curl.h]) CURL_DIR= - for i in "$PHP_HTTP_CURL_REQUESTS" /usr/local /usr /opt; do + for i in "$PHP_HTTP_CURL_REQUESTS" $SEARCHDIRS; do + AC_MSG_RESULT([looking for curl.h in $i]) if test -f "$i/include/curl/curl.h"; then CURL_DIR=$i break @@ -322,7 +326,7 @@ ], [ AC_MSG_CHECKING([for event.h]) EVENT_DIR= - for i in "$PHP_HTTP_CURL_LIBEVENT" /usr/local /usr /opt; do + for i in "$PHP_HTTP_CURL_LIBEVENT" $SEARCHDIRS; do if test -f "$i/include/event.h"; then EVENT_DIR=$i break @@ -370,7 +374,7 @@ if test "$PHP_HTTP_MAGIC_MIME" != "no"; then AC_MSG_CHECKING([for magic.h]) MAGIC_DIR= - for i in "$PHP_HTTP_MAGIC_MIME" /usr/local /usr /opt; do + for i in "$PHP_HTTP_MAGIC_MIME" $SEARCHDIRS; do if test -f "$i/include/magic.h"; then MAGIC_DIR=$i break