Compile Kiwix

From Kiwix
Jump to: navigation, search

These are the instructions to compile Kiwix. The source code is on:


GNU/Linux

GNU/Linux build uses shared libraries by default. You will need the following dependencies to compile Kiwix for Linux Debian/Ubuntu packages: build-essential autoconf automake libtool libicu-dev libclucene-dev libxapian-dev libmicrohttpd-dev liblzma-dev xulrunner-dev zlib1g-dev libssl-dev

Mac OSX (i386 only for now)

Mac OS build is close to the Linux one but it compile everything statically. [warning] To build the Mac OS version you will have to install proprietary software which are free of charge.

You will also need to build on an Apple Mac computer.
http://developer.apple.com/technologies/xcode.html (requires registration)
http://download.kiwix.org/dev/xcode_3.2.5_and_ios_sdk_4.2_final.dmg
http://download.kiwix.org/dev/xulrunner-1.9.2.13.en-US.mac-pkg.dmg
sudo port install autogen +universal
sudo port install pkgconfig +universal
sudo port install wget +universal
sudo port install gmake +universal
sudo port install coreutils +universal
sudo port install libidl +universal
sudo port install autoconf213 +universal
sudo port install icu +universal
sudo ln -s /opt/local/bin/glibtoolize /opt/local/bin/libtoolize
sudo mv /usr/bin/gcc /usr/bin/gcc.default
sudo mv /usr/bin/g++ /usr/bin/g++.default
sudo echo "/usr/bin/gcc-4.2 -arch i386 -m32 \"$@\"" > /usr/bin/gcc
sudo echo "/usr/bin/g++-4.2 -arch i386 -m32 \"$@\"" > /usr/bin/g++
sudo chmod +x /usr/bin/g{cc,++}

Alternatively, you can choose to prepend CFLAGS=" -arch i386 -m32" CXXFLAGS=" -arch i386 -m32" to the configure command.

to prepare the compilation and check if all
necessary libraries are installed. You may get more information by
running ./configure --help
/opt/local is the path where you installed MacPorts (/opt/local is default)

- components file type can be either Mach-O dynamically linked shared library

or Mach-O bundle but above instructions will create dynamic libraries.

- Shared Object (.so files on Linux) have .dylib extension on OSX. - use dtruss to inspect program execution like strace.

Windows

> cd /c/mozilla-build/
svn co https://kiwix.svn.sourceforge.net/svnroot/kiwix/moulinkiwix
"http://download.kiwix.org/dev/gcc-4.3.0-20080502-mingw32-alpha-bin.7z"
... and unzip it (with 7zip) in "c:\mozilla-build\msys"
"http://download.kiwix.org/dev/binutils-2.20.1-2-mingw32-bin.tar.gz"
... and detar it in "c:\mozilla-build\msys"
Run the following commands:
> cd /c/mozilla-build/moulinkiwix/ 
> ./autogen.sh
> ./configure 
> make win
Personal tools
Namespaces
Variants
Actions
Download(Sources)
Navigation
Toolbox
Part of OpenZIM
Motorized by
Hosted by