[Interest] how to link my own GLib build to a Qt 6.4 build?
Alexandru Croitor
alexandru.croitor at qt.io
Wed Nov 9 11:12:52 CET 2022
Hi,
Qt find glib2 using this code https://github.com/qt/qtbase/blob/dev/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake
which uses pkg-config underneath.
According to https://askubuntu.com/questions/210210/pkg-config-path-environment-variable
you can try setting the PKG_CONFIG_PATH env variable to the location of your newly installed glib.
According to https://cmake.org/cmake/help/latest/module/FindPkgConfig.html#variable:PKG_CONFIG_USE_CMAKE_PREFIX_PATH
it should be also possible to add a path to the CMAKE_PREFIX_PATH cache var, which will be treated as an extra pkg-config prefix. You would pass it to configure like ./qtbase/configure -debug -- -DCMAKE_PREFIX_PATH=/some/path
So i would play around with those alternatives.
> On 9. Nov 2022, at 11:01, Dennis Luehring <dl.soluz at gmx.net> wrote:
>
> i want to test building with TSAN that means i should also build Glib
> with TSAN
> - that works but i can't make the Qt 6.4 configure to use my own Glib built
>
> the are my build-steps (without TSAN currently)
>
> mkdir ~/qt6_dev
>
> building Glib
>
> cd ~/qt6_dev
> git clone https://gitlab.gnome.org/GNOME/glib.git
> cd glib
> git checkout 2.72.1
> cd ..
> mkdir glib-build
> cd glib-build
> meson setup ../glib -Dbuildtype=debug
> meson compile
>
> builds the Glib library without problems
>
> then i try to make my Glib visible to Qt configure using
>
> export LD_LIBRARY_PATH=~/qt6_dev/glib-build/glib:$LD_LIBRARY_PATH
>
> cd ~/qt6_dev
> git clone git://code.qt.io/qt/qt5.git qt6
> cd qt6
> git checkout v6.4.0
> perl init-repository
> cd ..
> mkdir qt6-build
> cd qt6-build
> ../qt6/qtbase/configure -debug -opensource -nomake examples -nomake tests
> cmake --build . --parallel 2
>
> but configure still finds my systems Glib
>
> -- Found GLIB2: /usr/lib/x86_64-linux-gnu/libglib-2.0.so
>
> is there a configure setting to select a different Glib?
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
More information about the Interest
mailing list