Re: [squid-users] Build issues with squid 3.1 and 3.2

From: <gewehre_at_gmx.net>
Date: Fri, 26 Aug 2011 04:20:42 +0200

> Um, I suspect you got the nightly build of 3.2 instead of 3.1. All the
> warnings etc match up with 3.2 code better than 3.1
>
>
> Strange Bungled warning. "Default Configuration" is the hard-coded
> default values loaded before any files. Can you check if
> src/cf_parser.cci in the build directory contains a default definition
> for the "all" ACL?
>
> And please make sure this is still a problem when you do a fresh clean
> set of sources.
>
>

I can't imagine how I could've confused the two, given 3.2 takes rather different ./configure options. Since squid-3.1.14-20110825 is not complaining, all is good now on this front.

> > With recent 3.2 nightlies, I encounter another issue that I can get
> around by explicitly specifying "--disable-auth-negotiate":
> > ...
> > cc1plus: warnings being treated as errors
> > negotiate_wrapper.cc: In function 'int main(int, char* const*)':
> > negotiate_wrapper.cc:113: warning: 'length' may be used uninitialized in
> this function
> > make[3]: *** [negotiate_wrapper.o] Error 1
> > make[2]: *** [all-recursive] Error 1
> > make[1]: *** [all-recursive] Error 1
> > make: *** [all-recursive] Error 1
> >
>
> Thank you. Appears to be a false positive by the compiler. But looking
> into it found some weird code and an unused variable. Removing that
> fixes some potential confusion for the compiler.
> If you want to try it, the patch will be here once the mirrors pick it up:
>
> http://www.squid-cache.org/Versions/v3/3.HEAD/changesets/squid-3-11668.patch
>

Thanks. This patch does appear to resolve the above issue with --enable-auth-negotiate explicitly set during ./configure.

> >
> > I'm then confronted with the old nemesis:
> > ...
> > cc1plus: warnings being treated as errors
> > Address.cc: In member function 'bool Ip::Address::IsSlaac() const':
> > Address.cc:279: warning: comparison is always false due to limited range
> of data type
> > Address.cc:280: warning: comparison is always false due to limited range
> of data type
> >
> > Some googling seems to suggest this is rather common with certain UNIX
> source codes and OS X (x86 little endian hardware).
>
> Strange. The comparison is constant and performed in network-order octet
> bitmaps. There should be no range conversions involved. Erasing possible
> endian problems is precisely why the htons() was used.
>
> Could you please test with replacing the "htons" on those lines with
> "static_cast<uint8_t>".
>
>
> PS. What compiler is reporting these?
>
> Amos

Changing "htons" to "static_cast<uint8_t>" got it past Address.cc. Then it stopped at:

libtool: compile: g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../lib -I../../src -I../../include -I/usr/include -I/usr/include -I../../libltdl -I/usr/include -I/usr/include -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -g -O2 -c Config.cc -fno-common -DPIC -o .libs/Config.o
In file included from ../../src/protos.h:35,
                 from Config.cc:3:
../../src/Packer.h:46: error: 'va_list' has not been declared
../../src/Packer.h:59: error: expected constructor, destructor, or type conversion before 'void'
../../src/Packer.h:60: error: expected constructor, destructor, or type conversion before 'void'
../../src/Packer.h:61: error: expected constructor, destructor, or type conversion before 'void'
In file included from ../../src/protos.h:37,
                 from Config.cc:3:
../../src/ip/Address.h:187: error: 'u_short' does not name a type
../../src/ip/Address.h:195: error: 'u_short' does not name a type
../../src/ip/Address.h:367: error: field 'm_SocketAddr' has incomplete type
../../src/ip/Address.h:249: error: 'AF_UNSPEC' was not declared in this scope
../../src/ip/Address.h:280: error: 'AF_UNSPEC' was not declared in this scope
../../src/ip/Address.h:312: error: 'AF_UNSPEC' was not declared in this scope
../../src/ip/Address.h:386: error: expected initializer before '&' token
../../src/ip/Address.h: In constructor 'Ip::Address_list::Address_list()':
../../src/ip/Address.h:398: error: 'NULL' was not declared in this scope
../../src/ip/Address.h: In destructor 'Ip::Address_list::~Address_list()':
../../src/ip/Address.h:399: error: 'NULL' was not declared in this scope
In file included from Config.cc:3:
../../src/protos.h: At global scope:
../../src/protos.h:354: error: 'htcp_clr_reason' has not been declared
make[3]: *** [Config.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

The same issues persist with either of the two versions of gcc 4.x on my box, listed below:

gcc -v
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /var/tmp/gcc/gcc-5370~2/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --with-arch=nocona --with-tune=generic --program-prefix= --host=i686-apple-darwin8 --target=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5370)

gcc -v
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /Builds/gcc/gcc_42-5564/build/obj/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++,fortran --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-gxx-include-dir=/usr/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin8 --host=i686-apple-darwin8 --target=i686-apple-darwin8
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5564)

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
Received on Fri Aug 26 2011 - 02:20:51 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 26 2011 - 12:00:02 MDT