php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2224 main.c
Submitted: 1999-09-02 14:28 UTC Modified: 1999-10-04 17:06 UTC
From: tm at blom dot co dot id Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0 Beta 2 OS: HPUX 10.20
Private report: No CVE-ID: None
 [1999-09-02 14:28 UTC] tm at blom dot co dot id
        cc -Ae -Ae  -D_HPUX_SOURCE -g   -I. -I. -I./libzend -I./TSRM -I./libzend -I./TSRM -I/store/store/bise04/apache/src-1.3.9-hp700ux10//src/include -I/store/store/bise04/apache/src-1.3.9-hp700ux10//src/os/unix    -g   -c main.c -o main.o
cc: "main.c", line 230: error 1536: Cannot evaluate initialization expression, please initialize dynamically.
cc: "main.c", line 1098: warning 604: Pointers are not assignment-compatible.
cc: "main.c", line 1098: warning 563: Argument #1 is not the correct type.
cc: "main.c", line 1104: warning 604: Pointers are not assignment-compatible.
cc: "main.c", line 1104: warning 563: Argument #1 is not the correct type.
*** Error exit code 1

Stop.
--------------------------

Compiler docs says:
========
Error 1536
Cannot evaluate initialization expression, please initialize dynamically. The expression used for initializing a variable is too complex to be determined at link time.

Usually this is due to using an expression involving an address minus an address or an address plus an address. For example:
      int i = 0,j = 0;
      int a = (int) &i - (int) &j;
      main()
      {
      }

Initialize (assign) the variable dynamically. For example:
      int i = 0,j = 0;
      int a;
      main()
      {
         a = (int) &i - (int) &j;
      }
ANSI 3.4
==========

Looked at main.c and php_ini.h for a few minutes and 
decided that it's time to go home to bed.

Terje Marthinussen
tm@blom.co.id

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-18 19:15 UTC] andi at cvs dot php dot net
Please resubmit a bug report including the code snippet which causes the problem. main.c has been changed since your bug report and finding the offending line now is a problem.
 [1999-10-02 01:00 UTC] tm at blom dot co dot id
The problem is still at line 230:
STD_PHP_INI_BOOLEAN("track_vars",                       (PHP_TRACK_VARS?"1":"0"),                       PHP
_INI_ALL,               OnUpdateBool,                           track_vars,             php_core_globals,       cor
e_globals)

However, I've found what the HP ansic don't like as well.
(PHP_TRACK_VARS?"1":"0")

Rewrite to:
#if PHP_TRACK_VARS
        STD_PHP_INI_BOOLEAN("track_vars",                       "1",                    PHP_INI_ALL,            OnU
pdateBool,                              track_vars,             php_core_globals,       core_globals)
#else         

       STD_PHP_INI_BOOLEAN("track_vars",                        "0",                    PHP_INI_ALL,            OnU
pdateBool,                              track_vars,             php_core_globals,       core_globals) 
#endif

and it compiles

 [1999-10-04 17:06 UTC] sas at cvs dot php dot net
Fixed by Thies in CVS
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Oct 09 22:00:02 2026 UTC