Opened 10 years ago

Closed 10 years ago

#29201 closed defect (fixed)

curl: curl-config --version doesn't show version

Reported by: phpcurlnotworking@… Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: curl

Description (last modified by ryandesign (Ryan Schmidt))

Mac OS X Server 10.6.6 (Snow Leopard)

Was doing a normal 'port selfupdate' and 'port upgrade outdated' when php5-curl failed to update to @5.3.6. Tried a number of things including 'port clean php5-curl' and 'port uninstall php5-curl'.

Here's the relevant output:

--->  Configuring php5-curl
Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details)
Log for php5-curl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_php_php5-curl/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Here are the relevant log entries:

:info:configure checking if we should use cURL for url streams... no
:info:configure checking for cURL 7.10.5 or greater... configure: error: cURL version 7.10.5 or later is required to compile php with cURL support
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_php_php5-curl/work/php-5.3.6/ext/curl" && ./configure --prefix=/opt/local --with-curl=/opt/local " returned error 1
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
:debug:configure Backtrace: configure failure: shell command failed (see log for details)
while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for php5-curl): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Log for php5-curl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_php_php5-curl/main.log

'port installed' shows:

...
  curl @7.21.5_0+ssl (active)
  curl-ca-bundle @7.21.5_0 (active)
...

Attachments (1)

config.log (11.7 KB) - added by ddebernardy@… 10 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 10 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Keywords: php5-curl removed
Owner: changed from macports-tickets@… to ryandesign@…
Summary: 'port install/upgrade php5-curl' not workingphp5-curl: cURL version 7.10.5 or later is required to compile php with cURL support

I've corrected your WikiFormatting.

comment:2 Changed 10 years ago by ryandesign (Ryan Schmidt)

Could you attach the config.log for php5-curl? It might show us why it failed to find curl.

comment:3 in reply to:  2 Changed 10 years ago by ddebernardy@…

Replying to ryandesign@…:

Could you attach the config.log for php5-curl? It might show us why it failed to find curl.

I've the same issue, but there doesn't seem to be any such file... Here's the contents of main.log:

