Troubleshooting: Setting up varnish 2.1.2 on OpenSolaris

Jacques whshub at gmail.com
Wed Jul 7 04:46:25 CEST 2010


Hello,

I'm trying to setup Solaris on OpenSolaris b134.  I'm doing a setup in a
brand new zone.  I have reviewed the instructions on
http://www.varnish-cache.org/wiki/Installation#OpenSolaris and am having
problems.

With a brand new zone, I've found that in addition to installing the list of
packages provided, I also need to install: SUNWpcre & SUNWlibm.

Once installed, I can configure & build correctly with:
----

VCC_CC="cc -Kpic -G -m64 -o %o %s" CC=/usr/bin/gcc CFLAGS="-O3
-L/opt/extra/lib/amd64 \
  -pthreads -m64 -fomit-frame-pointer" LDFLAGS="-lumem -pthreads"
./configure --prefix=/opt/extra

make && make install
----

I start by running:
#  /opt/extra/sbin/varnishd -d -a:80 -b 87.238.47.204:80
>Compiled VCL program failed to load:
>  ld.so.1: varnishd: fatal: relocation error: R_AMD64_PC32: file ./
vcl.ORk8t3RP.so: symbol main: value 0x2800dcfbd44 does not fit
>VCL compilation failed

Not unexpected, I run:
# /opt/extra/sbin/varnishd -d -a:80 -b 87.238.47.204:80 -p cc_command='gcc
-G -m64 -o %o %s'
>Compiled VCL program failed to load:
>  ld.so.1: varnishd: fatal: relocation error: R_AMD64_PC32: file ./
vcl.ORk8t3RP.so: symbol main: value 0x2800dcdbd44 does not fit
>VCL compilation failed

So I install the sunstudioexpress compiler:
# pkg install sunstudioexpress
# /opt/extra/sbin/varnishd -d  -a:80 -b 87.238.47.204:80 -p cc_command="
/opt/SunStudioExpress/bin/cc<http://src.opensolaris.org/source/s?path=/opt/SunStudioExpress/bin/cc&project=/webstack>
-c
-Kpic -m64 -o %o %s"

>"./vcl.ORk8t3RP.c", line 356: warning: initializer will be sign-extended:
-1
>storage_file: filename: ./varnish.BAaWXR size 461096 MB.
>Using old SHMFILE
>Varnish on -sfile,-hcritbit
>200 193
>-----------------------------
>Varnish HTTP accelerator CLI.
>-----------------------------
>Type 'help' for command list.
>Type 'quit' to close CLI session.
>Type 'start' to launch worker process.

Varnish appears to be running.  However, I  getting 503s when I try to
Varnish.
I saw that the warning was mentioned in a closed bug:
http://varnish-cache.org/ticket/649

So, can someone giving me some pointers?  I really would like to use just
the gcc compiler and not have to load all the SunStudioExpress stuff.  But
either way, I just want to make it work.

I've reviewed the following resources and haven't solved my problem:
http://blogs.everycity.co.uk/alasdair/2009/05/64bit-varnish-on-solaris/
http://letsgetdugg.com/2009/12/04/varnish-on-solaris/
http://src.opensolaris.org/source/xref/webstack/varnish/

Thanks for any help,
Jacques

Compiler Info:
[/usr/bin/gcc -v] gcc version 3.4.3 (csl-sol210-3_4-20050802)
[/usr/gnu/bin/cc] gcc version 3.4.3 (csl-sol210-3_4-20050802)  [symlinked to
gcc]
[/opt/SunStudioExpress/bin/cc -V] cc: Sun Ceres C 5.10 SunOS_i386 2009/03/06
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100706/d24c7209/attachment-0003.html>


More information about the varnish-misc mailing list