From: eugene at zhegan dot in Operating system: Solaris PHP version: 5.5.1 Package: Compile Failure Bug Type: Bug Bug description:php fails to build on Solaris with --enable-sockets
Description: ------------ php fails to build on Solaris (10 and 11) with --enable-sockets: [...] /bin/sh /home/emz/src/php-5.5.1/libtool --silent --preserve-dup-deps -- mode=compile gcc -Iext/sockets/ -I/home/emz/src/php-5.5.1/ext/sockets/ - DPHP_ATOM_INC -I/home/emz/src/php-5.5.1/include -I/home/emz/src/php-5.5.1/main - I/home/emz/src/php-5.5.1 -I/home/emz/src/php-5.5.1/ext/date/lib - I/home/emz/src/php-5.5.1/ext/ereg/regex -I/usr/include/libxml2 - I/usr/local/openssl/include -I/usr/local/curl/include - I/usr/local/libpng/include -I/usr/include/freetype2 -I/usr/local/c- client/include -I/home/emz/src/php-5.5.1/ext/mbstring/oniguruma - I/home/emz/src/php-5.5.1/ext/mbstring/libmbfl -I/home/emz/src/php- 5.5.1/ext/mbstring/libmbfl/mbfl -I/usr/local/libmcrypt/include - I/usr/local/mysql/include -I/opt/oracle/orahome/rdbms/public - I/opt/oracle/orahome/rdbms/demo -I/home/emz/src/php-5.5.1/ext/sqlite3/libsqlite -I/home/emz/src/php-5.5.1/TSRM -I/home/emz/src/php-5.5.1/Zend - D_POSIX_PTHREAD_SEMANTICS -I/usr/include -m64 -O -I/usr/local/mysql/include - I/usr/local/openssl/include -I/usr/local/curl/include -I/usr/local/c- client/include -I/usr/local/libpng/include -fvisibility=hidden -c /home/emz/src/php-5.5.1/ext/sockets/conversions.c -o ext/sockets/conversions.lo /home/emz/src/php-5.5.1/ext/sockets/conversions.c: In function âfrom_zval_write_controlâ: /home/emz/src/php-5.5.1/ext/sockets/conversions.c:923:35: warning: cast to pointer from integer of different size /home/emz/src/php-5.5.1/ext/sockets/conversions.c: In function âfrom_zval_write_control_arrayâ: /home/emz/src/php-5.5.1/ext/sockets/conversions.c:973:8: error: âstruct msghdrâ has no member named âmsg_controlâ /home/emz/src/php-5.5.1/ext/sockets/conversions.c:974:8: error: âstruct msghdrâ has no member named âmsg_controllenâ /home/emz/src/php-5.5.1/ext/sockets/conversions.c: In function âto_zval_read_cmsg_dataâ: /home/emz/src/php-5.5.1/ext/sockets/conversions.c:1003:18: warning: cast to pointer from integer of different size /home/emz/src/php-5.5.1/ext/sockets/conversions.c: In function âto_zval_read_control_arrayâ: /home/emz/src/php-5.5.1/ext/sockets/conversions.c:1037:12: warning: assignment makes pointer from integer without a cast /home/emz/src/php-5.5.1/ext/sockets/conversions.c:1039:9: warning: assignment makes pointer from integer without a cast /home/emz/src/php-5.5.1/ext/sockets/conversions.c: In function âfrom_zval_write_controllenâ: /home/emz/src/php-5.5.1/ext/sockets/conversions.c:1146:8: error: âstruct msghdrâ has no member named âmsg_controlâ /home/emz/src/php-5.5.1/ext/sockets/conversions.c:1147:8: error: âstruct msghdrâ has no member named âmsg_controllenâ /home/emz/src/php-5.5.1/ext/sockets/conversions.c: In function âto_zval_read_msghdrâ: /home/emz/src/php-5.5.1/ext/sockets/conversions.c:1248:34: error: âstruct msghdrâ has no member named âmsg_flagsâ /home/emz/src/php-5.5.1/ext/sockets/conversions.c: In function âto_zval_read_fd_arrayâ: /home/emz/src/php-5.5.1/ext/sockets/conversions.c:1427:16: warning: cast to pointer from integer of different size gmake: *** [ext/sockets/conversions.lo] Error 1 This is caused by the lack of CFLAGS. This can be easily fixed by the following actions: - after running configure Makefile should be modified in the followong way: -- this line should be added in Makefile: CFLAGS_SOCKETS = -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -- the lines mentioning ext/sockets should be modified as follows (the variable above should be added into the compilation directive): ext/sockets/sockets.lo: /home/emz/src/php-5.5.1/ext/sockets/sockets.c $(LIBTOOL) --mode=compile $(CC) -Iext/sockets/ -I/home/emz/src/php- 5.5.1/ext/sockets/ $(COMMON_FLAGS) $(CFLAGS_SOCKETS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /home/emz/src/php-5.5.1/ext/sockets/sockets.c -o ext/sockets/sockets.lo ext/sockets/multicast.lo: /home/emz/src/php-5.5.1/ext/sockets/multicast.c $(LIBTOOL) --mode=compile $(CC) -Iext/sockets/ -I/home/emz/src/php- 5.5.1/ext/sockets/ $(COMMON_FLAGS) $(CFLAGS_SOCKETS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /home/emz/src/php-5.5.1/ext/sockets/multicast.c -o ext/sockets/multicast.lo ext/sockets/conversions.lo: /home/emz/src/php-5.5.1/ext/sockets/conversions.c $(LIBTOOL) --mode=compile $(CC) -Iext/sockets/ -I/home/emz/src/php- 5.5.1/ext/sockets/ $(COMMON_FLAGS) $(CFLAGS_SOCKETS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /home/emz/src/php-5.5.1/ext/sockets/conversions.c -o ext/sockets/conversions.lo ext/sockets/sockaddr_conv.lo: /home/emz/src/php- 5.5.1/ext/sockets/sockaddr_conv.c $(LIBTOOL) --mode=compile $(CC) -Iext/sockets/ -I/home/emz/src/php- 5.5.1/ext/sockets/ $(COMMON_FLAGS) $(CFLAGS_SOCKETS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /home/emz/src/php5.5.1/ext/sockets/sockaddr_conv.c -o ext/sockets/sockaddr_conv.lo ext/sockets/sendrecvmsg.lo: /home/emz/src/php-5.5.1/ext/sockets/sendrecvmsg.c $(LIBTOOL) --mode=compile $(CC) -Iext/sockets/ -I/home/emz/src/php- 5.5.1/ext/sockets/ $(COMMON_FLAGS) $(CFLAGS_SOCKETS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /home/emz/src/php-5.5.1/ext/sockets/sendrecvmsg.c -o ext/sockets/sendrecvmsg.lo With these alterations done, php can be built on Solaris (10 and 11) with -- enable sockets. Adding new flags globally doesn't help, it's even making it worse, because with these CFLAGS being declared globally the compilation process fails around ext/hash/hash_ripemd.c (at least). -- Edit bug report at https://bugs.php.net/bug.php?id=65427&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65427&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65427&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65427&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65427&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65427&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65427&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65427&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65427&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65427&r=support Expected behavior: https://bugs.php.net/fix.php?id=65427&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65427&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65427&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65427&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65427&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65427&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65427&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65427&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65427&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65427&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65427&r=mysqlcfg