Skip to content

Building, installing and using

Ivailo Monev edited this page Dec 22, 2019 · 255 revisions

Status

Build Status

The following tests are known to fail:

  • tst_qchar (2 tests, 1 test depends on ICU normalization support)
  • tst_qsettings (1 test, possible null-terminator in the middle of string issue)
  • tst_qsqldatabase (InnoDB assertion failure in Travis)

Requirements

The following software is required to build the project:

The following software is recommended:

*The software mentioned has know alternative(s) which is also supported, such as LibreSSL which is almost a drop-in replacement for OpenSSL, JPEG 9 as an alternative to libjpeg-turbo, iODBC as an alternative to UnixODBC or MariaDB as an alternative to MySQL.

Building

  • Learn how to take advantage of the flexible build system
  • If performance matters build with Release as CMAKE_BUILD_TYPE, KATIE_ALLINONE set to ON, -DQT_NO_EXCEPTIONS=1 argument to CMake and -ffast-math -fno-exceptions in CXXFLAGS
  • If size matters build with MinSizeRel as CMAKE_BUILD_TYPE, -DQT_NO_EXCEPTIONS=1 argument to CMake and -flto -fno-exceptions in CXXFLAGS
  • If time and disk space for building matters build with KATIE_ALLINONE set to ON
  • Create packages via cpack, make package or a native package via the provided package files for various distributions

⚠️ KATIE_ALLINONE build option will raise the memory required for building the GUI component to 2Gb (if not more) when the build type is RelWithDebInfo (which is the default) and even more when it is Debug

⚠️ Setting CMAKE_SKIP_RPATH to FALSE when configuring releases prior to 4.9.0-rc16 can cause the tools which are run during the build stage (moc, uic, rcc and lrelease) to misbehave if Katie is already installed on the system and if the version you are going to build is not binary compatible with the version installed which may be the case when building with different options or optimization (including LTO).

git clone --depth=1 git://github.com/fluxer/katie
cd katie
ln -sv package/debian .
dpkg-buildpackage -nc -b --no-sign
sudo dpkg -i ../katie-git*.deb
git clone --depth=1 git://github.com/fluxer/katie
cd katie/package/archlinux
makepkg -s
sudo pacman -U katie-git*.pkg.tar.xz

other UNIX-like system

git clone --depth=1 git://github.com/fluxer/katie
mkdir -pv katie/build
cd katie/build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DKATIE_SETTINGS_FULL=/etc/xdg -DKATIE_LDCONF_FULL=/etc/ld.so.conf.d -DKATIE_PROFILE_FULL=/etc/profile.d
make 
sudo make install

Cross-building (WIP)

sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install crossbuild-essential-armhf

git clone --depth=1 git://github.com/fluxer/katie
cd katie
ln -sv package/debian .
sudo apt-get build-dep -a armhf .
dpkg-buildpackage -nc -b --no-sign -a armhf
sudo dpkg -i ../katie-git*.deb

Post installation

  • Run sudo ldconfig so that the libraries paths are cached, systems using musl libc, uClibc or uClibc-ng do not require this step
  • Logout and login so that the project specific Shell profile file has effect, note that the file requires the Shell to be login or the profile file to be sourced from the Shell specific config (e.g. ~/.bashrc or ~/.ashrc)

Using

  • Watch out for tools/scripts that alter environmental variables (e.g. sudo) such as PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH and ensure that the binaries, libraries, etc. can be located by other projects in the environment you will be building and using them:
echo $PATH
echo $LD_LIBRARY_PATH
echo $PKG_CONFIG_PATH

If the project files are no installed in one of the locations printed by the code above or the fallback that is used (empty means fallback, e.g set when building Bash, GNU libc, pkg-config) then you will have to tinker with your system.

  • Verify the installation:
echo '#include <QDebug>

QT_USE_NAMESPACE

int main()
{
    qDebug() << "<insert kool joke here>";
    return 0;
}' > kk.cpp
g++ kk.cpp $(pkg-config --cflags --libs KtCore) -std=c++11 -o kk
./kk
  • Report any issues and suggestions you may have

Clone this wiki locally