[squid-users] squid 3.3.3 build errors on solaris 10

From: Brett Lymn <brett.lymn_at_baesystems.com>
Date: Thu, 14 Mar 2013 13:21:39 +1030

I am trying to build squid 3.3.3 on solaris 10 using SunStudio 12.2 with

CPPFLAGS="-erroff=wvarhidemem,identexpected"

and this configure:

./configure --prefix=/opt/local/squid3 --enable-async-io --enable-storeio=ufs,aufs --enable-snmp --with-large-files --enable-auth-basic="none" --enable-auth-digest="none" --enable-auth-ntlm="none" --enable-external-acl-helpers="none" --enable-auth-negotiate="none"

The build breaks here:

CC -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/opt/local/squid3/etc/squid.conf\" -DDEFAULT_SQUID_DATA_DIR=\"/opt/local/squid3/share\" -DDEFAULT_SQUID_CONFIG_DIR=\"/opt/local/squid3/etc\" -I.. -I../include -I../lib -I../src -I../include -I/usr/include/gssapi -I/usr/include/kerberosv5 -I../libltdl -I../src -I../libltdl -I/usr/include/gssapi -I/usr/include/kerberosv5 -erroff=wvarhidemem,identexpected -I/usr/include/gssapi -I/usr/include/kerberosv5 -errwarn=%all,no%badargtype2w,no%wbadinit,no%wbadasg -errtags -D_REENTRANT -lpthread -m64 -g -c -o HttpHdrCc.o HttpHdrCc.cc
"/opt/solstudio12.2/prod/include/CC/Cstd/map", line 248: Error, multdecl: Multiple declaration for std::map<const StringArea, http_hdr_cc_type, std::less<const StringArea>, std::allocator<std::pair<const StringArea, http_hdr_cc_type>>>::insert(const std::pair<const StringArea, http_hdr_cc_type>&).
"HttpHdrCc.cc", line 75: Where, temwhilespec: While specializing "std::map<const StringArea, http_hdr_cc_type, std::less<const StringArea>, std::allocator<std::pair<const StringArea, http_hdr_cc_type>>>".
"HttpHdrCc.cc", line 75: Where, temspecend: Specialized in non-template code.
1 Error(s) detected.
*** Error code 2
make: Fatal error: Command failed for target `HttpHdrCc.o'

I did make the following changes to get over some other build errors
(the configure one stops the cc bleating about a deprecated option). I
don't know if whta I have done is correct (my c++ fu is weak) but it
moves the build along at least:

--- src/external_acl.cc.old Thu Mar 14 11:58:33 2013
+++ src/external_acl.cc Thu Mar 14 11:59:12 2013
@@ -613,7 +613,7 @@
 #endif
                 DUMP_EXT_ACL_TYPE(EXT_LOG);
                 DUMP_EXT_ACL_TYPE(TAG);
- DUMP_EXT_ACL_TYPE_FMT(PERCENT, " %%%%");
+ DUMP_EXT_ACL_TYPE_FMT(PERCENT, " %%%%", NULL);
             default:
                 fatal("unknown external_acl format error");
                 break;

--- src/ipc/Queue.h.old Thu Mar 14 11:50:56 2013
+++ src/ipc/Queue.h Thu Mar 14 11:51:19 2013
@@ -118,7 +118,7 @@
     const unsigned int theMaxItemSize; ///< maximum item size
     const int theCapacity; ///< maximum number of items, i.e. theBuffer
size
 
- char theBuffer[];
+ char *theBuffer;
 };
 
 /// shared array of OneToOneUniQueues

--- configure.old Thu Mar 14 12:16:48 2013
+++ configure Thu Mar 14 12:18:46 2013
@@ -21713,12 +21713,12 @@
 $as_echo "$as_me: Removing -Xa for gcc/g++ on $host" >&6;}
       CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`"
       CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Replacing
-xarch=generic64 with -m64 for gcc/g++ on $host" >&5
-$as_echo "$as_me: Replacing -xarch=generic64 with -m64 for gcc/g++ on
$host" >&6;}
- CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
- CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
- LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`"
     fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Replacing -xarch=generic64
with -m64 on $host" >&5
+$as_echo "$as_me: Replacing -xarch=generic64 with -m64 on $host" >&6;}
+ CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
+ CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-xarch=generic64/-m64/'`"
+ LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`"
     { $as_echo "$as_me:${as_lineno-$LINENO}: Removing -Usun on $host"
>&5
 $as_echo "$as_me: Removing -Usun on $host" >&6;}
     CFLAGS="`echo $CFLAGS | sed -e 's/-Usun//'`"

-- 
Brett Lymn
"Warning:
The information contained in this email and any attached files is
confidential to BAE Systems Australia. If you are not the intended
recipient, any use, disclosure or copying of this email or any
attachments is expressly prohibited.  If you have received this email
in error, please notify us immediately. VIRUS: Every care has been
taken to ensure this email and its attachments are virus free,
however, any loss or damage incurred in using this email is not the
sender's responsibility.  It is your responsibility to ensure virus
checks are completed before installing any data sent in this email to
your computer."
Received on Thu Mar 14 2013 - 02:51:53 MDT

This archive was generated by hypermail 2.2.0 : Thu Mar 14 2013 - 12:00:06 MDT