Alasdair on Everything

64bit Varnish on Solaris

May 31st, 2009

When running a 64bit varnish on Solaris, you may encounter an error similar to:

# /opt/ec/sbin/amd64/varnishd -d
Compiled VCL program failed to load:
  ld.so.1: varnishd: fatal: ./vcl.ORk8t3RP.so: wrong ELF class: ELFCLASS32
VCL compilation failed

The problem is fairly self explanatory, your 64bit Varnish is failing to pass -m64 to the compiler when it compiles up the VCL program. The fix is very straight forward, simply pass:

# /opt/ec/sbin/amd64/varnishd -d -p cc_command='cc -Kpic -G -m64 -o %o %s'
storage_file: filename: ./varnish.NxaavR (unlinked) size 26135 MB.
Creating new SHMFILE
New Pid 22203

Debugging mode, enter "start" to start child

Et voilĂ , fixed. Enjoy!

Entry Filed under: General

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed