Re: [squid-users] Error making squid-3.1.0.7-20090412 on Mac OS X 10.4

2009-04-12 Thread Amos Jeffries

Thank you for the report.

Beta release code problems only to squid-dev@squid-cache.org or bugzilla 
in future please. CC'd squid-dev for now.



vollkom...@gmx.net wrote:

I'm running into the following error(s) making squid-3.1.0.7-20090412 on Mac OS 
X 10.4.11 with gcc 4.0.1. Is there any workaround for that?

...
mkdir .libs
 g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../.. -I../../include 
-I../../src -I../../include -I/usr/include/libxml2 -Werror -Wall 
-Wpointer-arith -Wwrite-strings -Wcomments -D_REENTRANT -g -O2 -MT AsyncJob.lo 
-MD -MP -MF .deps/AsyncJob.Tpo -c AsyncJob.cc  -fno-common -DPIC -o 
.libs/AsyncJob.o
 g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../.. -I../../include -I../../src 
-I../../include -I/usr/include/libxml2 -Werror -Wall -Wpointer-arith -Wwrite-strings 
-Wcomments -D_REENTRANT -g -O2 -MT AsyncJob.lo -MD -MP -MF .deps/AsyncJob.Tpo -c 
AsyncJob.cc -o AsyncJob.o /dev/null 21
/bin/sh ../../libtool --tag=CXX --mode=link g++ -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  -D_REENTRANT -g -O2  -g -o libbase.la   AsyncJob.lo  
ar cru .libs/libbase.a .libs/AsyncJob.o

ranlib .libs/libbase.a
creating libbase.la
(cd .libs  rm -f libbase.la  ln -s ../libbase.la libbase.la)
Making all in acl
if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. 
-I../../include -I../.. -I../../include -I../../src -I../../include   
-I/usr/include/libxml2  -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  
-D_REENTRANT -g -O2 -MT Acl.lo -MD -MP -MF .deps/Acl.Tpo -c -o Acl.lo Acl.cc; 
\
then mv -f .deps/Acl.Tpo .deps/Acl.Plo; else rm -f .deps/Acl.Tpo; exit 1; 
fi
mkdir .libs
 g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../.. -I../../include 
-I../../src -I../../include -I/usr/include/libxml2 -Werror -Wall 
-Wpointer-arith -Wwrite-strings -Wcomments -D_REENTRANT -g -O2 -MT Acl.lo -MD 
-MP -MF .deps/Acl.Tpo -c Acl.cc  -fno-common -DPIC -o .libs/Acl.o
../../include/fatal.h:7: error: expected initializer before 'PRINTF_FORMAT_ARG1'
../../include/SquidNew.h: In function 'void* operator new(size_t)':
/usr/include/c++/4.0.0/new:84: error: previous declaration of 'void* operator 
new(size_t)' with 'C++' linkage
../../include/SquidNew.h:46: error: conflicts with new declaration with 'C' 
linkage
../../include/SquidNew.h: In function 'void operator delete(void*)':
/usr/include/c++/4.0.0/new:86: error: previous declaration of 'void operator 
delete(void*)' with 'C++' linkage
../../include/SquidNew.h:50: error: conflicts with new declaration with 'C' 
linkage
../../include/SquidNew.h: In function 'void* operator new [](size_t)':
/usr/include/c++/4.0.0/new:85: error: previous declaration of 'void* operator 
new [](size_t)' with 'C++' linkage
../../include/SquidNew.h:54: error: conflicts with new declaration with 'C' 
linkag
.
(snipped)


More likely to be a patch to fix this type of problem.

Something appears to be causing all the Squid C++ code to be either 
built or symbolized as C.


Can you resend just to squid-dev with the full trace please?


.
/usr/include/c++/4.0.0/iomanip:251: error: template with C linkage
/usr/include/c++/4.0.0/iomanip:259: error: template with C linkage
../../include/Stack.h:45: error: template with C linkage
../../include/splay.h:15: error: template with C linkage
../../include/splay.h:40: error: template with C linkage
../../include/splay.h:47: error: template with C linkage
../../include/splay.h:51: error: template with C linkage
../../include/splay.h:55: error: template with C linkage
../../include/splay.h:67: error: template with C linkage
../../src/ip/IpAddress.h: In function 'std::ostream operator(std::ostream, 
const IpAddress)':
../../src/ip/IpAddress.h:416: error: declaration of C function 'std::ostream 
operator(std::ostream, const IpAddress)' conflicts with
../../src/Debug.h:111: error: previous declaration 'std::ostream 
operator(std::ostream, uint8_t)' here
../../include/RefCount.h: At global scope:
../../include/RefCount.h:43: error: template with C linkage
../../include/RefCount.h:143: error: template with C linkage
../../include/Range.h:44: error: template with C linkage
../../include/Range.h:57: error: template with C linkage
../../src/Packer.h:65: error: expected initializer before 'PRINTF_FORMAT_ARG2'
../../src/SquidString.h:181: error: declaration of C function 'std::ostream 
operator(std::ostream, const String)' conflicts with
../../src/ip/IpAddress.h:416: error: previous declaration 'std::ostream 
operator(std::ostream, const IpAddress)' here
../../src/structs.h:112: error: 'regex_t' does not name a type
../../src/structs.h:1073: error: 'regex_t' does not name a type
../../src/protos.h:104: error: expected initializer before 'PRINTF_FORMAT_ARG1'
../../src/protos.h:116: error: template with C linkage
../../src/protos.h:271: error: expected initializer before 'PRINTF_FORMAT_ARG3'
../../src/protos.h:562: error: expected initializer before 'PRINTF_FORMAT_ARG1'
../../src/protos.h:711: error: expected initializer

