Re: Compiling squid 3.2 with Sun CC

From: Jose-Marcio Martins da Cruz <Jose-Marcio.Martins_at_mines-paristech.fr>
Date: Fri, 16 Mar 2012 15:05:40 +0100

Well another step...

With the following patch, the compile process go much far... (without any CFLAGS predefined option)

P.S. - as before, I don't know the implications of this : up to you to accept or not or to create a
more elegant way to define bool.

**********************************************************
--- compat/os/solaris.h.org Fri Mar 16 14:49:42 2012
+++ compat/os/solaris.h Fri Mar 16 14:47:45 2012
@@ -94,6 +94,18 @@
  #define AF_LOCAL AF_UNIX
  #endif

+#if !HAVE_STDBOOL_H
+#undef bool
+#undef true
+#undef false
+
+#define bool int
+#define true 1
+#define false 0
+#define __bool_true_false_are_defined 1
+
+#endif /* HAVE_STDBOOL_H */
+
  /* Solaris lacks paths.h by default */
  #if HAVE_PATHS_H
  #include <paths.h>
***************************************************************

And the compile process stops at :

source='AsyncCall.cc' object='AsyncCall.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../../cfgaux/depcomp \
/bin/bash ../../libtool --tag=CXX --mode=compile CC -DHAVE_CONFIG_H -I../.. -I../../include
-I../../lib -I../../src -I../../include -I../../libltdl -I/usr/local/ssl/include
-errwarn=%all,no%badargtype2w,no%wbadinit,no%wbadasg -errtags -D_REENTRANT -lpthread -Usparc -Uunix
-Ui386 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -c -o AsyncCall.lo AsyncCall.cc
libtool: compile: CC -DHAVE_CONFIG_H -I../.. -I../../include -I../../lib -I../../src
-I../../include -I../../libltdl -I/usr/local/ssl/include
-errwarn=%all,no%badargtype2w,no%wbadinit,no%wbadasg -errtags -D_REENTRANT -lpthread -Usparc -Uunix
-Ui386 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -c AsyncCall.cc -KPIC -DPIC -o .libs/AsyncCall.o
"/opt/SUNWspro/prod/include/CC/Cstd/./limits", line 1046: Error, multdecl: Multiple declaration for
std::numeric_limits<char>.
1 Error(s) detected.
gmake[3]: *** [AsyncCall.lo] Error 1
gmake[3]: Leaving directory `/export/sources/squid/squid-3.2.0.16/src/base'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/export/sources/squid/squid-3.2.0.16/src'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/export/sources/squid/squid-3.2.0.16/src'
gmake: *** [all-recursive] Error 1

Jose-Marcio Martins da Cruz wrote:
>
> Hello,
>

-- 
  ---------------------------------------------------------------
  Jose Marcio MARTINS DA CRUZ           http://j-chkmail.ensmp.fr
  Ecole des Mines de Paris
  60, bd Saint Michel                      75272 - PARIS CEDEX 06
  mailto:Jose-Marcio.Martins_at_mines-paristech.fr
Received on Fri Mar 16 2012 - 14:05:46 MDT

This archive was generated by hypermail 2.2.0 : Fri Mar 16 2012 - 12:00:12 MDT