ID: 39192 User updated by: ormandj at corenode dot com Reported By: ormandj at corenode dot com -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Solaris 10 6/06 PHP Version: 5.1.6 New Comment:
Ok, to demonstrate, I have deleted my old build directory, then untarred/gzipped php 5.1.6. I installed Sun Java Webserver 7 into /sun/webserver7. nsapi.h exists in /sun/webserver7/include/. Now I have run: ./configure --prefix=/opt/php --with-nsapi=/sun/webserver7 --with-libxml-dir=/opt/libxml --with-mysql=/opt/mysql --with-mysqli=/opt/mysql/bin/mysql_config --enable-libgcc --with-zlib=/opt/zlib --enable-mbstring Shortly into the configure, it shows: checking for NSAPI support... /sun/webserver7 checking for NSAPI include files... Netscape-Enterprise 3.x style checking for /sun/webserver7/include/nsapi.h... (cached) yes Then, I run: "gmake". It errors: /bin/sh /root/php-5.1.6/libtool --silent --preserve-dup-deps --mode=compile gcc -IZend/ -I/root/php-5.1.6/Zend/ -DPHP_ATOM_INC -I/root/php-5.1.6/include -I/root/php-5.1.6/main -I/root/php-5.1.6 -I/opt/libxml/include/libxml2 -I/opt/zlib/include -I/root/php-5.1.6/ext/date/lib -I/root/php-5.1.6/ext/mbstring/oniguruma -I/root/php-5.1.6/ext/mbstring/libmbfl -I/root/php-5.1.6/ext/mbstring/libmbfl/mbfl -I/opt/mysql/include/mysql -I/root/php-5.1.6/TSRM -I/root/php-5.1.6/Zend -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -I/usr/include -g -O2 -DZTS -c /root/php-5.1.6/Zend/zend_execute.c -o Zend/zend_execute.lo /bin/sh /root/php-5.1.6/libtool --silent --preserve-dup-deps --mode=compile gcc -Isapi/nsapi/ -I/root/php-5.1.6/sapi/nsapi/ -DPHP_ATOM_INC -I/root/php-5.1.6/include -I/root/php-5.1.6/main -I/root/php-5.1.6 -I/opt/libxml/include/libxml2 -I/opt/zlib/include -I/root/php-5.1.6/ext/date/lib -I/root/php-5.1.6/ext/mbstring/oniguruma -I/root/php-5.1.6/ext/mbstring/libmbfl -I/root/php-5.1.6/ext/mbstring/libmbfl/mbfl -I/opt/mysql/include/mysql -I/root/php-5.1.6/TSRM -I/root/php-5.1.6/Zend -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -I/usr/include -g -O2 -DZTS -c /root/php-5.1.6/sapi/nsapi/nsapi.c -o sapi/nsapi/nsapi.lo /root/php-5.1.6/sapi/nsapi/nsapi.c:62:19: nsapi.h: No such file or directory /root/php-5.1.6/sapi/nsapi/nsapi.c:63:25: base/pblock.h: No such file or directory /root/php-5.1.6/sapi/nsapi/nsapi.c:64:26: base/session.h: No such file or directory /root/php-5.1.6/sapi/nsapi/nsapi.c:65:23: frame/req.h: No such file or directory /root/php-5.1.6/sapi/nsapi/nsapi.c:66:59: frame/protocol.h: No such file or directory /root/php-5.1.6/sapi/nsapi/nsapi.c:67:55: base/util.h: No such file or directory /root/php-5.1.6/sapi/nsapi/nsapi.c:68:45: frame/log.h: No such file or directory /root/php-5.1.6/sapi/nsapi/nsapi.c:89: error: syntax error before "pblock" /root/php-5.1.6/sapi/nsapi/nsapi.c:89: warning: no semicolon at end of struct or union /root/php-5.1.6/sapi/nsapi/nsapi.c:90: warning: data definition has no type or storage class /root/php-5.1.6/sapi/nsapi/nsapi.c:91: error: syntax error before '*' token /root/php-5.1.6/sapi/nsapi/nsapi.c:91: warning: data definition has no type or storage class /root/php-5.1.6/sapi/nsapi/nsapi.c:96: error: syntax error before '}' token /root/php-5.1.6/sapi/nsapi/nsapi.c:96: warning: data definition has no type or storage class /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `nsapi_strdup': /root/php-5.1.6/sapi/nsapi/nsapi.c:138: warning: return makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c: At top level: /root/php-5.1.6/sapi/nsapi/nsapi.c:214: error: syntax error before '*' token /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `zif_nsapi_virtual': /root/php-5.1.6/sapi/nsapi/nsapi.c:335: error: `Request' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:335: error: (Each undeclared identifier is reported only once /root/php-5.1.6/sapi/nsapi/nsapi.c:335: error: for each function it appears in.) /root/php-5.1.6/sapi/nsapi/nsapi.c:336: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:336: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:355: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:361: error: request for member `headers' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:362: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:363: error: request for member `headers' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:370: error: `REQ_PROCEED' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:385: error: `REQ_RESTART' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:387: error: request for member `status_num' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:388: error: request for member `status_num' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `zif_nsapi_request_headers': /root/php-5.1.6/sapi/nsapi/nsapi.c:406: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:406: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:413: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:414: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:414: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:414: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:416: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `zif_nsapi_response_headers': /root/php-5.1.6/sapi/nsapi/nsapi.c:428: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:428: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:437: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:437: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:437: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:438: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_ub_write': /root/php-5.1.6/sapi/nsapi/nsapi.c:452: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:454: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:456: error: `IO_ERROR' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:456: error: `IO_EOF' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_header_handler': /root/php-5.1.6/sapi/nsapi/nsapi.c:465: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:465: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_send_headers': /root/php-5.1.6/sapi/nsapi/nsapi.c:499: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:499: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:512: error: `REQ_PROCEED' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:512: error: `REQ_NOACTION' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_read_post': /root/php-5.1.6/sapi/nsapi/nsapi.c:521: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:521: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:525: error: `netbuf' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:525: error: `nbuf' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:562: error: `IO_ERROR' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:562: error: `IO_EOF' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_read_cookies': /root/php-5.1.6/sapi/nsapi/nsapi.c:580: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:580: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:582: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_register_server_variables': /root/php-5.1.6/sapi/nsapi/nsapi.c:588: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:588: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:596: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:605: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:606: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:606: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:607: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:610: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:620: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:622: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:627: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:634: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:640: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:645: error: invalid type argument of `->' /root/php-5.1.6/sapi/nsapi/nsapi.c:647: error: invalid type argument of `->' /root/php-5.1.6/sapi/nsapi/nsapi.c:649: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:653: warning: passing arg 2 of `php_register_variable' makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:654: error: `security_active' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:658: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:666: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `nsapi_log_message': /root/php-5.1.6/sapi/nsapi/nsapi.c:706: error: `rc' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:706: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:708: error: `LOG_INFORM' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `sapi_nsapi_get_request_time': /root/php-5.1.6/sapi/nsapi/nsapi.c:713: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `nsapi_php_ini_entries': /root/php-5.1.6/sapi/nsapi/nsapi.c:764: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:765: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:770: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:775: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:775: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:776: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:776: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: `LOG_WARN' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:778: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c:781: error: dereferencing pointer to incomplete type /root/php-5.1.6/sapi/nsapi/nsapi.c: At top level: /root/php-5.1.6/sapi/nsapi/nsapi.c:786: error: syntax error before "php5_close" /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `php5_close': /root/php-5.1.6/sapi/nsapi/nsapi.c:805: error: `LOG_INFORM' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c: At top level: /root/php-5.1.6/sapi/nsapi/nsapi.c:819: error: syntax error before "php5_init" /root/php-5.1.6/sapi/nsapi/nsapi.c:819: error: syntax error before '*' token /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `php5_init': /root/php-5.1.6/sapi/nsapi/nsapi.c:837: error: `pb' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:837: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:855: error: `LOG_INFORM' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:856: error: `REQ_PROCEED' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c: At top level: /root/php-5.1.6/sapi/nsapi/nsapi.c:874: error: syntax error before "php5_execute" /root/php-5.1.6/sapi/nsapi/nsapi.c:874: error: syntax error before '*' token /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `php5_execute': /root/php-5.1.6/sapi/nsapi/nsapi.c:877: error: `request_context' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:882: error: request for member `reqpb' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:882: warning: initialization makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:883: error: request for member `reqpb' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:883: warning: initialization makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:884: error: request for member `reqpb' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:884: warning: initialization makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:885: error: request for member `headers' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:885: warning: initialization makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:886: error: request for member `headers' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:886: warning: initialization makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:887: error: `pb' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:887: warning: initialization makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:892: warning: initialization makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:898: error: request for member `vars' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:898: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:899: error: request for member `vars' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:899: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:903: error: `LOG_WARN' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:904: error: `REQ_NOACTION' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:908: error: request for member `reqpb' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:908: warning: assignment makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:920: error: `REQ_ABORTED' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c:924: error: syntax error before ')' token /root/php-5.1.6/sapi/nsapi/nsapi.c:930: error: request for member `status_num' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:940: error: request for member `status_num' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:944: error: request for member `headers' in something not a structure or union /root/php-5.1.6/sapi/nsapi/nsapi.c:944: warning: passing arg 1 of `php_handle_auth_data' makes pointer from integer without a cast /root/php-5.1.6/sapi/nsapi/nsapi.c:955: error: `REQ_PROCEED' undeclared (first use in this function) /root/php-5.1.6/sapi/nsapi/nsapi.c: At top level: /root/php-5.1.6/sapi/nsapi/nsapi.c:1005: error: syntax error before "php5_auth_trans" /root/php-5.1.6/sapi/nsapi/nsapi.c:1005: error: syntax error before '*' token /root/php-5.1.6/sapi/nsapi/nsapi.c: In function `php5_auth_trans': /root/php-5.1.6/sapi/nsapi/nsapi.c:1011: error: `REQ_PROCEED' undeclared (first use in this function) gmake: *** [sapi/nsapi/nsapi.lo] Error 1 # If I make the change I said earlier, it adds the "-I/sun/webserver7/include" to the compile of nsapi.c, which then completes successfully. Previous Comments: ------------------------------------------------------------------------ [2006-10-19 19:48:44] [EMAIL PROTECTED] >This is happening because PHP is looking for this header >file in [server_root]/plugins/include/, but in Web Server >7 that directory has been moved to [server_root]/include/. Wrong, PHP looks for nsapi.h in [server_root]/include/ since 2000 (at the very least). And if it fails, then it looks for [server_root]/plugins/include/. And if this directory doesn't exist, then ./configure bails out with a nice error message. That's why I don't understand how you succeeded to ./configure it in the first place. ------------------------------------------------------------------------ [2006-10-19 19:38:50] ormandj at corenode dot com http://blogs.sun.com/dzm Look at the June 10 entry. It's the same issue experienced by somebody else. David ------------------------------------------------------------------------ [2006-10-19 17:42:37] ormandj at corenode dot com If you are interested, I will setup a Solaris zone for you with everything you need to attempt to build php, so you can further diagnose this error. If you would be willing, please respond here or contact me via email. I will provide you the login information. Thanks, David ------------------------------------------------------------------------ [2006-10-19 14:54:58] [EMAIL PROTECTED] Look into sapi/nsapi/config.m4, this is the file you need to edit (and run ./buildconf --force after that). I fail to see how -I/sun/webserver7/include may be missing, but I don't have a SJSWS to try it. ------------------------------------------------------------------------ [2006-10-19 01:42:41] ormandj at corenode dot com Description: ------------ When I first ran: ./configure --prefix=/opt/php --with-nsapi=/sun/webserver7 --with-libxml-dir=/opt/libxml --with-mysql=/opt/mysql --with-mysqli=/opt/mysql/bin/mysql_config --enable-libgcc It ran with no errors. I then attempted to "gmake" and got an error that nsapi.h was not found when compiling nsapi.c. # ls /sun/webserver7/include/nsapi.h /sun/webserver7/include/nsapi.h # I had to edit "configure" and change this line (this is not the correct fix I think, I just did it as a quick fix because I don't know how configure scripts work): *) ac_srcdir="$abs_srcdir/sapi/nsapi/"; ac_bdir="sapi/nsapi/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; To: *) ac_srcdir="$abs_srcdir/sapi/nsapi/"; ac_bdir="sapi/nsapi/"; ac_inc="-I$ac_bdir -I$ac_srcdir -I$NSAPI_INCLUDE" ;; Then, ran configure as so: ./configure --prefix=/opt/php --with-nsapi=/sun/webserver7 --with-libxml-dir=/opt/libxml --with-mysql=/opt/mysql --with-mysqli=/opt/mysql/bin/mysql_config --enable-libgcc At this point, it compiled fine, and is now running fine. In other words, something is wrong with configure and this webserver. If more output is needed it can be provided. :) Thanks, David ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39192&edit=1