Home > Uncategorized > Build grok on Windows (with mingw)

Build grok on Windows (with mingw)

Build currently fails

Download and install MinGW:
1) download the mingw installer.
2) run it.
3) install only msys-base

Configure MinGW:
1) verify c:\mingw\bin is in your PATH
2) setup fstab:

copy c:\MinGW\msys\1.0\etc\fstab.sample c:\MinGW\msys\1.0\etc\fstab
echo C:\MinGW\ /usr/local >> c:\MinGW\msys\1.0\etc\fstab
#echo C:\MinGW\include /include >> c:\MinGW\msys\1.0\etc\fstab

3) Start mingwin:


Install some packages:

mingw-get install gcc g++ mingw32-make msys-patch msys-wget msys-unzip msys-libregex msys-regex mingw32-pthreads-w32 msys-zlib mingw32-bzip2
cp /include/* /mingw/include/

Install gperf:

mkdir gperf && cd gperf
wget --no-check-certificate https://downloads.sourceforge.net/project/gnuwin32/gperf/3.0.1/gperf-3.0.1-bin.zip
unzip gperf-*
cp ./bin/gperf.exe /bin/

Install libevent:

wget http://www.gdsw.at/gnu/gnu-win32/x86/release/libevent/libevent-2.0.21-1-src.tar.bz2
tar xvf libevent-* && rm -f libevent-2.0.21-1-src.tar.bz2
cd libevent-*
make && make install

Install libpcre:

wget --no-check-certificate https://downloads.sourceforge.net/project/pcre/pcre/8.34/pcre-8.34.tar.gz
tar zxvf pcre-*
cd pcre-*
./configure --prefix=/mingw --enable-pcre16 --enable-pcre32 --enable-unicode-properties --enable-newline-is-any
make && make install

Install mman library:

mkdir mmanlib
cd mmanlib
wget --no-check-certificate http://mman-win32.googlecode.com/svn/trunk/Makefile
wget --no-check-certificate http://mman-win32.googlecode.com/svn/trunk/configure
wget --no-check-certificate http://mman-win32.googlecode.com/svn/trunk/mman.c
wget --no-check-certificate http://mman-win32.googlecode.com/svn/trunk/mman.h
wget --no-check-certificate http://mman-win32.googlecode.com/svn/trunk/test.c
make && make install
cp mman.h /mingw/include/

Install tokyo cabinet port:

mkdir tokyocabinet
cd tokyocabinet
wget --no-check-certificate https://github.com/jfnavarro/Mingw-TokyoCabinet/archive/master.zip
unzip master
cd Mingw-*
make && make install

Download grok:

wget http://semicomplete.googlecode.com/files/grok-1.20110630.1.tar.gz
tar zxvf grok-*

Install rpcgen:

mkdir rpcgen && cd rpcgen
wget --no-check-certificate https://downloads.sourceforge.net/project/gnuwin32/sunrpc/4.0/sunrpc-4.0-bin.zip
unzip sunrpc-*
cp ./bin/rpcgen.exe /bin/
#help rpcgen find cpp.exe (see `strings $(which rpcgen) | grep cpp`)
cp /usr/local/bin/cpp.exe /lib/cpp

Modify grok makefile:

cd grok-*
sed s@rpcgen@"rpcgen\ -Y /usr/local/bin"@ -i Makefile
Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: