php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39878 CURL doesn't compile on Sun Studio Pro
Submitted: 2006-12-18 21:28 UTC Modified: 2006-12-26 17:11 UTC
From: leozh at nbcs dot rutgers dot edu Assigned: iliaa (profile)
Status: Closed Package: cURL related
PHP Version: 5.2.1RC1 OS: Solaris 9
Private report: No CVE-ID: None
 [2006-12-18 21:28 UTC] leozh at nbcs dot rutgers dot edu
Description:
------------
I tried to compile PHP 5.1.6 on my Solaris 9 box with Sun Studio Pro. cURL did not compile because it used deprecated cURL functions that did not exist in cURL 7.16. I then took the curl extension from the current 5.2 cvs and put it in the 5.1.6 source tree.

Actual result:
--------------
This is what happens:

Sun Studio Pro does not like void functions returning values

/bin/sh /usr/local/src/rpm-packages/BUILD/php-5.1.6/libtool --silent --preserve-dup-deps --mode=compile /opt/SUNWspro/bin/cc  -Iext/curl/ -I/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/ -DPHP_ATOM_INC -I/usr/local/src/rpm-packages/BUILD/php-5.1.6/include -I/usr/local/src/rpm-packages/BUILD/php-5.1.6/main -I/usr/local/src/rpm-packages/BUILD/php-5.1.6 -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/date/lib -I/usr/local/include/freetype2 -I/usr/local/src/rpm-packages/BUILD/php-5.1.6/imap-2004g/c-client/include -I//usr/local/mysql5/include/mysql -I/usr/local/mysql-5.0.27/include/mysql -I/usr/local/include/pspell -I/usr/local/src/rpm-packages/BUILD/php-5.1.6/TSRM -I/usr/local/src/rpm-packages/BUILD/php-5.1.6/Zend  -I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS  -I/usr/include -mt -g -xs   -c /usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c -o ext/curl/interface.lo 
"/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c", line 1071: invalid type combination
"/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c", line 1084: void function cannot return value
"/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c", line 1084: void function cannot return value
"/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c", line 1084: void function cannot return value
"/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c", line 1464: warning: enum type mismatch: op "="
"/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c", line 1471: warning: enum type mismatch: op "="
"/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c", line 1622: warning: argument #3 is incompatible with prototype:
        prototype: pointer to unsigned int : "/usr/local/src/rpm-packages/BUILD/php-5.1.6/Zend/zend_hash.h", line 172
        argument : pointer to int
"/usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c", line 1622: warning: argument #4 is incompatible with prototype:
        prototype: pointer to unsigned long : "/usr/local/src/rpm-packages/BUILD/php-5.1.6/Zend/zend_hash.h", line 172
        argument : pointer to long