DB:/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_php_php5-curl $ cat main.log 
version:1
:msg:main --->  Computing dependencies for php5-curl:info:main .:debug:main Searching for dependency: php5
:debug:main Found Dependency: receipt exists for php5
:debug:main Searching for dependency: curl
:debug:main Found Dependency: receipt exists for curl
:msg:main 
:debug:main Executing org.macports.main (php5-curl)
:debug:main Skipping completed org.macports.fetch (php5-curl)
:debug:main Skipping completed org.macports.checksum (php5-curl)
:debug:main setting option extract.cmd to /usr/bin/bzip2
:debug:main Skipping completed org.macports.extract (php5-curl)
:debug:main Skipping completed org.macports.patch (php5-curl)
:msg:main --->  Configuring php5-curl
:debug:main Using compiler 'Mac OS X gcc 4.2'
:debug:configure configure phase started at Tue Apr 19 13:45:57 CEST 2011
:debug:configure Executing proc-pre-org.macports.configure-configure-0
:debug:configure Generating configure script in curl
:info:configure Configuring for:
:info:configure PHP Api Version:         20090626
:info:configure Zend Module Api No:      20090626
:info:configure Zend Extension Api No:   220090626
:info:configure configure.in:3: warning: prefer named diversions
:info:configure configure.in:3: warning: prefer named diversions
:debug:configure Executing proc-pre-org.macports.configure-configure-1
:debug:configure Executing org.macports.configure (php5-curl)
:debug:configure Configuring in curl
:debug:configure Environment: CPATH='/opt/local/include' CFLAGS='-pipe -O2 -arch x86_64' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-pipe -O2 -arch x86_64' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.6' CXX='/usr/bin/g++-4.2' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_php_php5-curl/work/.CC_PRINT_OPTIONS' F90FLAGS='-pipe -O2 -m64' LDFLAGS='-L/opt/local/lib -arch x86_64' OBJC='/usr/bin/gcc-4.2' FCFLAGS='-pipe -O2 -m64' INSTALL='/usr/bin/install -c' OBJCFLAGS='-pipe -O2 -arch x86_64' FFLAGS='-pipe -O2 -m64' CC_PRINT_OPTIONS='YES' CC='/usr/bin/gcc-4.2'
:debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_php_php5-curl/work/php-5.3.6/ext/curl" && ./configure --prefix=/opt/local --with-curl=/opt/local'
:info:configure checking for grep that handles long lines and -e... /usr/bin/grep
:info:configure checking for egrep... /usr/bin/grep -E
:info:configure checking for a sed that does not truncate output... /opt/local/bin/gsed
:info:configure checking whether the C compiler works... yes
:info:configure checking for C compiler default output file name... a.out
:info:configure checking for suffix of executables... 
:info:configure checking whether we are cross compiling... no
:info:configure checking for suffix of object files... o
:info:configure checking whether we are using the GNU C compiler... yes
:info:configure checking whether /usr/bin/gcc-4.2 accepts -g... yes
:info:configure checking for /usr/bin/gcc-4.2 option to accept ISO C89... none needed
:info:configure checking how to run the C preprocessor... /usr/bin/gcc-4.2 -E
:info:configure checking for icc... no
:info:configure checking for suncc... no
:info:configure checking whether /usr/bin/gcc-4.2 and cc understand -c and -o together... yes
:info:configure checking for system library directory... lib
:info:configure checking if compiler supports -R... no
:info:configure checking if compiler supports -Wl,-rpath,... yes
:info:configure checking build system type... i386-apple-darwin10.7.0
:info:configure checking host system type... i386-apple-darwin10.7.0
:info:configure checking target system type... i386-apple-darwin10.7.0
:info:configure checking for PHP prefix... /opt/local
:info:configure checking for PHP includes... -I/opt/local/include/php -I/opt/local/include/php/main -I/opt/local/include/php/TSRM -I/opt/local/include/php/Zend -I/opt/local/include/php/ext -I/opt/local/include/php/ext/date/lib -I/opt/local/include
:info:configure checking for PHP extension directory... /opt/local/lib/php/extensions/no-debug-non-zts-20090626
:info:configure checking for PHP installed headers prefix... /opt/local/include/php
:info:configure checking if debug is enabled... no
:info:configure checking if zts is enabled... no
:info:configure checking for re2c... no
:info:configure configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
:info:configure checking for gawk... gawk
:info:configure checking for cURL support... yes, shared
:info:configure checking if we should use cURL for url streams... no
:info:configure checking for cURL 7.10.5 or greater... configure: error: cURL version 7.10.5 or later is required to compile php with cURL support
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_php_php5-curl/work/php-5.3.6/ext/curl" && ./configure --prefix=/opt/local --with-curl=/opt/local " returned error 1
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
:debug:configure Backtrace: configure failure: shell command failed (see log for details)
    while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for php5-curl): org.macports.destroot org.macports.configure org.macports.build
:notice:configure Log for php5-curl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_php_php5-curl/main.log

comment:4 Changed 10 years ago by ddebernardy@…

Ack, found it in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_php_php5-curl/work/php-5.3.6/ext/curl. Attaching...

Changed 10 years ago by ddebernardy@…

Attachment: config.log added

comment:5 Changed 10 years ago by ddebernardy@…

The issue seems to be line 4459 in configure:

  curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`

Problem is this:

DB:~ $ curl --version
curl 7.21.5 (x86_64-apple-darwin10.7.0) libcurl/7.21.5 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.20
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: IDN IPv6 Largefile NTLM SSL libz 

The sed -e part is incorrect, and the awk part seems to have its own issues:

DB:~ $ echo 7.21.5  | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'
7021005

DB:~ $ curl --version | sed -e 's/lib//' | sed -e 's/curl //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 100 * 1000 + $3;}'
702100500

comment:6 Changed 10 years ago by ryandesign (Ryan Schmidt)

Status: newassigned

Thanks, issue confirmed.

comment:7 Changed 10 years ago by ddebernardy@…

This yields the expected result:

DB:~ $ curl --version | head -1 | sed -e 's/lib//' | sed -e 's/curl //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'
7021005

comment:8 Changed 10 years ago by ryandesign (Ryan Schmidt)

Port: curl added; php5-curl removed
Summary: php5-curl: cURL version 7.10.5 or later is required to compile php with cURL supportcurl: curl-config --version doesn't show version

php5-curl is fine; it's curl's curl-config that's broken.

comment:10 Changed 10 years ago by ryandesign (Ryan Schmidt)

comment:11 Changed 10 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.