Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-108783

own build DBus lib is not recognised using PKG_CONFIG_PATH

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.4.1
    • Build System: CMake
    • None
    • fresh & up to date Ubuntu 22.04
    • Linux/Wayland

    Description

      I'm building DBus lib from source with Thread-Sanitizer (TSAN) support to reduce the possibility for false-positives.

      I'm using the PKG_CONFIG_PATH environment var to let cmake know what dbus library to select but that does not work – cmake always selects the systems dbus library.

      Currently I'm forcing my example code to use my dbus build using LD_LIBRARY_PATH on start.
      Using PKG_CONFIG_PATH path for a self-built Glib does work out of the box and Qt builds with a dependency to my Glib build, also my example is using my glib without any LD_LIBRARY_PATH magic.

       

      im building DBus with these steps

      cd ~/qt6_dev
      git clone https://github.com/freedesktop/dbus.gitcd dbus
       git checkout dbus-1.12.20
       cd ..
       mkdir dbus-build
       cd dbus-build
       PKG_CONFIG_PATH=~/qt6_dev/glib-install/lib/x86_64-linux-gnu/pkgconfig
       cmake ../dbus/cmake -DCMAKE_INSTALL_PREFIX=~/qt6_dev/dbus-install
       -DCMAKE_CXX_FLAGS="-g -fno-omit-frame-pointer -fsanitize=thread"-DCMAKE_C_FLAGS="-g -fno-omit-frame-pointer -fsanitize=thread"-DCMAKE_EXE_LINKER_FLAGS="-fno-omit-frame-pointer -fsanitize=thread"-DCMAKE_MODULE_LINKER_FLAGS="-fno-omit-frame-pointer -fsanitize=thread"cmake --build . --parallel 6
       cmake --install .

      and the used Glib with these steps

      cd ~/qt6_dev
       git clone https://gitlab.gnome.org/GNOME/glib.gitcd glib
       git checkout 2.72.1
       cd ..
       mkdir glib-build
       cd glib-build
       meson setup ../glib -Dbuildtype=debug -Db_sanitize=thread --prefix
       ~/qt6_dev/glib-install
       meson compile
       meson install

       

      This also happens with Qt dev branch.
      I think it could be related to QTBUG-86283.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtbuildsystem Qt Build System Team
              llm Dennis Lühring
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes