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.

asked Oct 12, 2021 at 12:29
2
  • 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 github.com/jurplel/install-qt-action/blob/master/src/… - and it might cause the problem. Commented Oct 17, 2021 at 9:13
  • I think, you might try simply cleaning LD_LIBRARY_PATH when running Qbs Commented Oct 17, 2021 at 9:18

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.