kexi project
Rapid Database Application Development
Development
"Microsoft Access for Linux"

Home Download FAQ Support Features Handbook Screenshots Screencasts Compile Kexi Development Authors Contact License Sponsorship Translate This Site

wiki navigation:

Front Page
[info] [diff] [login]
[recent changes]
[most popular]
You can donate
to Kexi Project:
Via PayPal

Spread the word about Kexi!
Get Kexi Now!

Built on the KDE technology
KDE

Member of the Calligra Suite

No Software Patents!

Compiling Kexi from Subversion

This page is for the old 1.x Kexi series only. Click to read how to build Kexi 2.x (KOffice 2.2 or newer)



Table of Contents
    Introduction
     Things to Remember
    Short version
    Requirements
      Disk space
      Package requirements
    Building
      Building from 'trunk'
      Managing different versions of Kexi
    Compiling additional components
     Form Designer
     MS Access Migration Driver
     Command line tests
    Notes
      Known problems
      Compiling and installing Kexi to "nonsystem" KDE directory
      PostgreSQL support
      Building Kexi on Debian

Simple version: you can also download the source tarball.

Introduction

The KDE project uses the Subversion version control system as a repository for source code. Kexi can be found in the KOffice directory of the repository. An 'anonymous mirror' provides public access to source code.

This page describes how to build Kexi from the KDE's anonymous Subversion repository. You'll need a copy of Subversion (your distribution probably contains needed binaries). The subversion protocol uses port 3690, so, if you have a firewall in place, it's worth checking that it will allow subversion traffic. You can use your own SVN account, if you have one. In this case, replace svn://anonsvn.kde.org/home/kde/branches/koffice/1.6/koffice/ with https://svn.kde.org/home/kde/branches/koffice/1.6/koffice/.

(not available for now) If you can't access the subversion server, you might want to try using the daily KOffice snapshot at  http://ftp.kde.org/pub/kde/snapshots/koffice.tar.bz2 See Download KOffice Source Code for further information how to compile using the tarball.

If you're new to Subversion, there are instructions for using it:

Note that these instructions explain how to build Kexi only, not entire KOffice.

If you are using Subversion because you want to help develop Kexi, you might want to read step 5 only of Working with Existing Applications in KDE CVS.

You can also browse Kexi source code tree.

^ toc

Things to Remember

  • Please uninstall any KOffice package if you have such installed independently (these not coming from this particular compilation). Otherwise you'll encounter hard to locate crashes or misbehaviour.
  • Do not forget about installing Kexi always after compiling it - without this things will not work properly or will crash. Use 'make install' or 'unsermake install' commands from lib/ and kexi/ source code subdirectories.
  • If you compiled Kexi from source code obtained via Subversion, it's good idea to keep your source code directory for later. Then you can just use 'svn up' commands to quickly update the source code to the newest version, getting all new features and fixes. Then, compile again using 'make' or 'unsermake' commands, what is usually much faster andeasier than starting from scratch with downloading and recompiling Kexi.
  • If you want to use unsermake, sometimes (depending on your OS distribution, e.g. reported for Kubuntu) unsermake is unable to find aclocal command. The reason can be that in your system aclocal belongs to automake, not autoconf. If this is the case, install automake, even if you do not plan to use it (more info).
^ toc

Short version

First, using unsermake instead of automake is recommended - it is faster and convenient way for performing compilations. Read the documentation how to get and install unsermake (some distributions offer automake packages).

The following is a short summary of the process. See subsequent sections for step-by-step instructions:

 svn co -N svn://anonsvn.kde.org/home/kde/trunk/koffice/
 svn co -N svn://anonsvn.kde.org/home/kde/branches/koffice/1.6/koffice/
 cd koffice
 svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin
 svn up kexi
 svn up lib

To skip compilation of certain KOffice apps, type something like:

 export DO_NOT_COMPILE="kchart kdgantt kformula koshell krita kugar kword"

If you're using automake:

 make -f Makefile.cvs

Use "unsermake -f Makefile.cvs" instead if you're using unsermake. You should see "*** Finished" message. Then:

 ./configure --enable-debug=full --prefix=`kde-config --prefix`
 perl admin/am_edit  # shouldn't be necessary - why is it needed sometimes?

And finally, if you're using automake, type this to build Kexi and install:

 cd koffice/lib && make && make install
 cd ../kexi && make && make install

or, if you're using unsermake:

 unsermake && unsermake install

(to install you may need root priviledges)

^ toc

Requirements ^ toc

Disk space

  • KOffice source code coming from the Subversion repository is currently about 120MB (the same for the tarball version). kexi/ and lib/ subdirectories alone are 20MB large.
  • A complete build can require even 400MB.
^ toc

Package requirements

Kexi can be built on KDE 3.2 or newer. The kdelibs development files are required to build Kexi, plus the development files for building support for database servers. The kdelibs files may be packaged for your distribution as something like kdelibs-dev or kdelibs-devel.

See the Notes section below for lists of packages required for building on Debian.

If you can tell us which packages are needed to build Kexi on your distribution, please email us

^ toc

Building ^ toc

Building from 'trunk'

'Trunk' is usually used for the latest development version, and this section explains how to build it.

