Menu

Installation from source

Dirk Krause
← Previous ↑ Home ↑ Installation Next →

Install DK tools from source on Linux/Unix

Download DK tools

The software is available from the Download area on the SourceForge project page.

Download the dktools-x.y.z.tar.gz from the directory indicating the highest (most recent) version number.


Unpack the software

tar xzf dktools-x.y.z.tar.gz
cd dktools-x.y.z

Requirements

Required tools

C compiler, C++ compiler, linker and the make program are needed.

The table lists the required and recommended libraries and the package names used on some Linux distributions.
Zlib, libpng and OpenSSL are required.

Program / Library Debian EL Fedora
zlib
http://www.zlib.net/
zlib1g-dev zlib-devel zlib-devel
libpng
http://www.libpng.org/pub/png/libpng.html
libpng-dev libpng-devel libpng-devel
OpenSSL
http://www.openssl.org/
libssl-dev openssl-devel openssl-devel
bzip2
https://sourceware.org/bzip2/
libbz2-dev bzip2-devel bzip2-devel
jpeg
http://www.ijg.org/
libjpeg-dev libjpeg-turbo-devel libjpeg-turbo-devel
libtiff
http://www.remotesensing.org/libtiff/
libtiff-dev libtiff-devel libtiff-devel
Berkeley DB
http://www.oracle.com/database/berkeley-db/
libdb-dev db4-devel libdb-devel
MySQL / MariaDB
https://dev.mysql.com   https://mariadb.org
libmariadb-dev mysql-devel mariadb-devel
mariadb-connector-c-devel
NetSNMP
http://www.sourceforge.net/projects/net-snmp/
libsnmp-dev net-snmp-devel net-snmp-devel
wxWidgets
http://www.wxwidgets.org/
libwxgtk3.2-dev
wx3.2-headers
wxGTK-devel wxBase3-devel
wxGTK3-devel

Use package management to install required tools and libraries

Debian

As root run:

scripts/debian-prepare

Enterprise Linux

As root run:

scripts/el8-prepare

Fedora

As root run:

scripts/fedora39-prepare

The script is intended for Fedora 38 and later.


Generic installation from source

After unpacking the download archive change into the new directory and run:

./configure
make
make install

This installs the software into the /usr/local directory.

See [Configure script options] or run

./configure --help

to see the options supported by the configure script.


Special build types

Static build of DK libraries

Run

./configure --enable-static --disable-shared
make
make install

to build static libraries only.

Static build without developer support

Run

./configure --enable-static --disable-shared --disable-devel
make
make install

to build and install the programs only, do not install header files and libraries.

Build to create packages manually

Run

./configure --enable-packaging --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
make DESTDIR=/tmp/dktools install

to create a build as it would go into a package.
On some systems you should also provide --libdir=... and --libexecdir=... to configure.


Installation using GNU stow

GNU stow can be referred to as "something like a package management for /usr/local"

Although the GNU Stow homepage contains a good documentation I recommend to read Using GNU Stow to manage source installs by Danie Roux first.

Install GNU stow

For most Linux distributions GNU stow is available as a package.

Create Stow directory

mkdir -p /usr/local/stow
chmod 755 /usr/local/stow

Set environment variable STOW_DIR

export STOW_DIR="/usr/local/stow"

You might want to include the instruction above into the /etc/profile.d/stow.sh file, log out and log back in to have the variable available in all terminal windows.

Build and install the software

./configure
make
make install prefix=/usr/local/stow/dktools-x.y.z

Instead of x.y.z use the version number.

cd /usr/local/stow
stow --no-folding dktools-x.y.z

Instead of x.y.z use the version number.

To get the package out of the PATH or before removing the /usr/local/stow/dktools-x.y.z directory, you should remove the symbolic links:

stow --no-folding --delete dktools-x.y.z

Instead of x.y.z use the version number.

← Previous ↑ Home ↑ Installation Next →

Related

Wiki: Configure script options
Wiki: Installation

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.