Re: dreaded php 4.0 compile problem


Subject: Re: dreaded php 4.0 compile problem
From: Michael A. Peters (Moonglue@141.com )
Date: Thu Aug 24 2000 - 23:59:52 MDT


>At 10:18 PM -0700 8/24/00, john.newsom@bsd405.com wrote:
>
>>I am trying to upgrade to php 4. (Lombard PB, plenty of RAM and HD
>>space, using
>
>
>
>>-I/home/root/php-4.0.1/ext/xml/expat/xmlparse
>> -DXML_BYTE_ORDER=21 -g -O2 -c main.c && touch main.lo
>> main.c: In function `php_error_cb`:
>> main.c:370: incompatible types in assignment
>> main.c:435: incompatible types in assignment
>> make[2]: *** [main.lo] Error 1
>
>This is a known bug -- check the php.net buglist.
>
>
>>Interestingly, the exact same problem was reported in a PHP mailing list, and
>>the poster was using linux-ppc. I searched the YDL archives, but found no
>>pointers.
>
>there's a fix for it on linuxppc.org (or maybe .com?) -- simple fix,
>and it works fine.

DON'T use the fix on LinuxPPC (unless they updated it). It allows the
source to build, but causes other probs.

Use this patch instead-

Cut the below and save it as a text file called php-4.01pl2-fix.patch.
Put it in the same directory where your php source is and-

cd php-4.0.1pl2
patch -p1 < ../php-4.01pl2-fix.patch

Your php-4.01pl2 source will build.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

diff -u -r php-4.0.1pl2/main/main.c php-4.0.1pl2.fixed/main/main.c
--- php-4.0.1pl2/main/main.c Mon Jun 26 10:11:28 2000
+++ php-4.0.1pl2.fixed/main/main.c Wed Aug 9 09:49:24 2000
@@ -367,9 +367,9 @@

                  /* get include file name */
                  if (PG(log_errors) || PG(display_errors) ||
(!module_initialized)) {
- args = orig_args;
- size = vsnprintf(buffer, sizeof(buffer) - 1,
format, args);
- va_end(args);
+// args = orig_args;
+ size = vsnprintf(buffer, sizeof(buffer) - 1,
format, orig_args);
+ va_end(orig_args);
                          buffer[sizeof(buffer) - 1] = 0;

                          if (!module_initialized || PG(log_errors)) {
@@ -432,9 +432,9 @@
          if (PG(track_errors)) {
                  pval *tmp;

- args = orig_args;
- size = vsnprintf(buffer, sizeof(buffer) - 1, format, args);
- va_end(args);
+// args = orig_args;
+ size = vsnprintf(buffer, sizeof(buffer) - 1, format,
orig_args);
+ va_end(orig_args);

                  buffer[sizeof(buffer) - 1] = 0;

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters-- http://24.5.29.77/Linux_Pages/
                                http://www.omnilinux.com/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  



This archive was generated by hypermail 2a24 : Fri Aug 25 2000 - 00:04:52 MDT