cc: acomp failed for /usr/local/src/rpm-packages/BUILD/php-5.1.6/ext/curl/interface.c
*** Error code 1
make: Fatal error: Command failed for target `ext/curl/interface.lo'


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-18 21:53 UTC] leozh at nbcs dot rutgers dot edu
Ignore the error on line 1071 though, that is from me putting a void in front of the function declaration, but the error that caused the compile to fail was the one on line 1084.
 [2006-12-18 23:37 UTC] bjori@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

It should be fixed already, please reopen if you can 
reproduce this with 5.2.1RC1 or the latest snap 
(http://snaps.php.net)
 [2006-12-19 00:02 UTC] leozh at nbcs dot rutgers dot edu
I have tried to compile 5.2.1RC1 and this is what I get:

/bin/sh /usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/libtool --silent --preserve-dup-deps --mode=compile /opt/SUNWspro/bin/cc  -Iext/curl/ -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/ -DPHP_ATOM_INC -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/include -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/main -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1 -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/date/lib -I/usr/local/include/freetype2 -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/imap-2004g/c-client/include -I//usr/local/mysql5/include/mysql -I/usr/local/mysql-5.0.27/include/mysql -I/usr/local/include/pspell -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/TSRM -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/Zend  -I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS  -I/usr/include -mt -g -xs   -c /usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/interface.c -o ext/curl/interface.lo 
/bin/sh /usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/libtool --silent --preserve-dup-deps --mode=compile /opt/SUNWspro/bin/cc  -Iext/curl/ -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/ -DPHP_ATOM_INC -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/include -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/main -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1 -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/date/lib -I/usr/local/include/freetype2 -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/imap-2004g/c-client/include -I//usr/local/mysql5/include/mysql -I/usr/local/mysql-5.0.27/include/mysql -I/usr/local/include/pspell -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/TSRM -I/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/Zend  -I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS  -I/usr/include -mt -g -xs   -c /usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/multi.c -o ext/curl/multi.lo 
"/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/interface.c", line 1084: void function cannot return value
"/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/interface.c", line 1084: void function cannot return value
"/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/interface.c", line 1084: void function cannot return value
"/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/interface.c", line 1464: warning: enum type mismatch: op "="
"/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/interface.c", line 1471: warning: enum type mismatch: op "="
"/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/interface.c", line 1622: warning: argument #3 is incompatible with prototype:
        prototype: pointer to unsigned int : "/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/Zend/zend_hash.h", line 172
        argument : pointer to int
"/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/interface.c", line 1622: warning: argument #4 is incompatible with prototype:
        prototype: pointer to unsigned long : "/usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/Zend/zend_hash.h", line 172
        argument : pointer to long
cc: acomp failed for /usr/local/src/rpm-packages/BUILD/php-5.2.1RC1/ext/curl/interface.c

It still doesn't like the voids returning values.
 [2006-12-19 17:24 UTC] iliaa@php.net
Try the following patch and see if it fixes the build
http://bb.prohost.org/patch/curl.txt
 [2006-12-26 17:11 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2013-04-01 05:41 UTC] william at thesl dot com
I'm experiencing the same problem with a Solaris 10 machine compiling php 5.4.13. 
I'm initially compiling 32-bit then attempting 64-bit. However, 32-bit is failing.

My environment:

Solaris 10 SPARC latest patches as of 01/2013

Compiler: Oracle Solaris Studio 12.3

Environment/line ran:


PATH=/root/bin:/opt/thesl/bin:/opt/thesl/mysql/bin:/opt/solarisstudio12.3/bin:/usr
/bin:/usr/sbin:/usr/sfw/bin:/usr/sfw/sbin:/usr/ccs/bin:/usr/ucb
LANG=C
CC=cc
CFLAGS="-fast -m32 -xtarget=ultraT1"
CXX=CC
CXXFLAGS="-fast -m32 -xtarget=ultraT1"
CPPFLAGS="-I/opt/thesl/include -I/opt/thesl/include/readline -
I/opt/thesl/include/openssl -I/opt/thesl/include/ncurses -I/usr/openwin/include -
I/opt/thesl/include/freetype2/freetype -I/usr/include/firefox"
LDFLAGS="-L/opt/thesl/lib -R/opt/thesl/lib -L/opt/thesl/mysql/lib -
R/opt/thesl/mysql/lib -L/usr/openwin/lib -R/usr/openwin/lib"
LIBS="-lmtmalloc"
export CC CFLAGS CXX CXXFLAGS CPPFLAGS LDFLAGS LIBS PATH 

gmake distclean
gmake clean

./configure --prefix=/opt/thesl/php5 --bindir=/opt/thesl/php5/bin --
sbindir=/opt/thesl/php5/sbin --libdir=/opt/thesl/php5/lib \
--sysconfdir=/opt/thesl/etc/php5 \
--with-apxs2=/opt/thesl/apache2/bin/apxs \
--with-config-file-path=/opt/thesl/php5/lib \
--with-zlib \
--with-zlib-dir=shared,/opt/thesl \
--with-mysqli=shared,/opt/thesl/mysql/bin/mysql_config \
--with-mysql=shared,/opt/thesl/mysql \
--with-openssl=shared,/opt/thesl \
--with-bz2=shared,/usr \
--with-readline=shared,/opt/thesl \
--with-snmp=shared,/opt/thesl \
--enable-bcmath \
--enable-calendar \
--enable-sockets \
--enable-sysvshm \
--enable-zip \
--with-pear \
--enable-shared \
--enable-dba=shared \
--with-gd \
--enable-soap \
--with-pdo-mysql=/opt/thesl/mysql \
--with-jpeg-dir=shared,/usr \
--with-png-dir=shared,/opt/thesl \
--with-xpm-dir=shared,/usr/openwin \
--with-freetype-dir=shared,/opt/thesl \
--with-curl=/opt/thesl \
--with-curlwrappers \
--with-imap-ssl=/opt/thesl \
--with-imap=/opt/thesl/imap-2007f-32bit \
--with-config-file-path=/opt/thesl/php5/lib/php.ini

"/opt/thesl/include/curl/curlrules.h", line 143: zero or negative subscript
"/opt/thesl/include/curl/curlrules.h", line 153: zero or negative subscript
"/opt/src/php-5.4.13/ext/curl/interface.c", line 281: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 285: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 291: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 296: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 305: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 309: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 313: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 317: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 320: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 325: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 340: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 349: warning: initializer will be 
sign-extended: -1
"/opt/src/php-5.4.13/ext/curl/interface.c", line 2101: warning: enum type 
mismatch: op "="
"/opt/src/php-5.4.13/ext/curl/interface.c", line 2115: warning: enum type 
mismatch: op "="
cc: acomp failed for /opt/src/php-5.4.13/ext/curl/interface.c
gmake: *** [ext/curl/interface.lo] Error 1
gmake: *** Waiting for unfinished jobs....
root@builder-/opt/src/php-5.4.13 # 

Ideas?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC