[libcamera-devel] [PATCH v2 1/3] apps: qcam: Port to Qt 6

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Jun 26 14:26:31 CEST 2024


On Wed, Jun 26, 2024 at 10:16:41AM +0300, Laurent Pinchart wrote:
> On Mon, Jun 24, 2024 at 02:15:22PM +0100, Kieran Bingham wrote:
> > Quoting Neal Gompa (2024-06-23 08:10:06)
> > > On Wed, May 15, 2024 at 1:13 AM Neal Gompa wrote:
> > > > On Mon, Apr 22, 2024 at 5:31 AM Kieran Bingham wrote:
> > > > > Quoting Neal Gompa via libcamera-devel (2024-01-21 22:39:53)
> > > > > > Open source Qt 5 has been effectively end of life since the release
> > > > > > of Qt 6, and Qt 6 has current LTS releases now.
> > > > > >
> > > > > > This change ports qcam to Qt 6.2 and drops some of the baggage related
> > > > > > to Qt 5 that is no longer applicable.
> > > > >
> > > > > It seems that the upgrade to Qt6 also breaks the positioning of the 'No
> > > > > Image' background in qcam when you stop the camera.
> > > > >
> > > > > Could you check that please?
> > > >
> > > > Sorry it took me a while to get back to this, but I could not
> > > > reproduce this issue.
> > > >
> > > > Here's what I see: https://i.imgur.com/6YMrBWm.png
> > 
> > I don't know what happened with my previous testing of the image
> > centering, but I can't reproduce it now either so lets assume that was
> > just a problem somewhere between my keyboard and chair :D
> > 
> > > Ping to get this patch landed. It's been six months now...
> > 
> > Well - before we were gated by the fact that we still had to support
> > Ubuntu 22.04 LTS while it was current...
> > 
> > Retesting now...
> > 
> > sudo apt-get install libtiff-dev qt6-base-dev qt6-tools-dev-tools
> > qt6-tools-dev-tools is already the newest version (6.2.4-1).
> > libtiff-dev is already the newest version (4.3.0-6ubuntu0.9).
> > qt6-base-dev is already the newest version (6.2.4+dfsg-2ubuntu1.1).
> > 
> > Run-time dependency qt6 (modules: Core, Gui, OpenGL, OpenGLWidgets, Widgets) found: NO (tried pkgconfig)
> > 
> > src/apps/qcam/meson.build:4:10: ERROR: Dependency "qt6" not found, tried pkgconfig
> > 
> > Checking the meson-log:
> > 
> > env[PKG_CONFIG]: /usr/bin/pkg-config
> > -----------
> > Called: `/usr/bin/pkg-config --modversion Qt6Core` -> 1
> > stderr:
> > Package Qt6Core was not found in the pkg-config search path.
> > Perhaps you should add the directory containing `Qt6Core.pc'
> > to the PKG_CONFIG_PATH environment variable
> > No package 'Qt6Core' found
> > -----------
> > detected Qt6 None pkg-config dependency does not have proper tools support, ignoring
> > Run-time dependency qt6 (modules: Core, Gui, OpenGL, OpenGLWidgets, Widgets) found: NO (tried pkgconfig)
> > 
> > src/apps/qcam/meson.build:4:10: ERROR: Dependency "qt6" not found, tried pkgconfig
> > 
> > Argh ... so Ubuntu-22.04 is still broken... But 'perhaps' we can ignore
> > that if 22.04 is no longer supported - except it breaks /my/ build/usage
> > of qcam :-(
> 
> Ubuntu 24.04 has just been released, and 22.04 has standard support
> until April 2027. I'd like to support it for a bit longer *if possible*,
> at least to give users some more time to upgrade.
> 
> Is there a way to get the Qt 6 pkgconfig fix backported to Ubuntu 22.04,
> or is that a pipe dream ?

Additionally, I'm getting the following error with clang-17:

clang++-17 -Isrc/apps/qcam/qcam.p -Isrc/apps/qcam -I../../src/apps/qcam -Iinclude -I../../include -Iinclude/libcamera -I/usr/include/webp -I/usr/include/qt6/QtCore -I/usr/include/qt6 -I/usr/lib64/qt6/mkspecs/linux-g++ -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtOpenGL -I/usr/include/qt6/QtOpenGLWidgets -I/usr/include/qt6/QtWidgets -fdiagnostics-color=always -fsanitize=address -fno-omit-frame-pointer -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c++17 -O0 -g -stdlib=libc++ -Wextra-semi -Wthread-safety -Wshadow -include /home/laurent/src/iob/oss/libcamera/libcamera/build/x86-clang-17/config.h -Wno-c99-designator -DQT_OPENGLWIDGETS_LIB -DQT_WIDGETS_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -fPIC -DHAVE_TIFF -DQT_NO_KEYWORDS -MD -MQ src/apps/qcam/qcam.p/main_window.cpp.o -MF src/apps/qcam/qcam.p/main_window.cpp.o.d -o src/apps/qcam/qcam.p/main_window.cpp.o -c ../../src/apps/qcam/main_window.cpp
In file included from ../../src/apps/qcam/main_window.cpp:8:
In file included from ../../src/apps/qcam/main_window.h:23:
In file included from /usr/include/qt6/QtWidgets/QMainWindow:1:
In file included from /usr/include/qt6/QtWidgets/qmainwindow.h:8:
In file included from /usr/include/qt6/QtWidgets/qwidget.h:12:
In file included from /usr/include/qt6/QtGui/qaction.h:9:
/usr/include/qt6/QtGui/qkeysequence.h:139:26: error: extra ';' after member function definition [-Werror,-Wextra-semi]
  139 |     Q_ENUM(SequenceMatch);
      |                          ^
1 error generated.

Looks like a bug in Qt. Not the end of the world, we can work around
this either with a pragma to ignore the warning around the inclusion of
the Qt headers, or disabling it overall for qcam. The pragma would be
nicer as we would still catch issues in the qcam code itself, but if
that becomes too annoying, we can just disable the warning.

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list