Introduction to Qca

Qca aims to provide a straightforward and cross-platform crypto API, using Qt datatypes and conventions. Qca separates the API from the implementation, using plugins known as Providers.

This package is known to build and work properly using an LFS-7.7 systemd platform.

Package Information

Qca Dependencies


CMake-3.4.0 and Qt-4.8.7



Cyrus SASL-2.1.26, GnuPG-2.1.7, libgcrypt-1.6.4, NSS-3.20, OpenSSL-1.0.2d, Qt-5.5.0, Botan and pkcs11-helper



Even though this package can be built against Qt5, the instructions below don't cover such installation because the changes needed to the instructions below are too invasive. If you need Qt5 version of the library, check the "KDE Frameworks 5" chapter for instructions.

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/qca

Installation of Qca

First, silence a lot of warnings caused by using the latest toolchain by running the following command:

sed -i "/BSD_SOURCE/d" CMakeLists.txt

Install Qca by running the following commands:

mkdir build &&
cd    build &&

      -DCMAKE_BUILD_TYPE=Release  \
      -DQT4_BUILD=ON              \
      -DQCA_DOC_INSTALL_DIR=/usr/share/doc/qca-2.1.0            \
      -DQCA_FEATURE_INSTALL_DIR=/usr/share/qt4/mkspecs/features \
      -DQCA_INCLUDE_INSTALL_DIR=/usr/include/qt4                \
      -DQCA_PRIVATE_INCLUDE_INSTALL_DIR=/usr/include/qt4        \
      -DQCA_PLUGINS_INSTALL_DIR=/usr/lib/qt4/plugins            \
      -Wno-dev .. &&


To test the results, issue make test.

Now, as the root user:

make install

If Qt4 isn't installed in /usr, ensure it can properly find the modules installed by this package by running the following commands as the root user:

if [[ ${QT4DIR} != "/usr" ]]
   ln -sfv /usr/include/qt4/QtCrypto                  \
           ${QT4DIR}/include/qt4/                     &&
   ln -sfv /usr/share/qt4/mkspecs/features/crypto.prf \
           ${QT4DIR}/share/qt4/mkspecs/features/      &&

   install -v -dm755 ${QT4DIR}/lib/qt4/plugins/crypto &&

   for file in /usr/lib/qt4/plugins/crypto/*
       ln -sfv ${file} ${QT4DIR}/lib/qt4/plugins/crypto/
   done &&

   unset file


If you upgrade Qt4 per BLFS instructions, make sure you re-run the commands above.

Command Explanations

-DCMAKE_BUILD_TYPE=Release: This switch is used to apply higher level of the compiler optimizations.

-DQT4_BUILD=ON: This switch is used to ensure that Qt4 version of the library is built even if Qt5 is present.

-DQCA_*_INSTALL_DIR=...: These switches are used to ensure that files depending on the Qt4 installation prefix are installed in the correct locations.


Installed Programs: mozcerts and qcatool
Installed Libraries: libqca.so
Installed Directories: /usr/include/qt4/QtCrypto, /usr/lib/cmake/Qca, /usr/lib/qt4/plugins/crypto and, depending on the Qt4 installation prefix, $QT4DIR/include/qt4/QtCrypto and $QT4DIR/lib/qt4/plugins/crypto

Short Descriptions


is a command line tool for converting certdata.txt into outfile.pem files.


is a command line tool for performing various cryptographic operations with Qca.


is the Qt Cryptography Architecture (Qca) library.

Last updated on 2014-10-26 16:35:43 +0100