Skip to content

SEMPR on Ubuntu 18.04

Christoph Tieben edited this page Oct 18, 2019 · 7 revisions

SEMPR on Ubuntu 18.04

based on Issue #41 this page will provide a workaround to compile and run SEMPR on Ubuntu 18.04.

Workaround by ODB upgrade

  • Install ODB Packages regular
  • Upgrade to ODB Package from Ubuntu Disco / Debian Buster
    • wget http://ftp.de.debian.org/debian/pool/main/o/odb/odb_2.4.0-10_amd64.deb
    • sudo dpkg -i odb_2.4.0-10_amd64.deb
    • rm odb_2.4.0-10_amd64.deb
  • Install GCC8 and set it as default compiler, see
    • sudo apt-get install gcc-8 g++-8
    • sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8

As alternative to GCC 8 as default compiler you could change it manual by sudo update-alternatives --config gcc or set it only in this cmake project as compiler like in the downgrade workaround below.

Workaround by ODB downgrade

  • Downgrade to Xenia ODB Package
    • wget http://de.archive.ubuntu.com/ubuntu/pool/universe/o/odb/odb_2.4.0-4build1_amd64.deb
    • sudo dpkg -i odb_2.4.0-4build1_amd64.deb
    • sudo apt-mark hold odb
    • rm odb_2.4.0-4build1_amd64.deb
  • Install GCC5
    • sudo apt-get install gcc-5 g++-5
  • Set ODB GCC Plugin to GCC5
    • Add list(APPEND ODB_ARGS -x "${CMAKE_CXX_COMPILER}") to the UseODB.cmake (see here)
  • Configure CMake for the GGC5 Compiler
    • cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-5 -DCMAKE_CXX_COMPILER=/usr/bin/g++-5 ...

Issues

Loading shared Libs

Even if you could found soprano and sempr by pkg-config --libs * its possible that ld will not found the shared libraries and you will get a message like this:

error while loading shared libraries: libsoprano.so.5: cannot open shared object file: No such file or directory

To fix this you also have to set the LD_LIBRARY_PATH environment variable. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/soprano_qt5/install/lib/

Other Distribution`s

  • Debian (9) Stretch - Will not work (ODB Pragma Type Error)
  • Debian (10) Buster - Worked with soprano_qt5 and gcc 8 with odb 2.4.0-10 - without this workaround (old Buster issue seems to be fixed)
  • Arch - Will not work (Broken ODB AUR Package - Selfcompiled will throw Seg Fault)
  • Ubuntu 19.10 - Worked with soprano_qt5 and gcc 9 with odb 2.4.0-12 - without this workaround