Dclib and valknut compile instructions


Dclib and valknut use standard GNU autotools for the build: "./configure" then "make" then "make install".

To be able to compile dclib, you need the development files for bzip2, zlib, libxml2 and optionally OpenSSL.

An iconv function is also required, that is in glibc on Linux so is always available. Other systems might need GNU libiconv.

On Fedora, these packages are called bzip2-devel, zlib-devel, libxml2-devel and openssl-devel.

On Suse 10, I believe they are called bzip2, libxml2-devel openssl-devel. I don't know what zlib-devel is called here but it is required by libxml2-devel anyway.

On Debian, I think they are libbz2-dev, zlib1g-dev, libxml2-dev and libssl-dev.

The Qt3 version of valknut requires Qt 3.3, qt3-devel / libqt3-dev.

The Qt4 version requres Qt 4.3 or higher, including the Qt3Support library, qt-devel / libqt4-dev.

You should install these packages using your distribution's package management tool, e.g. "yum install qt3-devel" on Fedora or "apt-get install libqt3-dev" on Debian.

You will also need a c++ compiler and GNU make (run gmake on non-linux systems such as FreeBSD), these should automatically be installed when you install the above packages, and are usually installed on most linux distributions.

Starting with 0.3.19, for a single build you do not even need to run "make install" for dclib anymore if you use --enable-static --disable-shared.

If you want to install both Qt3 and Qt4 valknut you must specify a different prefix for one.

Problems with dclib as static?

The combination of Qt 4.4.1 and static dclib just crashed very early on, shortly before dclib 0.3.21 was released.

Since dclib is normally tested as a shared library, installing it in this format is best. If you install dclib to a non-standard directory you should be able to make valknut find it by adding rpath to CXXFLAGS:

./configure --prefix=/home/ejs/dclib-0.3.21/qt4 CXXFLAGS="$CXXFLAGS -Wl,-rpath,/home/ejs/dclib-0.3.21/lib" PKG_CONFIG_PATH="/home/ejs/dclib-0.3.21/lib/pkgconfig"

Update: When I built valknut-0.4.8pre1 rpath was added automatically, only PKG_CONFIG_PATH should be required.

Configure Options

Configuring dclib

Configuring valknut


How 0.4.8pre1 was built

For dclib:

$ ./configure --prefix=/home/ejs/dclib-0.3.22pre1 --enable-debug
$ make
$ make install

And then Qt4 valknut:

$ ./configure --prefix=/home/ejs/dclib-0.3.22pre1/qt4 --enable-debug --enable-pretend-command PKG_CONFIG_PATH=/home/ejs/dclib-0.3.22pre1/lib/pkgconfig
$ make
$ make install

The Qt4 valknut binary is now at /home/ejs/dclib-0.3.22pre1/qt4/bin/valknut using /home/ejs/dclib-0.3.22pre1/lib/libdc-0.3.22pre1.so for dclib (rpath added automatically during build).

Compilation Problems?

Old versions may have not built correctly if headers or libraries from older dclib versions were present, but that is no longer supposed to happen. Running configure from a different directory than the one it is in is also supposed to work now.

If you run ./configure CPPFLAGS="-H" then the name of each file included will be printed out during make, so you can see if any wrong headers are being used.

If you are building an old dclib version you may still need to remove old dclib headers (the dclib folder in include) and libraries (libdc.la libdc.a libdc.so). Newer dclib versions install their headers into dclib-0.3, so that they are not found during dclib build.