[Varnish] #443: solaris --enable-tests breaks
Varnish
varnish-bugs at projects.linpro.no
Wed Feb 25 13:00:58 CET 2009
#443: solaris --enable-tests breaks
---------------------+------------------------------------------------------
Reporter: kapilt | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution: fixed
Keywords: solaris |
---------------------+------------------------------------------------------
Comment (by whocares):
The latest source from trunk doesn't compile - at least not when using Sun
Studio 12 instead of gcc. With gcc it does compile fine. The reason for
the problems with Sun Studio still is the {{{__inline}}} definition of the
functions in vsha256.c as outlined in #450.
Here's the script I'm using to compile varnish:
{{{
#!/usr/bin/bash
cd varnish.svn/varnish-cache
export CFLAGS="-fast -xtarget=opteron -m64 -xpagesize=2M -mt -xlibmopt
-xlibmil -xcrossfile -Kpic"
export CPPFLAGS="-fast -xtarget=opteron -m64 -xpagesize=2M -mt -xlibmopt
-xlibmil -xcrossfile -Kpic"
export LDFLAGS="-fast -xtarget=opteron -m64 -xpagesize=2M -mt -xlibmopt
-xlibmil -xcrossfile -Kpic"
export VCC_CC="cc -fast -xtarget=opteron -m64 -xpagesize=2M -mt -xlibmopt
-Kpic -c -o %o %s"
./autogen.sh
if [ -f config.log ]; then
gmake distclean 2>&1 >> /dev/null
fi
./configure --prefix=/opt/soft/varnish \
--localstatedir=/cache/varnish \
--sysconfdir=/opt/conf \
--enable-diagnostics \
--with-max-header-fields=48 \
gmake
}}}
The result is:
{{{
/bin/bash ../../libtool --tag=CC --mode=compile /opt/SUNWspro/bin/cc
-xc99=all -DHAVE_CONFIG_H
-I. -I../.. -I../../include -fast -xtarget=opteron -m64 -xpagesize=2M -mt
-xlibmopt -xlibmil
-xcrossfile -Kpic -fast -xtarget=opteron -m64 -xpagesize=2M -mt -xlibmopt
-xlibmil -xcrossfile
-Kpic -DDIAGNOSTICS -c -o vsha256.lo vsha256.c
/opt/SUNWspro/bin/cc -xc99=all -DHAVE_CONFIG_H -I. -I../..
-I../../include -fast -xtarget=opteron
-m64 -xpagesize=2M -mt -xlibmopt -xlibmil -xcrossfile -Kpic -fast
-xtarget=opteron -m64 -xpagesize=2M
-mt -xlibmopt -xlibmil -xcrossfile -Kpic -DDIAGNOSTICS -c vsha256.c -KPIC
-DPIC -o .libs/vsha256.o
"vsha256.c", line 48: warning: no explicit type given
"vsha256.c", line 48: syntax error before or at: void
"vsha256.c", line 59: warning: no explicit type given
"vsha256.c", line 59: syntax error before or at: void
"vsha256.c", line 80: warning: no explicit type given
"vsha256.c", line 80: syntax error before or at: uint32_t
cc: acomp failed for vsha256.c
gmake[3]: *** [vsha256.lo] Error 1
gmake[3]: Leaving directory `/storage/soft/varnish.svn/varnish-
cache/lib/libvarnish'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/storage/soft/varnish.svn/varnish-cache/lib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/storage/soft/varnish.svn/varnish-cache'
gmake: *** [all] Error 2
}}}
Verion of {{{cc}}} used:
{{{
#root at soldev:idgsoft# cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-08 2008/11/25
usage: cc [ options] files. Use 'cc -flags' for details
}}}
My current solution is to add this to {{{include/vsha256.c}}}:
{{{
#ifdef __SUNPRO_C
#define __inline
#endif
}}}
Would be nice if this little tidbit could be included. It's also part of
the patch I attached to #455. If access to a solaris machine with Sun
Studio is needed to do some testing whether this breaks the code, I could
provide that, too.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/443#comment:4>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list