php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21667 Compilation error in sapi_module_struct
Submitted: 2003-01-15 11:42 UTC Modified: 2003-01-16 09:48 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: php-bugs at i dot org dot ua Assigned: sas (profile)
Status: Closed Package: Compile Failure
PHP Version: 4CVS-2003-01-15 (stable) OS: Solaris8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php-bugs at i dot org dot ua
New email:
PHP Version: OS:

 

 [2003-01-15 11:42 UTC] php-bugs at i dot org dot ua
I have got error in compilation:

Environment is:
PHP Version (Updated at 2003/01/15 18:20 GMT+2)
>cat CVS/Tag
TPHP_4_3

Compillator: Sun WorkShop 6 update 2 C 5.3 2001/05/15

Error if independed of configure string.

Error in compilation of Apache2Filer is:

/bin/bash libtool --silent --mode=compile /opt/SUNWspro/bin/cc -Xa -xF -xCC  -Isapi/apache2filter/ -I/usr/local/src/work/php4/sapi/apache2filter/ -DPHP_ATOM_INC -I/usr/local/src/work/php4/include -I/usr/local/src/work/php4/main -I/usr/local/src/work/php4 -I/usr/local/include/apache2 -I/usr/local/src/work/php4/Zend -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/mysql -I/usr/local/src/work/php4/ext/xml/expat  -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DAPACHE_XLATE -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -I/usr/local/src/work/php4/TSRM  -xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -xildoff -dalign -D_REENTRANT -xspace -mr -mt -DZTS  -prefer-pic -c /usr/local/src/work/php4/sapi/apache2filter/sapi_apache2.c -o sapi/apache2filter/sapi_apache2.lo
"/usr/local/src/work/php4/sapi/apache2filter/sapi_apache2.c", line 318: too many struct/union initializers
"/usr/local/src/work/php4/sapi/apache2filter/sapi_apache2.c", line 319: too many struct/union initializers
cc: acomp failed for /usr/local/src/work/php4/sapi/apache2filter/sapi_apache2.c
*** Error code 1


Same error for CLI version:

/bin/bash libtool --silent --mode=compile /opt/SUNWspro/bin/cc -Xa -xF -xCC  -Isapi/cli/ -I/usr/local/src/work/php4/sapi/cli/ -DPHP_ATOM_INC -I/usr/local/src/work/php4/include -I/usr/local/src/work/php4/main -I/usr/local/src/work/php4 -I/usr/local/include/apache2 -I/usr/local/src/work/php4/Zend -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/mysql -I/usr/local/src/work/php4/ext/xml/expat  -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DAPACHE_XLATE -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -I/usr/local/src/work/php4/TSRM  -xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -xildoff -dalign -D_REENTRANT -xspace -mr -mt -DZTS  -prefer-pic -c /usr/local/src/work/php4/sapi/cli/php_cli.c -o sapi/cli/php_cli.lo
"/usr/local/src/work/php4/sapi/cli/php_cli.c", line 284: too many struct/union initializers
cc: acomp failed for /usr/local/src/work/php4/sapi/cli/php_cli.c
*** Error code 1
make: Fatal error: Command failed for target `sapi/cli/php_cli.lo'


Reason: Wrong count of 'NULL' in sapi_module_struct, defined in modules (sapi/apache2filter/sapi_apache2.c and sapi/cli/php_cli.c) and STANDARD_SAPI_MODULE_PROPERTIES definition (defined in main/SAPI.h).

Sollution:
>cvs diff "sapi/apache2filter/sapi_apache2.c" sapi/cli/php_cli.c
Index: sapi/apache2filter/sapi_apache2.c
===================================================================
RCS file: /repository/php4/sapi/apache2filter/sapi_apache2.c,v
retrieving revision 1.91.2.4
diff -u -r1.91.2.4 sapi_apache2.c
--- sapi/apache2filter/sapi_apache2.c   7 Jan 2003 15:23:45 -0000       1.91.2.4
+++ sapi/apache2filter/sapi_apache2.c   15 Jan 2003 17:38:10 -0000
@@ -312,8 +312,8 @@

     NULL,                                                                      /* php_ini_path_override */

-       NULL,                                                                   /* Block interruptions */
-       NULL,                                                                   /* Unblock interruptions */
+       // NULL,                                                                        /* Block interruptions */+       // NULL,                                                                        /* Unblock interruptions */

        STANDARD_SAPI_MODULE_PROPERTIES
 };
Index: sapi/cli/php_cli.c
===================================================================
RCS file: /repository/php4/sapi/cli/php_cli.c,v
retrieving revision 1.51.2.6
diff -u -r1.51.2.6 php_cli.c
--- sapi/cli/php_cli.c  8 Jan 2003 00:44:58 -0000       1.51.2.6
+++ sapi/cli/php_cli.c  15 Jan 2003 17:38:10 -0000
@@ -277,8 +277,8 @@
        sapi_cli_register_variables,    /* register server variables */
        sapi_cli_log_message,                   /* Log message */

-       NULL,                                                   /* Block interruptions */
-       NULL,                                                   /* Unblock interruptions */
+       // NULL,                                                        /* Block interruptions */
+       // NULL,                                                        /* Unblock interruptions */

        STANDARD_SAPI_MODULE_PROPERTIES
 };


WBR,
Alex

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-15 11:50 UTC] derick@php.net
Did you use an updated CVS tree or an fresh one? If the first, then please run ./cvsclean && ./buildconf or checkout a fresh tree.

Derick
 [2003-01-15 12:31 UTC] php-bugs at i dot org dot ua
CVS tree is up
./buildconf execute cvsclean on my system.

Manual calculation:
Structure _sapi_module_struct in main/SAPI.h (from http://cvs.php.net/co.php/php4/main/SAPI.h?r=1.87.2.3) has 27 items.
Definition STANDARD_SAPI_MODULE_PROPERTIES in main/SAPI.h has 8 items.

Stricture apache2_sapi_module in sapi/apache2filter/sapi_apache2.c ( http://cvs.php.net/co.php/php4/sapi/apache2filter/sapi_apache2.c?r=1.91.2.4) has 21 items + STANDARD_SAPI_MODULE_PROPERTIES.

21 + 8 = 29 and not eq 27...

http://cvs.php.net/diff.php/php4/main/SAPI.h?r1=1.87.2.2&r2=1.87.2.3&ty=u
 [2003-01-15 14:09 UTC] sniper@php.net
Sascha broke it, he can propably fix it too..

 [2003-01-15 15:27 UTC] sniper@php.net
Please update your checkout now, this should be fixed now.

 [2003-01-16 09:23 UTC] php-bugs at i dot org dot ua
Compiled without error.

Thanks.
 [2003-01-16 09:48 UTC] derick@php.net
closing then...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Sep 10 22:01:27 2024 UTC