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

curl-and-php

RE: pecl-http curl-related compile errors

From: Sam Sexton <Sam.Sexton_at_thomsonreuters.com>
Date: Thu, 13 Nov 2008 14:04:41 +0000

I've enlisted the help of some fluent C speakers and we've made some
progress on this, but are still stumped.
We ran gcc with -E to see what came out of the pre-processor - and found
that the references to curl_easy_strerror
and curl_share_strerror were replaced by "unknown error". As shown
below, the same result occurs with two different
compilers. I appended a '2' to curl_easy_strerror so that an unknown
name was produced - and the pre-processor didn't
complain - and neither did the compilation - well, as far as it got,
anyway. Huh?!
 
Hopefully this will help in diagnosing the problem. Please let me know
if you need any more information.
 
/tmp/foo is:
 
 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
 
[2618](root_at_ntm-igdev02)~radt/.../pecl_http-1.6.1
<mailto:root_at_ntm-igdev02)~radt/.../pecl_http-1.6.1> : /tmp/foo
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
[2619](root_at_ntm-igdev02)~radt/.../pecl_http-1.6.1
<mailto:root_at_ntm-igdev02)~radt/.../pecl_http-1.6.1> :
 
 
   1734 /*
   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);
   1755
 
 gcc 3.4.6 on Solaris 10:
  
  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
  9718 CURLcode curl_easy_pause(CURL *handle, int bitmask);
  9719 # 1782 "/usr/local/include/curl/curl.h" 3
  9720 # 1 "/usr/local/include/curl/
  
  gcc 4.1.1 on Solaris 10:
  
  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
  9718 CURLcode curl_easy_pause(CURL *handle, int bitmask);
  9719 # 1782 "/usr/local/include/curl/curl.h" 3
  9720 # 1 "/usr/local/include/curl/easy.h" 1 3
<mailto:'curl-and-php_at_cool.haxx.se'>
 
/Sam

Sam Sexton
Provisioning Team Leader

Thomson Reuters

Phone: 53372 or +44 24 7625 6562
Mobile: +44 7990 563739

sam.sexton_at_thomsonreuters.com
thomsonreuters.com

 

This email was sent to you by Thomson Reuters, the global news and information company.
Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-11-13