Compiling

<!-- = Overview =

Drizzle is hosted at Launchpad and uses Bazaar for source code version control.

= Getting Bazaar =

Download the source from https://launchpad.net/bzr/+download

Ubuntu
sudo apt-get install bzr

Additionally, consider:

sudo apt-get install bzrtools meld

bzrtools contains a number of useful plugins and meld can do graphical 3-way merges (extremely useful for resolving merge conflicts)

Mac
Download and install the latest dmg (e.g )

CentOS 5
su - rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm yum install bzr bzrtools

Cygwin
Install via setup.exe:


 * bison
 * bzr
 * gettext
 * readline
 * libpcre0
 * pcre
 * pcre-devel

= Package Dependencies =

The following summarizes package dependencies for various platforms:

Ubuntu
Install the following using:


 * libpcre3-dev
 * libevent-dev
 * autoconf
 * automake
 * bison
 * libtool
 * ncurses-dev
 * libreadline-dev
 * libz-dev
 * g++
 * libssl-dev

sudo apt-get install libpcre3-dev libevent-dev autoconf automake bison libtool ncurses-dev libreadline-dev libz-dev g++ libssl-dev

CentOS 5 64bit
The following should be installed via yum install

autoconf autoconf.noarch bison-devel.x86_64 bison.x86_64 bzr cpp.x86_64 gcc gcc-c++.x86_64 gcc.x86_ glib2-devel glibc-devel.x86_64 glibc.x86_64 libevent-devel.x86_64 libstdc++.i386 libtool.x86_64 ncurses-devel.i386 ncurses-devel.x86_64 ncurses.x86_64 pcre-devel.x86_64 pcre.i386 pcre.x86_64 readline-devel.x86_64 readline.x86_64 zlib-devel.x86_64

Darwin Ports
When using Darwin Ports

port selfupdate port installed port list installed port install libevent port install pcre port install glib2 port install readline
 * 1) Update existing packages
 * 1) See what's installed
 * 1) port search pcre

Natively
When using macosx-fixes patch

You need libevent and libpcre installed on your Mac OS X machine. Check for latest versions, the following are specific examples at 20th July 2008. curl -O http://monkey.org/~provos/libevent-1.4.5-stable.tar.gz tar xvfz libevent-1.4.5-stable.tar.gz cd libevent-1.4.5-stable ./configure make sudo make install curl -O http://internap.dl.sourceforge.net/sourceforge/pcre/pcre-7.7.tar.gz tar xvfz pcre-7.7.tar.gz cd pcre-7.7 ./configure make sudo make install
 * 1) libevent
 * 1) libpcre

Cygwin
Install via setup.exe:

bison bzr gettext readline

Drizzle also requires libevent, which is not available in the Cygwin package repositories. You can get the most recent libevent by going to

http://monkey.org/~provos/libevent/

downloading the most recent code, and applying the patch here:

http://monkeymail.org/archives/libevent-users/2007-June/000685.html

and then following the README directions to compile. ( ./configure && make )

alternatives base-files base-passwd bash binutils bison bzip2 bzr coreutils crypt csih cygrunsrv cygutils cygwin-doc cygwin diffutils e2fsprogs editrights expat file findutils gawk gcc-core gcc-g++ gcc-mingw-core gcc-mingw-g++ gdb gettext grep groff gzip less libbz2_1 libcurl4 libdb4.2 libdb4.5 libexpat0 libexpat1 libexpat1-devel libgdbm4 libiconv2 libintl1 libintl2 libintl3 libintl8 liblzmadec0 libncurses7 libncurses8 libopenldap2_3_0 libpcre0 libpopt0 libreadline6 libsasl2 libssh2_1 libwrap0 login lzma m4 make man mingw-runtime minires mktemp openssh openssl pcre perl ping python readline rebase rpm rsync ruby run screen sed sharutils shutdown tar tcsh termcap terminfo tzcode unzip util-linux vim w32api wget which whois zip zlib

To configure Drizzle, you will need to change the "configure" script after ./config/autorun.sh is run:

lines 27386-27388 case $SYSTEM_TYPE in -   *freebsd*|*dragonfly*) +    *freebsd*|*dragonfly*|*cygwin*) FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"

and run: ./configure --with-system-type=cygwin

as per mtaylor: try changing drizzled/global.h to be #if defined(HAVE_MADVISE) && HAVE_MADVISE && !defined(HAVE_DECL_MADVISE) && defined(__cplusplus)

at this point, make still fails with: vio.c:63: error: conflicting types for 'vio_reset' ./violite.h:45: error: previous declaration of 'vio_reset' was here vio.c:63: error: conflicting types for 'vio_reset'

Dependencies for All OS's
Google's Proto Buffers need to be compiled and installed. Download the code, and follow the compilation instructions in.

Lenz Grimmer has created RPM packages of protobuf for Fedora, Mandriva and OpenSUSE, available via his package repository on the openSUSE build service.

Optional Dependencies for All OS's
gettext - for language support other than English. If you get an error because a .gmo file could not be found, it is likely because of this. gettext is supposed to be an optional dependency, though as of the time of this writing it is not an optional dependency.

= Getting the Code =

mkdir ~/bzrwork bzr init-repo ~/bzrwork cd ~/bzrwork bzr branch lp:drizzle

= Compiling the code =

cd drizzle ./config/autorun.sh ./configure make make install

When installing with macos-fixes patch you need to do.

cd macosx-fixes ./configure --disable-fail make make install

NOTE ./config/autorun.sh -- it clears the autom4te cache and reconfigures make and config

= Configure flags and safety net =

If you want to make drizzle to a specific directory, use:

./configure --prefix=/some/deploy/dir

The above is highly recommended while Drizzle is still in alpha stage. You don't want to run sudo make install with code that can potentially break your system. The recommended way of testing drizzle is:

./configure --prefix=$HOME/usr/local/drizzle && make && make install cd $HOME/usr/local/drizzle

... and start the server as shown in starting drizzled

To remove warnings:

./configure --disable-pedantic-warnings

= Next Steps = Starting drizzled

If you are a contributor to Drizzle, you may want to continue with Contributing Code

If you are a Drizzle user, you may want to continue with Using Drizzle.

Scaricare i sorgenti e compilare Drizzle -->