NOTE: trunk is now in transition to KDE4, so could not compile. Please replace every occurence of 'trunk/koffice/' with 'branches/koffice/1.6/koffice/' below.

First, check out a copy from the anonymous subversion server:

 svn co -N svn://anonsvn.kde.org/home/kde/trunk/koffice/
 cd koffice
 svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin
 svn up kexi
 svn up lib

Note that we've not used /trunk/KDE/kde-common/admin, but the KDE 3.5 branch instead, because /trunk/KDE/ is currently assigned for KDE4.

Then build the configure script and Makefiles:

 make -f Makefile.cvs

(use "unsermake -f Makefile.cvs" instead if you're using unsermake)

It might be a good idea to have a quick look at which configuration options are available:

 ./configure --help

Now configure Kexi, using your chosen configure options, e.g.:

 ./configure --enable-debug=full --prefix=`kde-config --prefix`

And finally, if you're using automake, type this to build Kexi and install:

 cd koffice/lib; make; make install
 cd ../kexi; make; make install

or, if you're using unsermake:

 cd koffice/lib && unsermake && unsermake install
 cd ../kexi && unsermake && unsermake install

(to install you may need root priviledges)

^ toc

Managing different versions of Kexi

GNU Stow is useful for keeping several different versions of a program installed and makes swapping between versions easy.

^ toc

Compiling additional components ^ toc

Form Designer

(obsolete) To compile Form Designer (FAQ) as a standalone application, compile and install Kexi as above, then:

 cd kexi/formeditor/test/
 make
 make install

This installs the KFormDesigner program.

^ toc

MS Access Migration Driver

To build the MS Access Migration driver, first ensure that Kexi itself is installed properly and working. Then get the driver's source code and build as follows:

 svn co -N svn://anonsvn.kde.org/home/kde/trunk/kdenonbeta/
 cd kdenonbeta
 svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin
 svn up keximdb
 make -f Makefile.cvs
 ./configure --enable-debug=full --prefix=`kde-config --prefix`

And finally, if you're using automake, type this to build Kexi and install:

 make
 make install

or, if you're using unsermake:

 unsermake
 unsermake install

(to install you may need root priviledges)

You may need to use the --with-kexidb-includes= or --with-kexidb-libraries= configure options.

^ toc

Command line tests

Command line tests are available in the kexi/tests/newapi/ subdirectory. See the README document there for more information.

^ toc

Notes ^ toc

Known problems

  • RedHat / CentOS with KDE3.3; error like:
 ./kexi/kdeinit_kexi.la.cpp:3: error: visibility arg must be one of
 "default", "hidden", "protected" or "internal"
Solution: Login as root and edit /usr/include/kde/kdemacros.h file. Locate this line:
 #define KDE_EXPORT attribute ((visibility("visible")))

and replace it with:

 #define KDE_EXPORT attribute ((visibility("default")))

Then, continue compilation.

^ toc

Compiling and installing Kexi to "nonsystem" KDE directory

The question is: How do I modify my KDEDIRS environment, so that Kexi that I built from Subversion can find all services and mime types and works properly?

Solution: http://mail.kde.org/pipermail/kexi/2005-October/000025.html

^ toc

PostgreSQL support

Support for PostgreSQL servers requires the "pq" C library and "pqxx" library (higher level one utilizing pq).

pq library: We recommend that you use packages for your distribution with the appropriate pq development files.

The following Kexi configure options are available if the configure script cannot find the pq development files:

  • use PostgreSQL(libpq)-includes installed in this directory
 --with-pgsql-includes=DIR
  • use PostgreSQL(libpq)-libraries installed in this directory
 --with-pgsql-libraries=DIR

pqxx library: We recommend that you use packages for your distribution with the appropriate pqxx development files, but you can also compile from source.

If you compile it yourself, note that you'll need the shared pqxx library. By default pqxx is built as a static library, so ensure that when you configure pqxx, you use the --enable-shared option:

 ./configure --enable-shared=yes
 make
 su -c "make install"

The PostgreSQL driver will be compiled only if the shared library (i.e. libpqxx.so, not static libpqxx.a) is found during Kexi configure phase. You will be informed by configure script if the library was not found.

The following Kexi configure options are available if the configure script cannot find the pqxx development files:

  • specify that PostgreSQL(libpqxx) includes are installed in DIR
 --with-pqxx-includes=DIR
  • specify that PostgreSQL(libpqxx) libraries are installed in DIR
 --with-pqxx-libraries=DIR
^ toc

Building Kexi on Debian

For a basic Kexi installation, you should:

 apt-get install build-essential kdelibs4-dev automake1.7 libreadline5-dev

If you want to build with support for PostgreSQL servers, use:

 apt-get install libpqxx-dev

and if you want to build support for MySQL servers, use:

 apt-get install libmysqlclient-dev

Debian packages for Kexi exist, and our Debian packager may have a more recent version here. However, if you want to build your own Debian packages from Subversion, then you will need at least:

 apt-get install debhelper cdbs

The following is useful for developers who want to modify KexiDB's parser:

 apt-get install flex


Kexi - "MS Access for Linux" ... and Windows
© Kexi Team
This content is available under GFDL
Last edited: September 20, 2007 by js, visited 0 times.