Re: [squid-users] Error making squid-3.1.0.7-20090412 on Mac OS X 10.4

2009-04-12 Thread Amos Jeffries

vollkom...@gmx.net wrote:

Please find the full make output below:


snip

 g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../.. -I../../include 
-I../../src -I../../include -I/usr/include/libxml2 -Werror -Wall 
-Wpointer-arith -Wwrite-strings -Wcomments -g -O2 -MT AsyncJob.lo -MD -MP -MF 
.deps/AsyncJob.Tpo -c AsyncJob.cc  -fno-common -DPIC -o .libs/AsyncJob.o
 g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../.. -I../../include -I../../src 
-I../../include -I/usr/include/libxml2 -Werror -Wall -Wpointer-arith -Wwrite-strings 
-Wcomments -g -O2 -MT AsyncJob.lo -MD -MP -MF .deps/AsyncJob.Tpo -c AsyncJob.cc -o 
AsyncJob.o /dev/null 21
/bin/sh ../../libtool --tag=CXX --mode=link g++ -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  -g -O2  -g -o libbase.la   AsyncJob.lo  
ar cru .libs/libbase.a .libs/AsyncJob.o

ranlib .libs/libbase.a
creating libbase.la
(cd .libs  rm -f libbase.la  ln -s ../libbase.la libbase.la)
Making all in acl
if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. 
-I../../include -I../.. -I../../include -I../../src -I../../include   
-I/usr/include/libxml2  -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments  -g -O2 
-MT Acl.lo -MD -MP -MF .deps/Acl.Tpo -c -o Acl.lo Acl.cc; \
then mv -f .deps/Acl.Tpo .deps/Acl.Plo; else rm -f .deps/Acl.Tpo; exit 1; 
fi
mkdir .libs
 g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../.. -I../../include 
-I../../src -I../../include -I/usr/include/libxml2 -Werror -Wall 
-Wpointer-arith -Wwrite-strings -Wcomments -g -O2 -MT Acl.lo -MD -MP -MF 
.deps/Acl.Tpo -c Acl.cc  -fno-common -DPIC -o .libs/Acl.o
../../include/fatal.h:7: error: expected initializer before 'PRINTF_FORMAT_ARG1'


After some discussion on IRC we have come to the conclusion the cause is 
probably your compiler not defining  __GNUC__ like we are expecting.


Are you able to test and confirm or deny that?
(attached patch -p0 temporarily forces the define)

If possible are you able to track down what alternative definition is 
actually being made instead of __GNU__? so we can make this a permanent 
build-time fix.


Thanks

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE14
  Current Beta Squid 3.1.0.7
=== modified file 'include/config.h'
--- include/config.h	2009-03-03 02:52:23 +
+++ include/config.h	2009-04-13 04:00:08 +
@@ -241,7 +241,7 @@
  * the compile fail, so we must disable the check on native Windows.
  */
 
-#if __GNUC__  !defined(_SQUID_MSWIN_)
+#if 1 // __GNUC__  !defined(_SQUID_MSWIN_)
 #define PRINTF_FORMAT_ARG1 __attribute__ ((format (printf, 1, 2)))
 #define PRINTF_FORMAT_ARG2 __attribute__ ((format (printf, 2, 3)))
 #define PRINTF_FORMAT_ARG3 __attribute__ ((format (printf, 3, 4)))



Re: [squid-users] Error making squid-3.1.0.7-20090412 on Mac OS X 10.4

2009-04-12 Thread Amos Jeffries

vollkom...@gmx.net wrote:

Thanks for taking a look at it. Make still errs out, after applying the patch 
(patch -p0  macosx_printf_test.patch). Please find the new output in the attachment.



Hmm, I have a small suspicion... what happens if you change the top of 
src/acl/Acl.cc


from:
  #include config.h

to:
  #include squid.h

or to:
  #include include/config.h

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE14
  Current Beta Squid 3.1.0.7