#1012786 libcamera: Fails to build from source

Package:
src:libcamera
Source:
libcamera
Submitter:
Lisandro Damián Nicanor Pérez Meyer
Date:
2022-06-14 15:21:03 UTC
Severity:
serious
#1012786#5
Date:
2022-06-14 02:02:34 UTC
From:
To:
Trying to fix a bug in libcamera I found it's currently failing to build
from source. Seems it's taking deprecation warnings as errors.

Log follows. Kinds regards, Lisandro.

../test/gstreamer/gstreamer_multi_stream_test.cpp: In member function ‘virtual int GstreamerMultiStreamTest::run()’:
../test/gstreamer/gstreamer_multi_stream_test.cpp:90:76: error: ‘GstPad* gst_element_get_request_pad(GstElement*, const gchar*)’ is deprecated: Use 'gst_element_request_pad_simple' instead [-Werror=deprecated-declarations]
   90 |                 g_autoptr(GstPad) request_pad = gst_element_get_request_pad(libcameraSrc_, "src_%u");
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
                 from /usr/include/gstreamer-1.0/gst/gst.h:35,
                 from ../test/gstreamer/gstreamer_multi_stream_test.cpp:13:
/usr/include/gstreamer-1.0/gst/gstelement.h:1042:25: note: declared here
 1042 | GstPad*                 gst_element_get_request_pad     (GstElement *element, const gchar *name);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
