Re: Bug compiling 2.2.stable2 under sgi

From: Chris Tilbury <Chris.Tilbury@dont-contact.us>
Date: Thu, 29 Apr 1999 16:07:36 +0100

On Thu, Apr 29, 1999 at 04:15:21PM +0200, Rainer Klier wrote:

> Hi...
>
> tried to compile squid 2.2.stable2 under irix 6.5 with mips 7.2.1.2m
> an ran in the folling error:
>
> cc -g -I. -I../include -I../include -c delay_pools.c -o delay_pools.o
> "delay_pools.c", line 117: error(1138): expression must have
> pointer-to-object
> type
> return b - a;
> ^
>
> 1 error detected in the compilation of "delay_pools.c".
> make[1]: *** [delay_pools.o] Error 2
> make[1]: Leaving directory `/proxy/src/squid-2.2.STABLE2/src'
> make: *** [all] Error 1
>
> Any clues about this ?

It'll probably be the same problem afflicting other vendors compilers
-- the DEC UNIX and Sun Workshop compilers both can't compile this
function (delayIdPtrHashCmp).

The code is trying to do arithmetic on pointers to void. This works
under GNU C, because GNU C specifically defines sizeof(void) to be
1. sizeof(void) is undefined on these other compilers however and thus
this won't work.

If you can somehow convince your compilers to let you do this kind of
pointer arithmetic (via a command line option, probably), then you
might coax this into working. Otherwise, you'll need to use gcc/egcs
for now.

Cheers,

Chris

-- 
Chris Tilbury, UNIX Systems Administrator, IT Services, University of Warwick
EMAIL: cudch+s@csv.warwick.ac.uk PHONE: +44 1203 523365(V)/+44 1203 523267(F)
                            URL: http://www.warwick.ac.uk/staff/Chris.Tilbury
Received on Thu Apr 29 1999 - 09:18:54 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:46:01 MST