[Varnish] #736: Migration to Cygwin plataform
Varnish
varnish-bugs at varnish-cache.org
Wed Jul 21 00:12:12 CEST 2010
#736: Migration to Cygwin plataform
-----------------------------+----------------------------------------------
Reporter: jdzst | Type: enhancement
Status: new | Priority: normal
Milestone: | Component: build
Version: | Severity: normal
Keywords: cygwin, windows |
-----------------------------+----------------------------------------------
It will be nice to support Varnish in Cygwin plataform
(http://www.cygwin.com)
After weeks making some tests I was able to build successful Varnish in
Cygwin, the problems that I have found are:
1) Cygwin doesn't support CLOCK_MONOTONIC but HAVE_CLOCK_GETTIME is
defined
2) RTLD_LOCAL is not defined in dlfcn.h headers
3) madvise function and MADV_RANDOM define does not exists, in Cygwin
their correct names are posix_madvise and POSIX_MADV_RANDOM
4) In Cygwin SO_RCVTIMEO_WORKS and SO_SNDTIMEO_WORKS doesn't work
properly because in Windows setsockopt/getsockopt expects time-out in
"int" milliseconds instead of "struct timeval" (in future, i think it
could be fixed)
5) Linkage problems ("Undefined reference" errors). The undefined
reference is because fundamentally ELF (UNIX) and PE/COFF (Windows) are
very different in terms of how linking works under the hood. The short
explanation is that PE/COFF requires all references to be resolved at
link-time:
* http://www.cygwin.com/ml/cygwin/2006-12/msg00592.html
* http://www.cygwin.com/ml/cygwin/2005-07/msg00675.html
* http://www.mail-archive.com/cygwin@cygwin.com/msg81837.html
6) VCL compilation problems ("Undefined reference" errors). VCL compiled
DLL uses simbols from EXE. It is necesary to create a fake import file
from EXE to allow compilation.
I have solved all problems modifing source code and automake scripts. I
attach all modification to this ticket.
It is also necessary to execute varnishd with cc_command parameter in
order to compile VCL correctly:
-p cc_command='cc -shared /tmp/varnish-2.1.2/bin/varnishd/varnishd-
cache_vrt.o /tmp/varnish-2.1.2/bin/varnishd/varnishd-cache_backend_cfg.o
-L/usr/local/lib -L/tmp/varnish-2.1.2/bin/varnishd/ -lvarnish -lvarnishd
-Wl,--export-all-symbols -Wl,-x -o %o %s'
I have tested varnish and works OK.
I think it will be interesting to add this information to wiki:
* http://www.varnish-cache.org/wiki/Installation
--
Ticket URL: <http://varnish-cache.org/ticket/736>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list