[246/390] /usr/bin/meson --internal symbolextractor '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu' src/libcamera/base/libcamera-base.so.0.0.0 src/libcamera/base/libcamera-base.so.0.0.0 src/libcamera/base/libcamera-base.so.0.0.0.p/libcamera-base.so.0.0.0.symbols
[247/390] ccache c++ -Itest/stream/stream_formats.p -Itest/stream -I../test/stream -Itest/libtest -I../test/libtest -Iinclude -I../include -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MQ test/stream/stream_formats.p/stream_formats.cpp.o -MF test/stream/stream_formats.p/stream_formats.cpp.o.d -o test/stream/stream_formats.p/stream_formats.cpp.o -c ../test/stream/stream_formats.cpp
[248/390] ccache c++ -Itest/serialization/control_serialization.p -Itest/serialization -I../test/serialization -Itest/libtest -I../test/libtest -Iinclude -I../include -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLIBCAMERA_BASE_PRIVATE -MD -MQ test/serialization/control_serialization.p/serialization_test.cpp.o -MF test/serialization/control_serialization.p/serialization_test.cpp.o.d -o test/serialization/control_serialization.p/serialization_test.cpp.o -c ../test/serialization/serialization_test.cpp
[249/390] ccache c++ -Itest/serialization/ipa_data_serializer_test.p -Itest/serialization -I../test/serialization -Itest/libtest -I../test/libtest -Iinclude -I../include -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLIBCAMERA_BASE_PRIVATE -MD -MQ test/serialization/ipa_data_serializer_test.p/serialization_test.cpp.o -MF test/serialization/ipa_data_serializer_test.p/serialization_test.cpp.o.d -o test/serialization/ipa_data_serializer_test.p/serialization_test.cpp.o -c ../test/serialization/serialization_test.cpp
[250/390] ccache c++ -Itest/serialization/control_serialization.p -Itest/serialization -I../test/serialization -Itest/libtest -I../test/libtest -Iinclude -I../include -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLIBCAMERA_BASE_PRIVATE -MD -MQ test/serialization/control_serialization.p/control_serialization.cpp.o -MF test/serialization/control_serialization.p/control_serialization.cpp.o.d -o test/serialization/control_serialization.p/control_serialization.cpp.o -c ../test/serialization/control_serialization.cpp
[251/390] ccache c++ -Itest/v4l2_subdevice/list_formats.p -Itest/v4l2_subdevice -I../test/v4l2_subdevice -Itest/libtest -I../test/libtest -Iinclude -I../include -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLIBCAMERA_BASE_PRIVATE -MD -MQ test/v4l2_subdevice/list_formats.p/list_formats.cpp.o -MF test/v4l2_subdevice/list_formats.p/list_formats.cpp.o.d -o test/v4l2_subdevice/list_formats.p/list_formats.cpp.o -c ../test/v4l2_subdevice/list_formats.cpp
[252/390] /usr/bin/sphinx-build -D release=v0.0.0 -q -W -b html '/<<PKGBUILDDIR>>/Documentation' Documentation/html
[253/390] ccache c++ -Itest/v4l2_subdevice/list_formats.p -Itest/v4l2_subdevice -I../test/v4l2_subdevice -Itest/libtest -I../test/libtest -Iinclude -I../include -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLIBCAMERA_BASE_PRIVATE -MD -MQ test/v4l2_subdevice/list_formats.p/v4l2_subdevice_test.cpp.o -MF test/v4l2_subdevice/list_formats.p/v4l2_subdevice_test.cpp.o.d -o test/v4l2_subdevice/list_formats.p/v4l2_subdevice_test.cpp.o -c ../test/v4l2_subdevice/v4l2_subdevice_test.cpp
[254/390] ccache c++ -Isrc/gstreamer/libgstlibcamera.so.p -Isrc/gstreamer -I../src/gstreamer -Iinclude -I../include -Iinclude/libcamera -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/x86_64-linux-gnu -I/usr/include/orc-0.4 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread '-DVERSION="0.0.0"' '-DPACKAGE="libcamera"' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -MD -MQ src/gstreamer/libgstlibcamera.so.p/gstlibcamerasrc.cpp.o -MF src/gstreamer/libgstlibcamera.so.p/gstlibcamerasrc.cpp.o.d -o src/gstreamer/libgstlibcamera.so.p/gstlibcamerasrc.cpp.o -c ../src/gstreamer/gstlibcamerasrc.cpp
[255/390] ccache c++ -Itest/serialization/generated_serializer/generated_serializer_test.p -Itest/serialization/generated_serializer -I../test/serialization/generated_serializer -Itest/libtest -I../test/libtest -Itest/serialization/generated_serializer/include -I../test/serialization/generated_serializer/include -Iinclude -I../include -Itest/serialization/generated_serializer/include/libcamera/ipa -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLIBCAMERA_BASE_PRIVATE -MD -MQ test/serialization/generated_serializer/generated_serializer_test.p/generated_serializer_test.cpp.o -MF test/serialization/generated_serializer/generated_serializer_test.p/generated_serializer_test.cpp.o.d -o test/serialization/generated_serializer/generated_serializer_test.p/generated_serializer_test.cpp.o -c ../test/serialization/generated_serializer/generated_serializer_test.cpp
[256/390] ccache c++ -Isrc/libcamera/libcamera.so.0.0.0.p -Isrc/libcamera -I../src/libcamera -Iinclude -I../include -Iinclude/libcamera -Iinclude/libcamera/ipa -Iinclude/libcamera/internal -Isrc/libcamera/proxy -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_ipu3_ipa_proxy.cpp.o -MF src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_ipu3_ipa_proxy.cpp.o.d -o src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_ipu3_ipa_proxy.cpp.o -c src/libcamera/proxy/ipu3_ipa_proxy.cpp
[257/390] ccache c++ -Isrc/libcamera/libcamera.so.0.0.0.p -Isrc/libcamera -I../src/libcamera -Iinclude -I../include -Iinclude/libcamera -Iinclude/libcamera/ipa -Iinclude/libcamera/internal -Isrc/libcamera/proxy -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_vimc_ipa_proxy.cpp.o -MF src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_vimc_ipa_proxy.cpp.o.d -o src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_vimc_ipa_proxy.cpp.o -c src/libcamera/proxy/vimc_ipa_proxy.cpp
[258/390] ccache c++ -Isrc/libcamera/libcamera.so.0.0.0.p -Isrc/libcamera -I../src/libcamera -Iinclude -I../include -Iinclude/libcamera -Iinclude/libcamera/ipa -Iinclude/libcamera/internal -Isrc/libcamera/proxy -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_rkisp1_ipa_proxy.cpp.o -MF src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_rkisp1_ipa_proxy.cpp.o.d -o src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_rkisp1_ipa_proxy.cpp.o -c src/libcamera/proxy/rkisp1_ipa_proxy.cpp
[259/390] ccache c++ -Isrc/libcamera/libcamera.so.0.0.0.p -Isrc/libcamera -I../src/libcamera -Iinclude -I../include -Iinclude/libcamera -Iinclude/libcamera/ipa -Iinclude/libcamera/internal -Isrc/libcamera/proxy -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_raspberrypi_ipa_proxy.cpp.o -MF src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_raspberrypi_ipa_proxy.cpp.o.d -o src/libcamera/libcamera.so.0.0.0.p/meson-generated_.._proxy_raspberrypi_ipa_proxy.cpp.o -c src/libcamera/proxy/raspberrypi_ipa_proxy.cpp
[260/390] ccache c++ -Itest/serialization/ipa_data_serializer_test.p -Itest/serialization -I../test/serialization -Itest/libtest -I../test/libtest -Iinclude -I../include -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -Wshadow -include config.h -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLIBCAMERA_BASE_PRIVATE -MD -MQ test/serialization/ipa_data_serializer_test.p/ipa_data_serializer_test.cpp.o -MF test/serialization/ipa_data_serializer_test.p/ipa_data_serializer_test.cpp.o.d -o test/serialization/ipa_data_serializer_test.p/ipa_data_serializer_test.cpp.o -c ../test/serialization/ipa_data_serializer_test.cpp
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j16 -v returned exit code 1
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1012786#10
Date:
2022-06-14 08:26:42 UTC
From:
To:
Hi!

