0

I work on a github action. I need to compile a programm against a specific qt version. The program is build with qbs. I have a problem to configure qbs such that it uses the correct Qt version. There are two versions installed. The first one is installed with sudo apt-get. It is the version 5.12.8. This version is installed as a dependency of qbs. The second qt is installed with aqt. It is the version 5.15.2.

The github action script is

name: Qbs-Tests
on: push
jobs:
  ubuntu:
    name: "test on ubuntu"
    runs-on: ubuntu-latest
    steps:
      - name: install clang12, qbs, qmake
        run: |
          sudo apt-get update -y
          sudo apt-get install -y clang-12 llvm-12 qbs qt5-qmake
          
      - name: Install Qt
        uses: jurplel/install-qt-action@v2
        with:
          version: 5.15.2

      - name: setup qbs
        run: |
          qbs setup-qt $Qt5_DIR/bin/qmake qt
          qbs config --list profiles
          qbs config defaultProfile qt

But this ist not possible, since I received the error message

Creating profile 'qt'.
You may want to set up toolchain information for the generated Qt profile.
profiles.qt.moduleProviders.Qt.qmakeFilePaths: "/home/runner/work/QSqlMigrator/Qt/5.15.2/gcc_64/bin/qmake"
Cannot mix incompatible Qt library (5.12.8) with this library (5.15.2)

I also tried to ignore the system search path (Only the last line is exchanged). See qbs Doc

qbs config profiles.qt.preferences.ignoreSystemSearchPaths true

But this leads also to the error message

Cannot mix incompatible Qt library (5.12.8) with this library (5.15.2)

Why I am unable to configure the profile? I am even unable to ignore the system path. Where came the libary incompatibility from? I only configure 5.15.2.

SebastianH
  • 734
  • 5
  • 23
  • It looks to me that the problem is not in the qbs itself, but in your system. The message you see comes from Qt library internals. Since Qbs depends on Qt, it prints this error as the runtime loaded when running Qbs differs from the one used when compiling Qbs. You can verify this theory by calling ldd on the qbs binary to see which Qt library it uses. It looks to me that the install script you're using exports Qt libraries to LD_LIBRARY_PATH around here https://github.com/jurplel/install-qt-action/blob/master/src/main.ts#L141 - and it might cause the problem. – ABBAPOH Oct 17 '21 at 09:13
  • I think, you might try simply cleaning LD_LIBRARY_PATH when running Qbs – ABBAPOH Oct 17 '21 at 09:18

0 Answers0