Qt6 + GStreamer
-
Hi All!
Apologies if this has been addressed elsewhere.
I'm trying to display an RTSP stream using a gstreamer pipeline within QML in Ubuntu 24.04. I'm using Qt 6.8 but open to going to 6.9, if that's better for this application.
I'm currently stuck at a very basic level - I'm trying to build the gstreamer plug-ins for qt6 and can't get it to recognize the Qt installation that I want it to use. Qt installed to my
home
folder (~/
), which I'm fine with, but the meson setup isn't finding it (and it's finding some other qt6 which I'm honestly not sure how that got there). I've tried setting environment variables, but it's not clear to me which I need to set. Here is the actual error from the meson setup:gst-plugins-good| Detecting Qt6 tools gst-plugins-good| Run-time dependency qt6 (modules: Core) found: YES 6.4.2 (pkg-config) gst-plugins-good| Program /usr/lib/qt6/bin/moc found: NO gst-plugins-good| Program /usr/lib/qt6/libexec/moc found: YES 6.4.2 6.4.2 (/usr/lib/qt6/libexec/moc) gst-plugins-good| Program /usr/lib/qt6/bin/lrelease found: NO gst-plugins-good| Program /usr/lib/qt6/libexec/lrelease found: NO gst-plugins-good| Program lrelease6 found: NO gst-plugins-good| Program lrelease-qt6 found: NO gst-plugins-good| Program lrelease found: NO gst-plugins-good| Program /usr/lib/qt6/bin/rcc found: NO gst-plugins-good| Program /usr/lib/qt6/libexec/rcc found: YES 6.4.2 6.4.2 (/usr/lib/qt6/libexec/rcc) gst-plugins-good| Program /usr/lib/qt6/bin/uic found: NO gst-plugins-good| Program /usr/lib/qt6/libexec/uic found: YES 6.4.2 6.4.2 (/usr/lib/qt6/libexec/uic) gst-plugins-good| Program /usr/lib/qt6/bin/qmlcachegen found: NO gst-plugins-good| Program /usr/lib/qt6/libexec/qmlcachegen found: NO gst-plugins-good| Program qmlcachegen6 found: NO gst-plugins-good| Program qmlcachegen-qt6 found: NO gst-plugins-good| Program qmlcachegen found: NO gst-plugins-good| Program /usr/lib/qt6/bin/qmltyperegistrar found: NO gst-plugins-good| Program /usr/lib/qt6/libexec/qmltyperegistrar found: NO gst-plugins-good| Program qmltyperegistrar6 found: NO gst-plugins-good| Program qmltyperegistrar-qt6 found: NO gst-plugins-good| Program qmltyperegistrar found: NO gst-plugins-good| qmake6 found: YES (/usr/bin/qmake6) 6.4.2 gst-plugins-good| Could not find: Qml Qt6Qml in /usr/lib/x86_64-linux-gnu gst-plugins-good| Run-time dependency qt6 (modules: Core, Gui, Qml, Quick) found: NO (tried pkgconfig and config-tool) subprojects/gst-plugins-good/ext/qt6/meson.build:86:13: ERROR: Dependency "qt6" not found, tried pkgconfig and config-tool
Here is the full log:
----------- Called: `/usr/bin/pkg-config --variable=includedir Qt6Core` -> 0 stdout: /usr/include/x86_64-linux-gnu/qt6 ----------- Got pkg-config variable includedir : /usr/include/x86_64-linux-gnu/qt6 Determining dependency 'Qt6Gui' with pkg-config executable '/usr/bin/pkg-config' env[PKG_CONFIG_PATH]: env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --modversion Qt6Gui` -> 0 stdout: 6.4.2 ----------- env[PKG_CONFIG_PATH]: env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --cflags Qt6Gui` -> 0 stdout: -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6 -DQT_GUI_LIB -I/usr/include/x86_64-linux-gnu/qt6/QtCore -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ ----------- env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1 env[PKG_CONFIG_PATH]: env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --libs Qt6Gui` -> 0 stdout: -L/usr/lib/x86_64-linux-gnu -lQt6Gui -lQt6Core ----------- env[PKG_CONFIG_PATH]: env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --libs Qt6Gui` -> 0 stdout: -lQt6Gui -lQt6Core ----------- env[PKG_CONFIG_PATH]: env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --variable=includedir Qt6Gui` -> 0 stdout: /usr/include/x86_64-linux-gnu/qt6 ----------- Got pkg-config variable includedir : /usr/include/x86_64-linux-gnu/qt6 Determining dependency 'Qt6Qml' with pkg-config executable '/usr/bin/pkg-config' env[PKG_CONFIG_PATH]: env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --modversion Qt6Qml` -> 1 stderr: Package Qt6Qml was not found in the pkg-config search path. Perhaps you should add the directory containing `Qt6Qml.pc' to the PKG_CONFIG_PATH environment variable Package 'Qt6Qml', required by 'virtual:world', not found ----------- detected Qt6 6.4.2 pkg-config dependency does not have proper tools support, ignoring qmake6 binary missing from cross or native file, or env var undefined. Trying a default qmake6 fallback at qmake6 Trying a default qmake6 fallback at qmake-qt6 Trying a default qmake6 fallback at qmake qmake6 found: YES (/usr/bin/qmake6) 6.4.2 ----------- Called: `/usr/bin/qmake6 -query` -> 0 stdout: QT_SYSROOT: QT_INSTALL_PREFIX:/usr QT_INSTALL_ARCHDATA:/usr/lib/x86_64-linux-gnu/qt6 QT_INSTALL_DATA:/usr/share/qt6 QT_INSTALL_DOCS:/usr/share/qt6/doc QT_INSTALL_HEADERS:/usr/include/x86_64-linux-gnu/qt6 QT_INSTALL_LIBS:/usr/lib/x86_64-linux-gnu QT_INSTALL_LIBEXECS:/usr/lib/qt6/libexec QT_INSTALL_BINS:/usr/lib/qt6/bin QT_INSTALL_TESTS:/usr/tests QT_INSTALL_PLUGINS:/usr/lib/x86_64-linux-gnu/qt6/plugins QT_INSTALL_QML:/usr/lib/x86_64-linux-gnu/qt6/qml QT_INSTALL_TRANSLATIONS:/usr/share/qt6/translations QT_INSTALL_CONFIGURATION: QT_INSTALL_EXAMPLES:/usr/lib/x86_64-linux-gnu/qt6/examples QT_INSTALL_DEMOS:/usr/lib/x86_64-linux-gnu/qt6/examples QT_HOST_PREFIX:/usr QT_HOST_DATA:/usr/lib/x86_64-linux-gnu/qt6 QT_HOST_BINS:/usr/lib/qt6/bin QT_HOST_LIBEXECS:/usr/lib/qt6/libexec QT_HOST_LIBS:/usr/lib/x86_64-linux-gnu QMAKE_SPEC:linux-g++ QMAKE_XSPEC:linux-g++ QMAKE_VERSION:3.1 QT_VERSION:6.4.2 ----------- Could not find: Qml Qt6Qml in /usr/lib/x86_64-linux-gnu Run-time dependency qt6 (modules: Core, Gui, Qml, Quick) found: NO (tried pkgconfig and config-tool) subprojects/gst-plugins-good/ext/qt6/meson.build:86:13: ERROR: Dependency "qt6" not found, tried pkgconfig and config-tool
This is the meson command I'm running at the root level of the gstreamer repository:
meson setup -Dgood=enabled -Dgst-plugins-good:qt6=enabled -Dintrospection=disabled builddir
I did some rooting around in the forum and saw related topics but wasn't able to piece everything together.
Which environment variables should I be setting, and which folder(s) should I be pointing to within the Qt folder?
Thanks in advance! Let me know if I'm missing any useful details here.
-
Okay, I figured out that I can enter these commands and get a bit further along in the setup:
export PKG_CONFIG_PATH=~/Qt/6.9.0/gcc_64/lib/pkgconfig/:$PKG_CONFIG_PATH export PATH=~/Qt/6.9.0/gcc_64/bin/:$PATH
but now I'm getting this error:
ERROR: Problem encountered: qt6 qmlglsink plugin is enabled, but qt specific tools were not found
-
Hi and welcome to devnet,
What does the rest of the cmake log says about finding Qt and these tools ?
-
Hi and thanks for the welcome! Here is what the log says.
A very important piece of information I neglected to include earlier is that I'm currently trying to get this to work on Ubuntu 24.04 on WSL. I was previously working on a Linux computer but switched over to WSL (temporarily) after I bricked some of the graphical drivers on the Linux computer. I can do a fresh Ubuntu 24.04 install on that computer and switch back over if it is important for me to do so.
I think I also discovered last night that Ubuntu 24.04 ships with its own Qt, which is the 6.4.2 version that the meson tool was finding?
CMake binary for host machine is cached. Preliminary CMake check failed. Aborting. Run-time dependency libiec61883 found: NO (tried pkgconfig and cmake) Detecting Qt6 tools Determining dependency 'Qt6Core' with pkg-config executable '/usr/bin/pkg-config' env[PKG_CONFIG_PATH]: /home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig:/home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig/ env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --modversion Qt6Core` -> 0 stdout: 6.9.0 ----------- env[PKG_CONFIG_PATH]: /home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig:/home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig/ env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --cflags Qt6Core` -> 0 stdout: -I/home/qt/work/install/include/QtCore -I/home/qt/work/install/include -DQT_CORE_LIB -I/home/qt/work/install/mkspecs/linux-g++ ----------- env[PKG_CONFIG_PATH]: /home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig:/home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig/ env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1 env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --libs Qt6Core` -> 0 stdout: -L/home/qt/work/install/lib -lQt6Core ----------- env[PKG_CONFIG_PATH]: /home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig:/home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig/ env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --libs Qt6Core` -> 0 stdout: -L/home/qt/work/install/lib -lQt6Core ----------- env[PKG_CONFIG_PATH]: /home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig:/home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig/ env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --variable=bindir Qt6Core` -> 0 stdout: /home/qt/work/install/bin ----------- Got pkg-config variable bindir : /home/qt/work/install/bin env[PKG_CONFIG_PATH]: /home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig:/home/eileen/Qt/6.9.0/gcc_64/lib/pkgconfig/ env[PKG_CONFIG]: /usr/bin/pkg-config ----------- Called: `/usr/bin/pkg-config --variable=libexecdir Qt6Core` -> 0 stdout: /home/qt/work/install/libexec ----------- Got pkg-config variable libexecdir : /home/qt/work/install/libexec Run-time dependency qt6 (modules: Core) found: YES 6.9.0 (pkg-config) Program /home/qt/work/install/bin/moc found: NO Program /home/qt/work/install/libexec/moc found: NO Program moc6 found: NO Program moc-qt6 found: NO Program moc found: NO Program /home/qt/work/install/bin/qmlcachegen found: NO Program /home/qt/work/install/libexec/qmlcachegen found: NO Program qmlcachegen6 found: NO Program qmlcachegen-qt6 found: NO Program qmlcachegen found: NO Program /home/qt/work/install/bin/qmltyperegistrar found: NO Program /home/qt/work/install/libexec/qmltyperegistrar found: NO Program qmltyperegistrar6 found: NO Program qmltyperegistrar-qt6 found: NO Program qmltyperegistrar found: NO Program /home/qt/work/install/bin/rcc found: NO Program /home/qt/work/install/libexec/rcc found: NO Program rcc6 found: NO Program rcc-qt6 found: NO Program rcc found: NO Program /home/qt/work/install/bin/uic found: NO Program /home/qt/work/install/libexec/uic found: NO Program uic6 found: NO Program uic-qt6 found: NO Program uic found: NO Program /home/qt/work/install/bin/lrelease found: NO Program /home/qt/work/install/libexec/lrelease found: NO Program lrelease6 found: NO Program lrelease-qt6 found: NO Program lrelease found: YES 6.9.0 6.9.0 (/home/eileen/Qt/6.9.0/gcc_64/bin/lrelease) subprojects/gst-plugins-good/ext/qt6/meson.build:81:4: ERROR: Problem encountered: qt6 qmlglsink plugin is enabled, but qt specific tools were not found
-
I think if I could get to where this user did, with being able to run the example code, I'd be pretty happy:
-
Are you setting the
CMAKE_PREFIX_PATH
variable to point to the Qt version you want to use ?