I propose a patch to potentially fix this:
https://salsa.debian.org/multimedia-team/libcamera/-/merge_requests/6

The use of the depreciated function could even be fixed in upstream, it
could be worth updating the package from upstream?

@Andrew: can you review the patch above? Also, I can help with updating
from upstream if you would like.

Chris

#1012786#13
Date:
2022-06-14 12:06:42 UTC
From:
To:
Hello,

Bug #1012786 in libcamera reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/multimedia-team/libcamera/-/commit/f8682fadc114d5e75d1205c3329c961703314cd1
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1012786

#1012786#20
Date:
2022-06-14 12:19:35 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
libcamera, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1012786@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrej Shadura <andrew.shadura@collabora.co.uk> (supplier of updated libcamera package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 14 Jun 2022 14:07:18 +0200
Source: libcamera
Architecture: source
Version: 0~git20211108+1b30992b623e-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Changed-By: Andrej Shadura <andrew.shadura@collabora.co.uk>
Closes: 1012786
Changes:
 libcamera (0~git20211108+1b30992b623e-4) unstable; urgency=medium
 .
   [ Christopher Obbard ]
   * Don't treat compilation warnings as errors (Closes: #1012786).
Checksums-Sha1:
 688bc8461421d3d7179312326cb7bba3a8d09520 2327 libcamera_0~git20211108+1b30992b623e-4.dsc
 f0469de747d3586e1b18b576bf8c5a1044b5e26a 29552 libcamera_0~git20211108+1b30992b623e-4.debian.tar.xz
Checksums-Sha256:
 9c19d7ae3b2f59ea54e61acfd0114b1ba90195b594a35c54afdba4e97c857e65 2327 libcamera_0~git20211108+1b30992b623e-4.dsc
 ce510b74c021dc5052ec70d5d4047332c0a15cfe653a3e72cc03d2e1df889978 29552 libcamera_0~git20211108+1b30992b623e-4.debian.tar.xz
Files:
 c2a252b61344bb9a424461f34bfc8215 2327 libs optional libcamera_0~git20211108+1b30992b623e-4.dsc
 715062eb04b6abbe8a3b8893ff9bcc31 29552 libs optional libcamera_0~git20211108+1b30992b623e-4.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQSD3NF/RLIsyDZW7aHoRGtKyMdyYQUCYqh6DgAKCRDoRGtKyMdy
YV/bAQDZu/zWTG/59GFS/KQZAo6o54Zs74mU2V2/fpWNzWOrjQD8D9OQU7LZ+e46
LMuv0cYIYkU/DhyzUY6oQH0RpegyLw4=
=XAea
-----END PGP SIGNATURE-----

#1012786#25
Date:
2022-06-14 14:35:26 UTC
From:
To:
Hi!

No, upstream is doing the right thing. Their builds ought to fail in
this case. We are the ones that should disable this flag, as done.

What you really need to do is take this issue to upstream so they use
the newer interfaces if possible (ie, avoid the deprecation warning).

#1012786#30
Date:
2022-06-14 15:18:34 UTC
From:
To:
using the correct gstreamer function instead of a depreciated one, maybe
we should check if upstream have done that".

For the record, it turns out that upstream have:
https://git.libcamera.org/libcamera/libcamera.git/commit/test/gstreamer/gstreamer_multi_stream_test.cpp?id=4085372c517e1527114dc4098194c3ae3b973ba0

So, if we update to the latest version of libcamera, everything is fine
again for future :-). I don't mind doing an update to libcamera HEAD, if
Andrew would like some help.

Cheers!

Chris