Bug #66013 [Com]: Solaris build failure with 5.5
| From: | rainer dot jung at kippdata dot de | Date: | Mon, 27 Jan 2014 19:28:39 +0000 |
| Subject: | Bug #66013 [Com]: Solaris build failure with 5.5 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184039@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66013&edit=1
ID: 66013
Comment by: rainer dot jung at kippdata dot de
Reported by: Pete_Wall at symantec dot com
Summary: Solaris build failure with 5.5
Status: Assigned
Type: Bug
Package: Compile Failure
Operating System: Solaris 10 (x86 and SPARC)
PHP Version: 5.5.5
Assigned To: cataphract
Block user comment: N
Private report: N
New Comment:
My workaround is adding
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE_EXTENDED 1
#define __EXTENSIONS__
at the top of the files ext/sockets/conversions.c and ext/sockets/sendrecvmsg.c.
Previous Comments:
------------------------------------------------------------------------
[2014-01-16 13:26:03] christian dot lachner at gmail dot com
On Solaris 5.11, the problem's source is in /usr/include/sys/socket.h where the struct
'msghdr' is declared. The missing two elements '*msg_control' and
'msg_controllen' are IFDEFed out and can only be enabled by setting __lint, _XPG4_2 or
_KERNEL. However, neither of these three values is set by the configure-script.
As a result, using export EXTRA_CFLAGS="-D__lint" makes socket.so as well as the rest of
php build fine. Don't use EXTRA_CFLAGS="-D_XPG4_2" as it probably breaks other stuff.
Dunno about older Solaris releases though.
------------------------------------------------------------------------
[2014-01-10 17:48:22] meths at btinternet dot com
Still happens with 5.5.7 on SmartOS so is probably affecting all illumos and Solaris based systems.
Also duplicate of https://bugs.php.net/bug.php?id=65427 although the
comment in this bug suggests the workaround in that bug is incorrect.
------------------------------------------------------------------------
[2013-11-29 17:09:01] rob dot de dot langhe at twistfare dot be
And it also happens on (true) Solaris-10 compiling PHP 5.5.6 on SPARC :
/bin/bash /our_base_dir/src/php-5.5.6/libtool --silent --preserve-dup-deps --mode=compile
/our_base_dir/bin/gcc -Iext/sockets/ -I/our_base_dir/src/php-5.5.6/ext/sockets/ -DPHP_ATOM_INC
-I/our_base_dir/src/php-5.5.6/include -I/our_base_dir/src/php-5.5.6/main
-I/our_base_dir/src/php-5.5.6 -I/our_base_dir/src/php-5.5.6/ext/date/lib
-I/our_base_dir/src/php-5.5.6/ext/ereg/regex -I/usr/include/libxml2 -I/our_base_dir/include
-I/our_base_dir/src/php-5.5.6/ext/sqlite3/libsqlite -I/our_base_dir/src/php-5.5.6/TSRM
-I/our_base_dir/src/php-5.5.6/Zend -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT -m32 -I/our_base_dir/include -fvisibility=hidden -DZTS -c
/our_base_dir/src/php-5.5.6/ext/sockets/sockaddr_conv.c -o ext/sockets/sockaddr_conv.lo
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c: In function
'from_zval_write_control_array':
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c:973:8: error: 'struct msghdr' has no
member named 'msg_control'
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c:974:8: error: 'struct msghdr' has no
member named 'msg_controllen'
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c: In function
'to_zval_read_control_array':
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c:1037:12: warning: assignment makes pointer
from integer without a cast [enabled by default]
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c:1039:9: warning: assignment makes pointer from
integer without a cast [enabled by default]
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c: In function
'from_zval_write_controllen':
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c:1146:8: error: 'struct msghdr' has
no member named 'msg_control'
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c:1147:8: error: 'struct msghdr' has
no member named 'msg_controllen'
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c: In function 'to_zval_read_msghdr':
/our_base_dir/src/php-5.5.6/ext/sockets/conversions.c:1248:34: error: 'struct msghdr' has
no member named 'msg_flags'
The flags used :
./configure --with-apxs2=/our_base_dir/bin/apxs --with-config-file-path=/our_base_dir/etc
--prefix=/our_base_dir --with-gd=/our_base_dir --with-png-dir=/our_base_dir --with-xpm-dir=no
--disable-phar --enable-sockets --with-zlib --without-pear --without-iconv
------------------------------------------------------------------------
[2013-11-03 11:32:36] phperror at kim dot net
This error occurs when compiling php 5.5.5 on Omnios which is
a continuation of OpenSolaris.
------------------------------------------------------------------------
[2013-10-31 18:49:50] Pete_Wall at symantec dot com
Both Solaris 10 x86 and Sparc:
CPPFLAGS=" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
./configure --disable-cgi --enable-cli --prefix="/path/to/php"
--with-libxml-dir="/path/to/libxml" --with-openssl=shared,"/path/to/openssl"
--with-zlib="/path/to/zlib" --with-curl=shared,"/path/to/curl"
--with-config-file-path=/path/to/cfgfile --with-layout=GNU
--with-regex=php --with-tsrm-pthreads --disable-rpath --disable-sysvsem --disable-sysvshm
--disable-sysvmsg --disable-bcmath --disable-ctype --disable-exif --disable-spl --disable-ftp
--disable-shmop --enable-tokenizer --disable-static --enable-posix=shared
--enable-session=shared
--enable-sockets=shared --enable-xml=shared --enable-pcntl=shared --enable-dom --without-mm
--without-gettext --without-iconv --without-sqlite --without-mime-magic --without-mysql
--without-sybase-ct
--without-gdbm --without-db4 --without-cdb --without-pear --without-xsl --disable-debug
--with-pcre-dir="/path/to/pcre" --with-pcre-regex
Solaris 10 x86:
CFLAGS=" -m64"
$ gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw
--with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld
--enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
Solaris 10 Sparc:
CFLAGS=""
$ gcc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared
--enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=66013
--
Edit this bug report at https://bugs.php.net/bug.php?id=66013&edit=1