Mailing List Archive

#736: Migration to Cygwin plataform
#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

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
http://lists.varnish-cache.org/mailman/listinfo/varnish-bugs
Re: #736: Migration to Cygwin plataform [ In reply to ]
#736: Migration to Cygwin plataform
----------------------+-----------------------------------------------------
Reporter: jdzst | Type: enhancement
Status: closed | Priority: normal
Milestone: | Component: build
Version: | Severity: normal
Resolution: invalid | Keywords: cygwin, windows
----------------------+-----------------------------------------------------

Comment(by jdzst):

I have attached cygwin changes in patch format for r5110.

I also have executed regression tests with r5110. I continue having
problems with:

{{{
FAIL: ./tests/b00004.vtc
FAIL: ./tests/b00015.vtc
FAIL: ./tests/b00030.vtc
FAIL: ./tests/c00005.vtc
FAIL: ./tests/p00002.vtc
FAIL: ./tests/r00433.vtc
FAIL: ./tests/r00558.vtc
FAIL: ./tests/v00009.vtc
FAIL: ./tests/v00027.vtc
}}}

--
Ticket URL: <http://www.varnish-cache.org/ticket/736#comment:8>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
http://lists.varnish-cache.org/mailman/listinfo/varnish-bugs
Re: #736: Migration to Cygwin plataform [ In reply to ]
#736: Migration to Cygwin plataform
----------------------+-----------------------------------------------------
Reporter: jdzst | Type: enhancement
Status: closed | Priority: normal
Milestone: | Component: build
Version: | Severity: normal
Resolution: invalid | Keywords: cygwin, windows
----------------------+-----------------------------------------------------

Comment(by jdzst):

Hello,

I have updated my version of varnish for cygwin. It is based on subversion
trunk (r5646)

The new improvements are:
* Better compilation of VCL archives (in the past they were compiled
using objects from varnish compilation directory)
* Fixed regresion tests: varnishtest program server_thread function in
vtc_server.c, after "fd = accept(s->sock, addr, &l);" If socket returned
is wrong, it is not used.
* Fixed regresion tests: varnishtest program is blocked in some tests.
Test is executed succesfully but varnishtest program is blocked when it
stops server thread, so varnishtest timeouts and FAILS.
- Server thread is blocked in TCP accept, waiting a request
(server_thread function in vtc_server.c file) and main varnishtest is
blocked in pthread_join (server_wait function in vtc_server.c file)
waiting server thread to end.
- In linux, pthread_join unblocks thread from its TCP accept but in
Cygwin it does not.
- The solution is to send a signal using pthread_kill (only in cygwin).
The signal unblocks thread from its TCP accept.
- I have tested varnish cache in cygwin against one apache server and it
works fine. The patch applied in a Solaris and Linux server works
properly.

After this changes, the result of regression test are: 9 tests failed, 202
tests passed


Failed tests:

'''c00005.vtc "Test simple ACL"'''
error IPv6 [DNS lookup(::): hostname nor servname provided, or not
known\n]
CYGWIN does not support IPv6 in Windows XP. Maybe it works in newer
versions

'''s00002.vtc "Check grace with sick backends"'''
"Write failed: Bad file descriptor"
UNKNOWN ERROR

'''b00015.vtc "Check synthetic error page caching" and v00009.vtc "Test
round robin director"'''
bind(): Address already in use [.Assert error in server_start(),
vtc_server.c line 183: Condition(s->sock >= 0) not true.]
UNKNOWN ERROR: test server is started two times, the second time it says
that port it is in use

'''VMOD regresion tests: m00000.vtc, m00001.vtc, m00002.vtc, m00003.vtc
and m00004.vtc'''
CYGWIN does not find new VMOD shared libraries
A fix is need in order to load shared libraries of VMOD


LIST OF FAILED TESTS:

# top TEST tests/b00015.vtc FAILED (7.039)
# top TEST tests/c00005.vtc FAILED (7.766)
# top TEST tests/m00000.vtc FAILED (3.131)
# top TEST tests/m00001.vtc FAILED (3.007)
# top TEST tests/m00002.vtc FAILED (2.830)
# top TEST tests/m00003.vtc FAILED (2.894)
# top TEST tests/m00004.vtc FAILED (3.279)
# top TEST tests/s00002.vtc FAILED (9.977)
# top TEST tests/v00009.vtc FAILED (5.509)

--
Ticket URL: <http://varnish-cache.org/trac/ticket/736#comment:11>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #736: Migration to Cygwin plataform [ In reply to ]
#736: Migration to Cygwin plataform
----------------------+-----------------------------------------------------
Reporter: jdzst | Type: enhancement
Status: closed | Priority: normal
Milestone: | Component: build
Version: | Severity: normal
Resolution: invalid | Keywords: cygwin, windows
----------------------+-----------------------------------------------------

Comment(by jdzst):

Hello,

I have updated my version of varnish for cygwin. It is based on subversion
trunk (r5646)[[BR]]

The new improvements are:[[BR]]

* Better compilation of VCL archives (in the past they were compiled
using objects from varnish compilation directory)
* Fixed regresion tests: varnishtest program server_thread function in
vtc_server.c, after "fd = accept(s->sock, addr, &l);" If socket returned
is wrong, it is not used.
* Fixed regresion tests: varnishtest program is blocked in some tests.
Test is executed succesfully but varnishtest program is blocked when it
stops server thread, so varnishtest timeouts and FAILS.
* Server thread is blocked in TCP accept, waiting a request
(server_thread function in vtc_server.c file) and main varnishtest is
blocked in pthread_join (server_wait function in vtc_server.c file)
waiting server thread to end.
* In linux, pthread_join unblocks thread from its TCP accept but in
Cygwin it does not.
* The solution is to send a signal using pthread_kill (only in
cygwin). The signal unblocks thread from its TCP accept.
* I have tested varnish cache in cygwin against one apache server and
it works fine. The patch applied in a Solaris and Linux server works
properly.

