cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

pecl_http compile error

From: ml ml <mliebherr99_at_googlemail.com>
Date: Thu, 30 Aug 2012 10:46:44 +0200

Hello List,

i am trying to build pecl_http with "pecl install pecl_http" but i get
this error: /usr/local/include/curl/curl.h:2070: error: expected
identifier or ‘(’ before string constant

Line 2070 is: CURL_EXTERN const char *curl_share_strerror(CURLSHcode);

Below is the full Log. I am on Debian 6 (upgraded from Debian 5 and
removed the old libs). With php 5.2.17.

/usr/local/php-cli/bin/pecl install pecl_http
downloading pecl_http-1.7.4.tgz ...
Starting to download pecl_http-1.7.4.tgz (174,503 bytes)
.....................................done: 174,503 bytes
71 source files, building
WARNING: php_bin /usr/local/php-5.2.17-cli/bin/php appears to have a
suffix -5.2.17-cli/bin/php, but config variable php_suffix does not
match
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
whether to enable cURL HTTP requests; specify libcurl directory [yes] :
whether to enable support for gzencoded/deflated message bodies;
specify zlib directory [yes] :
whether to enable response content type guessing; specify libmagic
directory [no] :
whether to depend on extensions which have been built shared [yes] :
building in /tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4
running: /tmp/pear/temp/pecl_http/configure --with-http-curl-requests
--with-http-zlib-compression --with-http-magic-mime=no
--with-http-shared-deps
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/php-5.2.17-cli
checking for PHP includes... -I/usr/local/php-5.2.17-cli/include/php
-I/usr/local/php-5.2.17-cli/include/php/main
-I/usr/local/php-5.2.17-cli/include/php/TSRM
-I/usr/local/php-5.2.17-cli/include/php/Zend
-I/usr/local/php-5.2.17-cli/include/php/ext
-I/usr/local/php-5.2.17-cli/include/php/ext/date/lib
checking for PHP extension directory...
/usr/local/php-5.2.17-cli/lib/php/extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix...
/usr/local/php-5.2.17-cli/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to
regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable extended HTTP support... yes, shared
checking whether to depend on extensions which have been built shared... yes
checking whether to enable cURL HTTP request support... yes
checking whether to enable libevent support fur cURL... yes
checking whether to enable zlib encodings support... yes
checking whether to enable response content type guessing... no
checking for egrep... (cached) /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for unistd.h... (cached) yes
checking for gethostname... yes
checking for getdomainname... yes
checking for getservbyport... yes
checking for getservbyname... yes
checking for zlib.h... found in /usr
checking for zlib version >= 1.2.0.4... 1.2.3.4
checking for curl/curl.h... found in /usr/local
checking for curl-config... found: /usr/local/curl-7.21.0/bin/curl-config
checking for curl version >= 7.12.3... 7.21.0
checking for SSL support in libcurl... yes
checking for openssl support in libcurl... yes
checking openssl/crypto.h usability... yes
checking openssl/crypto.h presence... yes
checking for openssl/crypto.h... yes
checking for gnutls support in libcurl... no
checking for bundled SSL CA info... /etc/ssl/certs/ca-certificates.crt
checking for curl_share_strerror in -lcurl... no
checking for curl_multi_strerror in -lcurl... no
checking for curl_easy_strerror in -lcurl... no
checking for curl_easy_reset in -lcurl... no
checking for curl_formget in -lcurl... no
checking for curl_multi_setopt in -lcurl... no
checking for curl_multi_timeout in -lcurl... no
checking for ext/event support... no
checking for event.h... found in /usr
checking for libevent version, roughly... 1.4 or greater
checking for libcurl version >= 7.16.0... 7.21.0
checking for curl_multi_socket_action in -lcurl... no
checking for ext/hash support... yes
checking for php_hash.h... /usr/local/php-5.2.17-cli/include/php/ext/hash
checking for ext/iconv support... yes
checking for ext/session support... yes
checking whether to add a dependency on ext/hash... yes
checking whether to add a dependency on ext/iconv... yes
checking whether to add a dependency on ext/session... yes
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/libtool
--mode=compile cc -I. -I/tmp/pear/temp/pecl_http -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/include
-I/tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/main
-I/tmp/pear/temp/pecl_http -I/usr/local/php-5.2.17-cli/include/php
-I/usr/local/php-5.2.17-cli/include/php/main
-I/usr/local/php-5.2.17-cli/include/php/TSRM
-I/usr/local/php-5.2.17-cli/include/php/Zend
-I/usr/local/php-5.2.17-cli/include/php/ext
-I/usr/local/php-5.2.17-cli/include/php/ext/date/lib
-I/usr/local/include -I/usr/local/php-5.2.17-cli/include/php/ext/hash
-DHAVE_CONFIG_H -march=nocona -O2 -pipe -c
/tmp/pear/temp/pecl_http/missing.c -o missing.lo
mkdir .libs
 cc -I. -I/tmp/pear/temp/pecl_http -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/include
-I/tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/main
-I/tmp/pear/temp/pecl_http -I/usr/local/php-5.2.17-cli/include/php
-I/usr/local/php-5.2.17-cli/include/php/main
-I/usr/local/php-5.2.17-cli/include/php/TSRM
-I/usr/local/php-5.2.17-cli/include/php/Zend
-I/usr/local/php-5.2.17-cli/include/php/ext
-I/usr/local/php-5.2.17-cli/include/php/ext/date/lib
-I/usr/local/include -I/usr/local/php-5.2.17-cli/include/php/ext/hash
-DHAVE_CONFIG_H -march=nocona -O2 -pipe -c
/tmp/pear/temp/pecl_http/missing.c -fPIC -DPIC -o .libs/missing.o
/bin/bash /tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/libtool
--mode=compile cc -I. -I/tmp/pear/temp/pecl_http -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/include
-I/tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/main
-I/tmp/pear/temp/pecl_http -I/usr/local/php-5.2.17-cli/include/php
-I/usr/local/php-5.2.17-cli/include/php/main
-I/usr/local/php-5.2.17-cli/include/php/TSRM
-I/usr/local/php-5.2.17-cli/include/php/Zend
-I/usr/local/php-5.2.17-cli/include/php/ext
-I/usr/local/php-5.2.17-cli/include/php/ext/date/lib
-I/usr/local/include -I/usr/local/php-5.2.17-cli/include/php/ext/hash
-DHAVE_CONFIG_H -march=nocona -O2 -pipe -c
/tmp/pear/temp/pecl_http/http.c -o http.lo
 cc -I. -I/tmp/pear/temp/pecl_http -DPHP_ATOM_INC
-I/tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/include
-I/tmp/pear/temp/pear-build-rootBuWBRM/pecl_http-1.7.4/main
-I/tmp/pear/temp/pecl_http -I/usr/local/php-5.2.17-cli/include/php
-I/usr/local/php-5.2.17-cli/include/php/main
-I/usr/local/php-5.2.17-cli/include/php/TSRM
-I/usr/local/php-5.2.17-cli/include/php/Zend
-I/usr/local/php-5.2.17-cli/include/php/ext
-I/usr/local/php-5.2.17-cli/include/php/ext/date/lib
-I/usr/local/include -I/usr/local/php-5.2.17-cli/include/php/ext/hash
-DHAVE_CONFIG_H -march=nocona -O2 -pipe -c
/tmp/pear/temp/pecl_http/http.c -fPIC -DPIC -o .libs/http.o
In file included from /tmp/pear/temp/pecl_http/php_http.h:58,
                 from /tmp/pear/temp/pecl_http/http.c:20:
/usr/local/include/curl/curl.h:2070: error: expected identifier or ‘(’
before string constant
make: *** [http.lo] Error 1
ERROR: `make' failed

Any idea what the problem is?

Thanks,
Mario

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2012-08-30