[Varnish] #577: 64bit Catch 22 on Solaris (gcc _builtin_xxx functions)

Varnish varnish-bugs at projects.linpro.no
Thu Nov 12 02:22:09 CET 2009


#577: 64bit Catch 22 on Solaris (gcc _builtin_xxx functions)
----------------------+-----------------------------------------------------
 Reporter:  whocares  |        Type:  defect
   Status:  new       |    Priority:  normal
Milestone:            |   Component:  build 
  Version:  2.0       |    Severity:  normal
 Keywords:            |  
----------------------+-----------------------------------------------------
 Until recently, I was using Sun Studio 12.1 to compile Varnish on Solaris
 10/x86_64. This is no longer possible, because compilation will fail here:

 {{{
 /opt/SUNWspro/bin/cc -xc99=all -fast -xtarget=opteron -xarch=sse3 -m64 -mt
  -Kpic -o .libs/varnishadm varnishadm.o
  ../../lib/libvarnish/.libs/libvarnish.so -lrt -lm
  ../../lib/libvarnishcompat/.libs/libvarnishcompat.so -lumem -lnsl
 -lsocket
  -R/opt/soft/varnish/lib
 Undefined                       first referenced
  symbol                             in file
 __builtin_frame_address
 ../../lib/libvarnishcompat/.libs/libvarnishcompat.so
 __builtin_return_address
 ../../lib/libvarnishcompat/.libs/libvarnishcompat.so
 ld: fatal: Symbol referencing errors. No output written to
 .libs/varnishadm
 }}}

 This is quite understandable since `__builtin_frame_address` and
 `__builtin_return_address` are functions specific to `gcc`. I'm not really
 happy with theses close ties to `gcc` but, well, that's not for me to
 decide anyway.

 Ok, so I tried to compile using `gcc 3.4.6` from !SunFreeware.com. This
 '''will''' work but only for 32-bit binaries. The `gcc` version supplied
 by !SunFreeware.com just isn't capable of building 64-bit binaries.

 So I did what is "general practice" to build 64-bit binaries on Solaris
 with `gcc`: I used the `gcc 3.4.3` supplied by Sun with Solaris 10. The
 problem there:

 {{{
 libtool: link: gcc -std=gnu99 -g -O2 -m64 -o .libs/varnishadm varnishadm.o
  -L/usr/sfw/lib/64 ../../lib/libvarnish/.libs/libvarnish.so -lrt -lm
  ../../lib/libvarnishcompat/.libs/libvarnishcompat.so -lnsl -lsocket
   -R/opt/soft/varnish/lib -R/usr/sfw/lib/64
 Undefined                       first referenced
  symbol                             in file
 __builtin_isfinite
 ../../lib/libvarnish/.libs/libvarnish.so
 }}}

 At this point I decided to build `gcc 4.4.2` from scratch. That seemed to
 work, however now I'm stuck with Varnish not compiling the initial VCL and
 not starting its child processes. I already tried setting VCC_CC to
 different values but couldn't make it work.

 Any ideas? I could quite easily provide access to my dev environment if
 that would help / be of interest.

 Ah, lest I forget: The reason I need to use 64bit binaries is that Varnish
 shall run on a system where it is to use 6 GB of memory based cache. And
 that'll only work with a 64bit binary.

 Regards,
 Stefan

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/577>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list