----- Original Message ----- From: Johannes Schlüter <johan...@schlueters.de> Date: Monday, February 25, 2013 9:17 am Subject: Re: [PHP-DEV] PHP 5.4.12 and libcurl 7.29.0 configure problem To: Dennis Clarke <dcla...@blastwave.org> Cc: internals@lists.php.net, christopher.jo...@oracle.com
> On Mon, 2013-02-25 at 09:08 -0500, Dennis Clarke wrote: > > > So my guess would be that there is some mix between 32 and 64 bit > > mode, > > > try compiling with setting CFLAGS="-m64" (or CFLAGS="-m32") for > > > configure. > > > > Everything here is -m64 and -xtarget=ultraT2 so not sure where else > to > > look. > > How did you compile curl? Let's see .. : $ head curl-7.29.0_SunOS5.10_sparcv9.002/config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by curl configure -, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure --enable-shared --enable-static --with-libidn=/usr/local --enable-tls-srp --with-ssl Had no issues with curl. Worked great and : $ which curl /usr/local/bin/curl $ file /usr/local/bin/curl /usr/local/bin/curl: ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, stripped $ elfdump -e /usr/local/bin/curl ELF Header ei_magic: { 0x7f, E, L, F } ei_class: ELFCLASS64 ei_data: ELFDATA2MSB ei_osabi: ELFOSABI_SOLARIS ei_abiversion: EAV_SUNW_CURRENT e_machine: EM_SPARCV9 e_version: EV_CURRENT e_type: ET_EXEC e_flags: [ EF_SPARCV9_TSO EF_SPARC_SUN_US1 EF_SPARC_SUN_US3 ] e_entry: 0x100003260 e_ehsize: 64 e_shstrndx: 22 e_shoff: 0x29888 e_shentsize: 64 e_shnum: 23 e_phoff: 0x40 e_phentsize: 56 e_phnum: 5 $ curl --version curl 7.29.0 (sparc-sun-solaris2.10) libcurl/7.29.0 OpenSSL/1.0.1e zlib/1.2.7 libidn/1.26 libssh2/1.4.3 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP $ curl-config --cc /opt/solarisstudio12.3/bin/cc $ curl-config --configure '--enable-shared' '--enable-static' '--with-libidn=/usr/local' '--enable-tls-srp' '--with-ssl' 'CC=/opt/solarisstudio12.3/bin/cc' 'CFLAGS=-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xa -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16' 'CPPFLAGS=-I/usr/local/include -I/usr/local/ssl/include -I/opt/mysql/mysql/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE' $ elfdump -dev /usr/local/bin/curl | grep NEEDED [0] NEEDED 0x946 libcurl.so.4 [1] NEEDED 0x953 libidn.so.11 [2] NEEDED 0x960 libintl.so.8 [3] NEEDED 0x928 libc.so.1 [4] NEEDED 0x96d libiconv.so.2 [5] NEEDED 0x97b libssh2.so.1 [6] NEEDED 0x988 libssl.so.1.0.0 [7] NEEDED 0x998 libcrypto.so.1.0.0 [8] NEEDED 0x9ab libldap.so.5 [9] NEEDED 0x9b8 libz.so.1 [10] NEEDED 0x93b librt.so.1 [11] NEEDED 0x9c2 libsocket.so.1 [12] NEEDED 0x9d1 libnsl.so.1 No issues there. Also : $ cat hack.c /********************************************************************* * The Open Group Base Specifications Issue 6 * IEEE Std 1003.1, 2004 Edition * * An XSI-conforming application should ensure that the feature * test macro _XOPEN_SOURCE is defined with the value 600 before * inclusion of any header. This is needed to enable the * functionality described in The _POSIX_C_SOURCE Feature Test * Macro and in addition to enable the XSI extension. * *********************************************************************/ #define _XOPEN_SOURCE 600 #include <stdio.h> #include <stdlib.h> #include <curl/curl.h> int main(int argc, char *argv[]) { curl_version_info_data *data = curl_version_info(CURLVERSION_NOW); if (data && data->ssl_version && *data->ssl_version) { const char *ptr = data->ssl_version; while(*ptr == ' ') ++ptr; printf ( "ptr says : %s\n", ptr ); /* return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1); */ } else { printf ( "error with *data\n" ); exit ( EXIT_FAILURE ); } exit ( EXIT_SUCCESS ); } $ ldd hack libcurl.so.4 => /usr/local/lib/libcurl.so.4 libssh2.so.1 => /usr/local/lib/libssh2.so.1 libc.so.1 => /lib/64/libc.so.1 libidn.so.11 => /usr/local/lib/libidn.so.11 libssl.so.1.0.0 => /usr/local/ssl/lib/libssl.so.1.0.0 libcrypto.so.1.0.0 => /usr/local/ssl/lib/libcrypto.so.1.0.0 libldap.so.5 => /usr/lib/64/libldap.so.5 libz.so.1 => /usr/local/lib/libz.so.1 librt.so.1 => /lib/64/librt.so.1 libsocket.so.1 => /lib/64/libsocket.so.1 libnsl.so.1 => /lib/64/libnsl.so.1 libintl.so.8 => /usr/local/lib/libintl.so.8 libiconv.so.2 => /usr/local/lib/libiconv.so.2 libdl.so.1 => /lib/64/libdl.so.1 libsasl.so.1 => /usr/lib/64/libsasl.so.1 libmd.so.1 => /lib/64/libmd.so.1 libnspr4.so => /usr/lib/mps/64/libnspr4.so libplc4.so => /usr/lib/mps/64/libplc4.so libnss3.so => /usr/lib/mps/64/libnss3.so libssl3.so => /usr/lib/mps/64/libssl3.so libaio.so.1 => /lib/64/libaio.so.1 libmp.so.2 => /lib/64/libmp.so.2 libscf.so.1 => /lib/64/libscf.so.1 libpthread.so.1 => /lib/64/libpthread.so.1 libnssutil3.so => /usr/lib/mps/sparcv9/libnssutil3.so libplds4.so => /usr/lib/mps/sparcv9/libplds4.so libthread.so.1 => /lib/64/libthread.so.1 libdoor.so.1 => /lib/64/libdoor.so.1 libuutil.so.1 => /lib/64/libuutil.so.1 libgen.so.1 => /lib/64/libgen.so.1 libm.so.2 => /lib/64/libm.so.2 /platform/SUNW,T5240/lib/sparcv9/libc_psr.so.1 /platform/SUNW,T5240/lib/sparcv9/libmd_psr.so.1 $ ./hack ptr says : OpenSSL/1.0.1e looks like a good curl to me - Do you have the following in curlbuild.h or > is that some configure created stuff? > > > /* ===================================== */ > /* Sun Studio Compilers */ > /* ===================================== */ > > #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) > #include <stdint.h> > #include <sys/types.h> > #include <sys/socket.h> > > # define CURL_TYPEOF_CURL_OFF_T off_t > # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t > # define CURL_SIZEOF_CURL_SOCKLEN_T 4 > # if defined(__amd64) || defined(__sparcv9) > # define CURL_SIZEOF_CURL_OFF_T 8 > # define CURL_SIZEOF_LONG 8 > [...] > # else > # define CURL_SIZEOF_LONG 4 > [...] > # endif > > Without looking deeper this looks fine ... Nope .. I don't have that! This is what I see : $ cat ./include/curl/curlbuild.h /* include/curl/curlbuild.h. Generated from curlbuild.h.in by configure. */ #ifndef __CURL_CURLBUILD_H #define __CURL_CURLBUILD_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2012, Daniel Stenberg, <dan...@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at http://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ***************************************************************************/ /* ================================================================ */ /* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ /* ================================================================ */ /* * NOTE 1: * ------- * * Nothing in this file is intended to be modified or adjusted by the * curl library user nor by the curl library builder. * * If you think that something actually needs to be changed, adjusted * or fixed in this file, then, report it on the libcurl development * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ * * This header file shall only export symbols which are 'curl' or 'CURL' * prefixed, otherwise public name space would be polluted. * * NOTE 2: * ------- * * Right now you might be staring at file include/curl/curlbuild.h.in or * at file include/curl/curlbuild.h, this is due to the following reason: * * On systems capable of running the configure script, the configure process * will overwrite the distributed include/curl/curlbuild.h file with one that * is suitable and specific to the library being configured and built, which * is generated from the include/curl/curlbuild.h.in template file. * */ /* ================================================================ */ /* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ /* ================================================================ */ #ifdef CURL_SIZEOF_LONG #error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined #endif #ifdef CURL_TYPEOF_CURL_SOCKLEN_T #error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined #endif #ifdef CURL_SIZEOF_CURL_SOCKLEN_T #error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined #endif #ifdef CURL_TYPEOF_CURL_OFF_T #error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined #endif #ifdef CURL_FORMAT_CURL_OFF_T #error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined #endif #ifdef CURL_FORMAT_CURL_OFF_TU #error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined #endif #ifdef CURL_FORMAT_OFF_T #error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined #endif #ifdef CURL_SIZEOF_CURL_OFF_T #error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined #endif #ifdef CURL_SUFFIX_CURL_OFF_T #error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined #endif #ifdef CURL_SUFFIX_CURL_OFF_TU #error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined #endif /* ================================================================ */ /* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ /* ================================================================ */ /* Configure process defines this to 1 when it finds out that system */ /* header file ws2tcpip.h must be included by the external interface. */ /* #undef CURL_PULL_WS2TCPIP_H */ #ifdef CURL_PULL_WS2TCPIP_H # ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN # endif # include <windows.h> # include <winsock2.h> # include <ws2tcpip.h> #endif /* Configure process defines this to 1 when it finds out that system */ /* header file sys/types.h must be included by the external interface. */ #define CURL_PULL_SYS_TYPES_H 1 #ifdef CURL_PULL_SYS_TYPES_H # include <sys/types.h> #endif /* Configure process defines this to 1 when it finds out that system */ /* header file stdint.h must be included by the external interface. */ /* #undef CURL_PULL_STDINT_H */ #ifdef CURL_PULL_STDINT_H # include <stdint.h> #endif /* Configure process defines this to 1 when it finds out that system */ /* header file inttypes.h must be included by the external interface. */ /* #undef CURL_PULL_INTTYPES_H */ #ifdef CURL_PULL_INTTYPES_H # include <inttypes.h> #endif /* Configure process defines this to 1 when it finds out that system */ /* header file sys/socket.h must be included by the external interface. */ #define CURL_PULL_SYS_SOCKET_H 1 #ifdef CURL_PULL_SYS_SOCKET_H # include <sys/socket.h> #endif /* Configure process defines this to 1 when it finds out that system */ /* header file sys/poll.h must be included by the external interface. */ /* #undef CURL_PULL_SYS_POLL_H */ #ifdef CURL_PULL_SYS_POLL_H # include <sys/poll.h> #endif /* The size of `long', as computed by sizeof. */ #define CURL_SIZEOF_LONG 8 /* Integral data type used for curl_socklen_t. */ #define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t /* The size of `curl_socklen_t', as computed by sizeof. */ #define CURL_SIZEOF_CURL_SOCKLEN_T 4 /* Data type definition of curl_socklen_t. */ typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; /* Signed integral data type used for curl_off_t. */ #define CURL_TYPEOF_CURL_OFF_T long /* Data type definition of curl_off_t. */ typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; /* curl_off_t formatting string directive without "%" conversion specifier. */ #define CURL_FORMAT_CURL_OFF_T "ld" /* unsigned curl_off_t formatting string without "%" conversion specifier. */ #define CURL_FORMAT_CURL_OFF_TU "lu" /* curl_off_t formatting string directive with "%" conversion specifier. */ #define CURL_FORMAT_OFF_T "%ld" /* The size of `curl_off_t', as computed by sizeof. */ #define CURL_SIZEOF_CURL_OFF_T 8 /* curl_off_t constant suffix. */ #define CURL_SUFFIX_CURL_OFF_T L /* unsigned curl_off_t constant suffix. */ #define CURL_SUFFIX_CURL_OFF_TU UL #endif /* __CURL_CURLBUILD_H */ So that is not the same .. however, again, I don't see a problem with curl/libcurl here. Also, I am using the Oracle Studio 12.3 compilers which are pretty much the very latest from the guys like daryl Gove and team at Oracle. Works very well with just about everything I build, other than gmp of course. That was always a special case and the gmp team are digging into that all last week. I will go and have another look at my php configure but I have not changed that since 5.4.11 which is running well. Dennis -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php