28 Dec
2006
3333
hits
hits
How to cross compile Cherokee (Win32 on Linux)
First of all, you will have to install the cross compiler:
# apt-get install mingw32 mingw32-binutilsThen, you'll have to install the pthread library:
$ cd /var/tmp $ mkdir pthread-win32 $ cd pthread-win32 $ wget ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-2-8-0-release.exe $ unzip pthreads-w32-2-8-0-release.exe # cp ./Pre-built.2/lib/libpthreadGCE2.a /usr/i586-mingw32msvc/lib/libpthread.a # cp Pre-built.2/include/* /usr/i586-mingw32msvc/include/And now, we are ready to compile it. We only have to set a few environment variables:
PATH=/usr/i586-mingw32msvc/bin:$PATH CC=i586-mingw32msvc-gcc LD=i586-mingw32msvc-ld AR=i586-mingw32msvc-ar RC=i586-mingw32msvc-windresCheck out the last version of Cherokee trunk:
$ svn co svn://svn.cherokee-project.com/cherokee/trunk cherokeeand execute a quite long "configure" command:
$ ac_cv_func_malloc_0_nonnull=yes \ ac_cv_func_realloc_0_nonnull=yes \ ./configure --host=i586-mingw32msvc \ --prefix=/usr/i586-mingw32msvc \ --disable-readdir_r --disable-tls \ --enable-static-module=all \ --enable-trace --enable-static \ --enable-shared=no --enable-beta \ CC=i586-mingw32msvc-gccreached this point, we are ready to build it by simply typing
$ makeAnd, here is the result. A native Win32 binary built on Linux! :-)
-rwxr-xr-x 1 alo alo 2600254 2006-12-28 15:54 cherokee.exe
Posted by Alvaro Lopez Ortega
Comments
Matt Lankford on Mon Sep 15 20:24:52 2008
924
Hi Alvaro, I am looking forward to a preconfigured and compiled version of the windows version for the new version. In the mean time, does this still work?

