I am trying to build Apache/mod_ssl/PHP with --enable-sockets active on Solaris 2.6. Unfortunately the make for PHP bombs with a parse error. I was wondering if anyone knew if there is a problem with this configuration.
-- Grant
Using:
Solaris 2.6
gcc 2.8.1
GNU make
Apache 1.3.14
mod_ssl 2.7.1-1.3.14
PHP 4.0.3pl1
Log:
<snip>
CFLAGS='-O2 -I/usr/local/ssl/include' \
./configure \
--with-apache=../apache_1.3.14 \
--enable-track-vars \
--enable-memory-limit=yes \
--enable-sockets \
--enable-debug=no
<snip>
make
<snip>
gcc -I. -I/export/home/zip/php-4.0.3pl1/ext/sockets -I/export/home/zip/php-4.0.3pl1 -I/export/home/zip/php-4.0.3pl1/main -I/export/home/zip/apache_1.3.14/src/include -I/export/home/zip/apache_1.3.14/src/os/unix -I/export/home/zip/php-4.0.3pl1/Zend -I/export/home/zip/php-4.0.3pl1 -I/export/home/zip/php-4.0.3pl1/ext/mysql/libmysql -I/export/home/zip/php-4.0.3pl1/ext/xml/expat/xmltok -I/export/home/zip/php-4.0.3pl1/ext/xml/expat/xmlparse -I/export/home/zip/php-4.0.3pl1/TSRM -D_POSIX_PTHREAD_SEMANTICS -DXML_BYTE_ORDER=21 -O2 -I/usr/local/ssl/include -c sockets.c && touch sockets.lo
sockets.c: In function php_if_connect':
sockets.c:883: parse error before1'
sockets.c:934: invalid lvalue in assignment
sockets.c:935: invalid type argument of ->'
sockets.c: In functionphp_if_recvfrom':
sockets.c:1367: parse error before 1'
sockets.c:1377: invalid lvalue in unary&'
sockets.c:1395: request for member sun_path' in something not a structure or union
sockets.c:1396: request for membersun_path' in something not a structure or union
sockets.c: In function php_if_sendto':
sockets.c:1495: parse error before1'
sockets.c:1500: invalid lvalue in unary &'
sockets.c:1501: request for membersun_family' in something not a structure or union
sockets.c:1502: request for member sun_path' in something not a structure or union
sockets.c:1505: invalid lvalue in unary&'
sockets.c:1505: invalid lvalue in unary &'
sockets.c: In functionphp_if_recvmsg':
sockets.c:1557: parse error before 1'
sockets.c:1608: warning: assignment from incompatible pointer type
sockets.c:1614: structure has no member namedmsg_control'
sockets.c:1615: structure has no member named msg_controllen'
sockets.c:1617: structure has no member namedmsg_control'
sockets.c:1618: structure has no member named msg_controllen'
sockets.c:1621: structure has no member namedmsg_flags'
sockets.c:1627: structure has no member named msg_control'
sockets.c:1636: warning: passing arg 3 ofadd_assoc_string' makes pointer from integer without a cast
sockets.c:1640: structure has no member named msg_controllen'
sockets.c:1641: structure has no member namedmsg_flags'
sockets.c:1667: warning: assignment makes pointer from integer without a cast
sockets.c:1673: structure has no member named msg_control'
sockets.c:1674: structure has no member namedmsg_controllen'
sockets.c:1676: structure has no member named msg_control'
sockets.c:1677: structure has no member namedmsg_controllen'
sockets.c:1680: structure has no member named msg_flags'
sockets.c:1686: structure has no member namedmsg_control'
sockets.c:1695: warning: passing arg 3 of add_assoc_string' makes pointer from integer without a cast
sockets.c:1697: structure has no member namedmsg_controllen'
sockets.c:1698: structure has no member named msg_flags'
sockets.c:1702: invalid type argument of->'
sockets.c: In function php_if_sendmsg':
sockets.c:1746: warning: assignment from incompatible pointer type
sockets.c:1768: parse error before1'
sockets.c:1770: warning: assignment makes pointer from integer without a cast
sockets.c:1774: invalid type argument of ->'
sockets.c: In functionphp_if_getsockopt':
sockets.c:1815: warning: passing arg 4 of getsockopt' from incompatible pointer type
sockets.c:1832: warning: passing arg 4 ofgetsockopt' from incompatible pointer type
sockets.c: In function php_if_setsockopt':
sockets.c:1888: warning: passing arg 4 ofsetsockopt' from incompatible pointer type
sockets.c:1895: warning: passing arg 4 of setsockopt' from incompatible pointer type
make[3]: *** [sockets.lo] Error 1
make[3]: Leaving directory/export/home/zip/php-4.0.3pl1/ext/sockets'
make[2]: [all-recursive] Error 1
make[2]: Leaving directory /export/home/zip/php-4.0.3pl1/ext/sockets'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory/export/home/zip/php-4.0.3pl1/ext'
make: [all-recursive] Error 1
Notes:
- build works if --enable-sockets is removed from configure
- there is an "#if !defined(_XPG4_2)" in sys/socket.h that sets the struct definition for msghdr