[ANSWER] Ghostscript 4.01

From: Laurent Duperval (laurent@grafnetix.com)
Date: Wed Aug 07 1996 - 09:24:46 CDT


Hi,

> Has anyone managed to compile and succesfully run GC 4.01 on a Solaris
> 2.4 machine?
>
> I'm thinking I'll have to rvert back to 3.53. This is the output when
> I start the program.

I've solved the problem, thanks to "Don". Turns out there's a compiler bug
in gcc 2.7.x which prevents it from compiling gs4.01 properly. I wonder if
that doesn't explain some other bugs I've found in other programs... Hmmmm.
My thanks also to

Tim Evans
Todd C. Miller

for their input. For completeness's (sp?) sake, here is what the readme for
gs4.01 says:

gcc (all platforms):
    There is an optimizer bug in gcc 2.7.0, 2.7.1, and 2.7.2 that causes
these versions of gcc to generate incorrect code. You can work around this
by adding the switch
        -Dconst=
to the compilation switches (CFLAGS). Alternatively, you can rebuild gcc
with the following patch:

*** clean-ss-951203/expr.c Sun Nov 26 08:18:07 1995
--- ss-951203/expr.c Mon Dec 4 11:41:18 1995
*************** expand_expr (exp, target, tmode, modifie
*** 4582,4587 ****
       through a pointer to const does not mean that the value there can
       never change. Languages where it can never change should
       also set TREE_STATIC. */
! RTX_UNCHANGING_P (temp) = TREE_READONLY (exp) | TREE_STATIC (exp);
    return temp;
        }
--- 4582,4588 ----
       through a pointer to const does not mean that the value there can
       never change. Languages where it can never change should
       also set TREE_STATIC. */
! RTX_UNCHANGING_P (temp) = TREE_READONLY (exp) & TREE_STATIC (exp);
    return temp;
        }

If possible, compile with gcc 2.5.8 or 2.6.3, which don't have this bug.

-- 
Laurent Duperval, Systems Analyst       Grafnetix Systems Inc.
Tel: (514) 861-3389                     777, de la Commune Ouest
Fax: (514) 866-6206                     Suite 101, Montreal, Qc
Laurent@Grafnetix.COM                   Canada, H3C 1Y1
URL: http://www.Grafnetix.COM/~laurent



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:06 CDT