|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-11-10 04:54 UTC] Sam dot Sexton at thomsonreuters dot com
Description:
------------
First thing is to say that I'm using PHP 5.2.6, but it's not in the drop-down box above.
I am installing pecl_http 1.16.1 behind a firewall, so I'm using phpize and then configure/make. Using three versions of curl (1.18.2, 1.19.0 and 1.19.1), I get errors like those shown below from make. I've recreated the pecl_http directory from the gzip each time. phpize had some warnings, but rc=0 so I thought it was OK to continue. Output included below.
Reproduce code:
---------------
# cd /reuters/radt/local/MediaWiki_build/pecl_http-1.6.1
# phpize
# make
Expected result:
----------------
Successful completion of make! ;-)
Actual result:
--------------
==== phpize ====
[2416](root@ntm-igdev02)~radt/.../pecl_http-1.6.1: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1973: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1993: AC_CACHE_CHECK is expanded from...
aclocal.m4:3526: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5464: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2943: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2923: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2886: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:3481: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7591: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:5577: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4612: _LT_AC_TAGCONFIG is expanded from...
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1973: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1993: AC_CACHE_CHECK is expanded from...
aclocal.m4:3526: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5464: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2943: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2923: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2886: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:3481: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7591: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:5577: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4612: _LT_AC_TAGCONFIG is expanded from...
[2417](root@ntm-igdev02)~radt/.../pecl_http-1.6.1: echo $?
0
[2418](root@ntm-igdev02)~radt/.../pecl_http-1.6.1:
==== make ====
gcc -I. -I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1
-DPHP_ATOM_INC
-I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/include
-I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/main
-I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1
-I/usr/local/include/php -I/usr/local/include/php/main
-I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
-I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
-I/usr/local/include -I/usr/local/include/php/ext/hash -DHAVE_CONFIG_H
-g -O2 -c /reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/http.c
-fPIC -DPIC -o .libs/http.o
In file included from
/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/php_http.h:58,
from
/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/http.c:20:
/usr/local/include/curl/curl.h:1743: error: expected identifier or '('
before string constant
/usr/local/include/curl/curl.h:1754: error: expected identifier or '('
before string constant
In file included from /usr/local/include/curl/curl.h:1783,
from
/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/php_http.h:58,
from
/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/http.c:20:
/usr/local/include/curl/multi.h:208: error: expected identifier or '('
before string constant
make: *** [http.lo] Error 1
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 05:00:01 2025 UTC |
Sorry, but I need to re-open this. I took the problem to curl-and-php@cool.haxx.se and also did some more digging. Firstly, I didn't forget to run configure (although I did forget to include it in the reproduction code), but hadn't included the output from it as it looked clean, but I can do so if necessary. Daniel.haxx.se said "Well, the problem is not in libcurl so I'm at loss here. The build problems you see are within/caused by pecl-http so there's where you should seek your answers." So, that's why I'm back here. The starting point is that I ran phpize and ./configure (no args), then make. If you need the output The extra digging I did with a colleague was to run versions of the compile separately with and without -E, to see what the pre-processor produced, as the syntax error message indicated the presence of a quoted string - and that is what the pre-processor produced. Here are the two test scripts: [2684](root@ntm-igdev02)~radt/.../pecl_http-1.6.1: more /tmp/foo* :::::::::::::: /tmp/foo :::::::::::::: /usr/avt/gcc-3.4.6/bin/gcc -E -I. -I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1 -DPHP_ATOM_INC -I/reu ters/radt/local/MediaWiki_build/pecl_http-1.6.1/include -I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/ main -I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1 -I/usr/local/include/php -I/usr/local/include/php/m ain -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/incl ude/php/ext/date/lib -I/usr/local/include -I/usr/local/include/php/ext/hash -DHAVE_CONFIG_H -g -O2 -c /reuters /radt/local/MediaWiki_build/pecl_http-1.6.1/http.c -fPIC -DPIC -o .libs/http.o :::::::::::::: /tmp/foo2 :::::::::::::: /usr/avt/gcc-3.4.6/bin/gcc -I. -I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1 -DPHP_ATOM_INC -I/reuter s/radt/local/MediaWiki_build/pecl_http-1.6.1/include -I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/mai n -I/reuters/radt/local/MediaWiki_build/pecl_http-1.6.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include /php/ext/date/lib -I/usr/local/include -I/usr/local/include/php/ext/hash -DHAVE_CONFIG_H -g -O2 -c /reuters/ra dt/local/MediaWiki_build/pecl_http-1.6.1/http.c -fPIC -DPIC -o .libs/http.o [2685](root@ntm-igdev02)~radt/.../pecl_http-1.6.1: This is an extract from .libs/http.o after running /tmp/foo: 9710 } curl_version_info_data; 9711 # 1732 "/usr/local/include/curl/curl.h" 3 9712 curl_version_info_data *curl_version_info(CURLversion); 9713 # 1743 "/usr/local/include/curl/curl.h" 3 9714 const char *"unknown error"; 9715 # 1754 "/usr/local/include/curl/curl.h" 3 9716 const char *"unknown error"; 9717 # 1765 "/usr/local/include/curl/curl.h" 3 and this is the error from /tmp/foo2 and make (with both gcc 3.4.6 and 4.1.1): [2678](root@ntm-igdev02)~radt/.../pecl_http-1.6.1: /tmp/foo2 In file included from /reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/php_http.h:58, from /reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/http.c:20: /usr/local/include/curl/curl.h:1743: error: syntax error before string constant /usr/local/include/curl/curl.h:1754: error: syntax error before string constant In file included from /usr/local/include/curl/curl.h:1783, from /reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/php_http.h:58, from /reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/http.c:20: /usr/local/include/curl/multi.h:208: error: syntax error before string constant [2679](root@ntm-igdev02)~radt/.../pecl_http-1.6.1: The relevant source lines are: 1735 * NAME curl_easy_strerror() 1736 * 1737 * DESCRIPTION 1738 * 1739 * The curl_easy_strerror function may be used to turn a CURLcode value 1740 * into the equivalent human readable error string. This is useful 1741 * for printing meaningful error messages. 1742 */ 1743 CURL_EXTERN const char *curl_easy_strerror(CURLcode); 1744 1745 /* 1746 * NAME curl_share_strerror() 1747 * 1748 * DESCRIPTION 1749 * 1750 * The curl_share_strerror function may be used to turn a CURLSHcode value 1751 * into the equivalent human readable error string. This is useful 1752 * for printing meaningful error messages. 1753 */ 1754 CURL_EXTERN const char *curl_share_strerror(CURLSHcode); The same happens with multi.h: In file included from /usr/local/include/curl/curl.h:1746, from /reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/php_http.h:58, from /reuters/radt/local/MediaWiki_build/pecl_http-1.6.1/http.c:20: /usr/local/include/curl/multi.h:208: error: syntax error before string constant but I suspect that there's enough evidence here. If you need me to dig deeper, please send me the details. Thanks in advance.