After this changes, the result of regression test are: 9 tests failed, 202
tests passed


Failed tests:

'''c00005.vtc "Test simple ACL"'''
{{{error IPv6 [DNS lookup(::): hostname nor servname provided, or not
known\n]
CYGWIN does not support IPv6 in Windows XP. Maybe it works in newer
versions}}}

'''s00002.vtc "Check grace with sick backends"'''
{{{"Write failed: Bad file descriptor"
UNKNOWN ERROR}}}

'''b00015.vtc "Check synthetic error page caching" and v00009.vtc "Test
round robin director"'''
{{{bind(): Address already in use [.Assert error in server_start(),
vtc_server.c line 183: Condition(s->sock >= 0) not true.]
UNKNOWN ERROR: test server is started two times, the second time it says
that port it is in use}}}

'''VMOD regresion tests: m00000.vtc, m00001.vtc, m00002.vtc, m00003.vtc
and m00004.vtc'''
{{{CYGWIN does not find new VMOD shared libraries
A fix is need in order to load shared libraries of VMOD}}}

{{{
LIST OF FAILED TESTS:

# top TEST tests/b00015.vtc FAILED (7.039)
# top TEST tests/c00005.vtc FAILED (7.766)
# top TEST tests/m00000.vtc FAILED (3.131)
# top TEST tests/m00001.vtc FAILED (3.007)
# top TEST tests/m00002.vtc FAILED (2.830)
# top TEST tests/m00003.vtc FAILED (2.894)
# top TEST tests/m00004.vtc FAILED (3.279)
# top TEST tests/s00002.vtc FAILED (9.977)
# top TEST tests/v00009.vtc FAILED (5.509)
}}}

--
Ticket URL: <http://varnish-cache.org/trac/ticket/736#comment:12>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #736: Migration to Cygwin plataform [ In reply to ]
#736: Migration to Cygwin plataform
----------------------+-----------------------------------------------------
Reporter: jdzst | Type: enhancement
Status: closed | Priority: normal
Milestone: | Component: build
Version: | Severity: normal
Resolution: invalid | Keywords: cygwin, windows
----------------------+-----------------------------------------------------

Comment(by jdzst):

After this changes, the result of regression test are: 9 tests failed, 202
tests passed Failed tests:

'''c00005.vtc "Test simple ACL"'''
{{{
error IPv6 [DNS lookup(::): hostname nor servname provided, or not
known\n] CYGWIN does not support IPv6 in Windows XP. Maybe it works in
newer versions
}}}

'''s00002.vtc "Check grace with sick backends"'''
{{{
"Write failed: Bad file descriptor" UNKNOWN ERROR
}}}

'''b00015.vtc "Check synthetic error page caching" and v00009.vtc "Test
round robin director"'''
{{{
bind(): Address already in use [.Assert error in server_start(),
vtc_server.c line 183: Condition(s->sock >= 0) not true.] UNKNOWN ERROR:
test server is started two times, the second time it says that port it is
in use
}}}

'''VMOD regresion tests: m00000.vtc, m00001.vtc, m00002.vtc, m00003.vtc
and m00004.vtc'''
{{{
CYGWIN does not find new VMOD shared libraries A fix is need in order to
load shared libraries of VMOD
}}}

--
Ticket URL: <http://www.varnish-cache.org/trac/ticket/736#comment:13>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #736: Migration to Cygwin plataform [ In reply to ]
#736: Migration to Cygwin plataform
----------------------+-----------------------------------------------------
Reporter: jdzst | Type: enhancement
Status: closed | Priority: normal
Milestone: | Component: build
Version: | Severity: normal
Resolution: invalid | Keywords: cygwin, windows
----------------------+-----------------------------------------------------

Comment(by jdzst):

I have created a wiki page with [wiki:VarnishOnCygwinWindows Varnish over
Windows (with Cygwin DLL)] information

--
Ticket URL: <http://varnish-cache.org/trac/ticket/736#comment:14>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #736: Migration to Cygwin plataform [ In reply to ]
#736: Migration to Cygwin plataform
-----------------------------+----------------------
Reporter: jdzst | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: build | Version:
Severity: normal | Resolution: invalid
Keywords: cygwin, windows |
-----------------------------+----------------------

Comment (by keretamalam):

I am about to leave and cannot look into this further right now, but I do
want to mention that relying on pkg-config itself is not a problem (as you
said, we also use it later), the problem is that on some systems, the .pc
file for pkg-config is supplying wrong information (whereas on yours, it's
botan-config that is wrong), so that's why I'm trying to make it work with
both (while one of them is bad).
[http://maskodoq.blogspot.com/2014/03/unit-link-terbaik-di-indonesia.html
Unit Link Terbaik di Indonesia Commonwealth Life Investra Link]
[http://maskodoq.blogspot.com/2013/07/CiptoJunaedy.html Cipto Junaedy]
[http://etnisjawa.blogspot.com/2013/08/apakah-cipto-junaedy-bohong.html
Cipto Junaedy]

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/736#comment:15>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #736: Migration to Cygwin plataform [ In reply to ]
#736: Migration to Cygwin plataform
-----------------------------+----------------------
Reporter: jdzst | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: build | Version:
Severity: normal | Resolution: invalid
Keywords: cygwin, windows |
-----------------------------+----------------------

Comment (by Alex):

[https://crooksandliars.com/user/buy-beats-online crooksandliars]

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/736#comment:15>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs