Squid 3 build failure on MinGW

2009-05-31 Thread Serassio Guido

Hi,

I have a little of free time, and I'm trying to build Squid 3 on 
MinGW, but I'm getting the following error:


if /bin/sh ../../libtool --tag=CXX --mode=compile g++ 
-DHAVE_CONFIG_H  -I../.. -I../../include -I../../src 
-I../../include   -I/usr/include/libxml2  -Werror -Wall 
-Wpointer-arith -Wwrite-strings -Wcomments  -D_FILE_OFFSET_BITS=64 -g 
-O2 -mthreads -MT IntRange.lo -MD -MP -MF .deps/IntRange.Tpo -c -o 
IntRange.lo IntRange.cc; \
then mv -f .deps/IntRange.Tpo .deps/IntRange.Plo; else rm -f 
.deps/IntRange.Tpo; exit 1; fi
 g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../src 
-I../../include -I/usr/include/libxml2 -Werror -Wall -Wpointer-arith 
-Wwrite-strings -Wcomments -D_FILE_OFFSET_BITS=64 -g -O2 -mthreads 
-MT IntRange.lo -MD -MP -MF .deps/IntRange.Tpo -c 
IntRange.cc  -DDLL_EXPORT -DPIC -o .libs/IntRange.o
../../include/Range.h: In member function `RangeC 
RangeC::intersection(const RangeC) const [with C = int]':

IntRange.cc:92:   instantiated from here
../../include/Range.h:77: error: `max' was not declared in this scope
../../include/Range.h:77: error: `min' was not declared in this scope
../../include/Range.h:77: warning: unused variable 'max'
../../include/Range.h:77: warning: unused variable 'min'
make[3]: *** [IntRange.lo] Error 1
make[3]: Leaving directory `/c/work/mgw-3.nt/src/acl'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/work/mgw-3.nt/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/work/mgw-3.nt/src'
make: *** [all-recursive] Error 1

Someone could help me ?

Regards

Guido



-

Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1   10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135  Fax. : +39.011.9781115
Email: guido.seras...@acmeconsulting.it
WWW: http://www.acmeconsulting.it/



Re: Squid 3 build failure on MinGW

2009-05-31 Thread Amos Jeffries

Serassio Guido wrote:

Hi,

I have a little of free time, and I'm trying to build Squid 3 on MinGW, 
but I'm getting the following error:


if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H  
-I../.. -I../../include -I../../src -I../../include   
-I/usr/include/libxml2  -Werror -Wall -Wpointer-arith -Wwrite-strings 
-Wcomments  -D_FILE_OFFSET_BITS=64 -g -O2 -mthreads -MT IntRange.lo -MD 
-MP -MF .deps/IntRange.Tpo -c -o IntRange.lo IntRange.cc; \
then mv -f .deps/IntRange.Tpo .deps/IntRange.Plo; else rm -f 
.deps/IntRange.Tpo; exit 1; fi
 g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../src -I../../include 
-I/usr/include/libxml2 -Werror -Wall -Wpointer-arith -Wwrite-strings 
-Wcomments -D_FILE_OFFSET_BITS=64 -g -O2 -mthreads -MT IntRange.lo -MD 
-MP -MF .deps/IntRange.Tpo -c IntRange.cc  -DDLL_EXPORT -DPIC -o 
.libs/IntRange.o
../../include/Range.h: In member function `RangeC 
RangeC::intersection(const RangeC) const [with C = int]':

IntRange.cc:92:   instantiated from here
../../include/Range.h:77: error: `max' was not declared in this scope
../../include/Range.h:77: error: `min' was not declared in this scope
../../include/Range.h:77: warning: unused variable 'max'
../../include/Range.h:77: warning: unused variable 'min'
make[3]: *** [IntRange.lo] Error 1
make[3]: Leaving directory `/c/work/mgw-3.nt/src/acl'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/work/mgw-3.nt/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/work/mgw-3.nt/src'
make: *** [all-recursive] Error 1

Someone could help me ?

Regards

Guido



They are declared in the compat/* library. Included through config.h.

compat/compat_shared.h to be exact if you need the definition (but 
please only include config.h for the compat stuff).


Amos
--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE15
  Current Beta Squid 3.1.0.8 or 3.0.STABLE16-RC1


Re: Squid 3 build failure on MinGW

2009-05-31 Thread Amos Jeffries

Serassio Guido wrote:

Hi Amos,

At 11.45 31/05/2009, Amos Jeffries wrote:


 Someone could help me ?

 Regards

 Guido


They are declared in the compat/* library. Included through config.h.

compat/compat_shared.h to be exact if you need the definition (but
please only include config.h for the compat stuff).


Already seen that, and config.h is included 

But there is something wrong in the definition of min() and max(), the 
build of every file in src including Range.h is failing 


Regards

Guido



I've seen this occur under 2 cases. One was when a .h in the core 
section failed to include config.h outside its wrapping protection. A 
circular include developed and broke things.


And when the namespace for something was screwed up.  It wouldn't be 
needing that nasty using namespace Squid; hack would it?


Amos
--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE15
  Current Beta Squid 3.1.0.8 or 3.0.STABLE16-RC1