понедельник, 26 января 2009 г.

Compile memcached windows (Cygwin) (all tests passed !!!)

Memcached win32 32 bit you can download from here
all tests from folder "t" passed ,

but in libevent test

Simple DNS resolve: [Timed out] FAILED
IPv6 DNS resolve: [Timed out] SKIPPED
Simple reverse DNS resolve: [Timed out] FAILED


//==============================================================
if you want install youself

1) you need
http://win6.jp/Cygwin/cygwin-1.5.25-15-ipv6-0.22.zip
http://monkey.org/~provos/libevent-1.4.9-stable.tar.gz
http://www.danga.com/memcached/dist/memcached-1.2.6.tar.gz

2) unpack cygwin-1.5.25-15-ipv6-0.22.zip - into you cygwin folder
about this files read site http://win6.jp/Cygwin/

3) in libevent http.c file add line ---> #define EAI_SYSTEM 11
now install libevent
./configure
make
make install

4) in memcached.c file add 3 lines --->

#define AI_PASSIVE 0x0020
#define AI_ADDRCONFIG 0x0001
#define EAI_SYSTEM 11
now install memcached

5) i run all tests and all tests passed !!!!!!! (unlike mamcached compile in visual studio )

воскресенье, 25 января 2009 г.

Compile memcached-1.2.6 under windows Visual Studio 2005 (use Jellycan Code )

1) i use files from http://code.jellycan.com/memcached/
get memcached-1.2.6-win32-bin.zip
libevent
2) need folder memcached and libevent put together
/src/libevent
/src/memcached

and event-config.h (from \libevent\WIN32-Code ) copy to "/src/libevent"
and in memcached properties VS2005 add
Additional Include Directiories - ../../libevent/
3) now you can compile memcached ,
4) all files here , VS2005 solution
http://stream.ifolder.ru/10219356

5) exe here - http://stream.ifolder.ru/10219544

TESTS (Cygwin)
1) if you have cygwin
you can test memcached , in folder "t" you have test perl files ,
for run test , open cygwin shell

form cygwin_lib_perl.rar - unpack to cygwin folder
OR install cygwin_Cache-Memcached-1.24.tar.gz and cygwin_String-CRC32-1.4.tar.gz

2)you can run test separately test like this
>perl udp.t
and you can run run_all_tests.bat and view *.txt fils
you will see like this


3) you see that tests

stats.t
incrdecr.t
64bit.t

FILED !!! i dont know why !!!
who have linux or unix , all tests passed ???

Compile libevent-1.4.9-stable under windows Visual Studio 2005

Compile libevent-1.4.9-stable under windows Visual Studio 2005

0) if you want get now solution go 7) ( and 6))
1) I take file "event-config.h" from http://code.jellycan.com/memcached/ - libevent-1.4.4-stable-win32.zip
2) copy event-config.h to ---> ...\libevent-1.4.9-stable\WIN32-Code
delete event-config.h from ---> ...\libevent-1.4.9-stable
3) now you can open ...\libevent-1.4.9-stable\WIN32-Prj\libevent.sln
and compile it
4) i write
#define exit(i) printf(" _____exit(%d) - hidden _____\n", i);
in file regress_dns.c
and write in function "main" before "return (0)"
printf("End tests ...");
while(1);
5) now you run regress project and will see like this



6)!!! you can see
Simple DNS resolve: [Timed out] FAILED
i dont know why this error !!!
7) now here the all source and solution for Visual Studio 2005
open ...\libevent-1.4.9-stable\WIN32-Prj\libevent.sln
compile and run regress test
8) libevent64.lib - libevent for 64 bit windows
libevent32.lib - libevent for 32 bit windows