Re: [Interest] how to link my own GLib build to a Qt 6.4 build?

2022-11-09 Thread Dennis Luehring

Am 09.11.2022 um 11:12 schrieb Alexandru Croitor:

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.


this works


mkdir ~/qt6_dev

# 1. build Glib with --prefix
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 --prefix ~/qt6_dev/glib-install
meson compile
meson install

# 2. build Qt with PKG_CONFIG_PATH set

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
PKG_CONFIG_PATH=~/qt6_dev/glib-install/lib/x86_64-linux-gnu/pkgconfig
../qt6/qtbase/configure -debug -opensource -nomake examples -nomake tests
cmake --build . --parallel 2


thanks for your help
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] how to link my own GLib build to a Qt 6.4 build?

2022-11-09 Thread Thiago Macieira
On Wednesday, 9 November 2022 02:01:07 PST Dennis Luehring wrote:
> export LD_LIBRARY_PATH=~/qt6_dev/glib-build/glib:$LD_LIBRARY_PATH

> but configure still finds my systems Glib

You don't need to worry about the configure script. So long as the GLib you 
built is the same version as the system's or newer, that LD_LIBRARY_PATH 
should suffice for *running* the code, which is what matters.

Just make sure you're using a shell that expands ~ after =. As a rule of 
thumb, if the character before ~ isn't a space, write $HOME.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] how to link my own GLib build to a Qt 6.4 build?

2022-11-09 Thread Dennis Luehring

Am 09.11.2022 um 11:12 schrieb Alexandru Croitor:

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  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



thanks for the hints - i will check that
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] how to link my own GLib build to a Qt 6.4 build?

2022-11-09 Thread Alexandru Croitor via Interest
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  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@qt-project.org
> https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest