libcamera upstream builds broken?

Naushir Patuck naush at raspberrypi.com
Wed Feb 14 10:48:05 CET 2024


Hi,

I've just attempted to do a fresh build off the upstream libcamera
tree (master branch) and seem to be getting some compilation errors in
some of the mojom auto-generated files.  Here's the build environment:

---
$ g++ --version
g++ (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ meson setup build -Dbuildtype=release -Dpipelines=rpi/vc4 -Dipas=rpi/vc4
$ meson compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/local/bin/ninja -C
/home/pi/libcamera1/libcamera/build
ninja: Entering directory `/home/pi/libcamera1/libcamera/build'
[15/65] Compiling C++ object
src/libcamera/proxy/worker/raspberrypi_ipa_proxy.p/meson-generated_.._raspberrypi_ipa_proxy_worker.cpp.o
FAILED: src/libcamera/proxy/worker/raspberrypi_ipa_proxy.p/meson-generated_.._raspberrypi_ipa_proxy_worker.cpp.o
ccache c++ -Isrc/libcamera/proxy/worker/raspberrypi_ipa_proxy.p
-Isrc/libcamera/proxy/worker -I../src/libcamera/proxy/worker -Iinclude
-I../include -Iinclude/libcamera/ipa -Iinclude/libcamera
-fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
-Wextra -Werror -std=c++17 -O3 -Wshadow -include
/home/pi/libcamera1/libcamera/build/config.h -DLIBCAMERA_BASE_PRIVATE
-MD -MQ src/libcamera/proxy/worker/raspberrypi_ipa_proxy.p/meson-generated_.._raspberrypi_ipa_proxy_worker.cpp.o
-MF src/libcamera/proxy/worker/raspberrypi_ipa_proxy.p/meson-generated_.._raspberrypi_ipa_proxy_worker.cpp.o.d
-o src/libcamera/proxy/worker/raspberrypi_ipa_proxy.p/meson-generated_.._raspberrypi_ipa_proxy_worker.cpp.o
-c src/libcamera/proxy/worker/raspberrypi_ipa_proxy_worker.cpp
In file included from
src/libcamera/proxy/worker/raspberrypi_ipa_proxy_worker.cpp:18:
In static member function ‘static libcamera::ipa::RPi::ProcessParams
libcamera::IPADataSerializer<libcamera::ipa::RPi::ProcessParams>::deserialize(std::vector<unsigned
char>::const_iterator, std::vector<unsigned char>::const_iterator,
libcamera::ControlSerializer*)’,
    inlined from ‘void IPAProxyRPiWorker::readyRead()’ at
src/libcamera/proxy/worker/raspberrypi_ipa_proxy_worker.cpp:302:70:
include/libcamera/ipa/raspberrypi_ipa_serializer.h:1172:32: error:
‘*(uint32_t*)((char*)&ret +
offsetof(libcamera::ipa::RPi::ProcessParams,
libcamera::ipa::RPi::ProcessParams::buffers.libcamera::ipa::RPi::BufferIds::bayer))’
may be used uninitialized [-Werror=maybe-uninitialized]
 1172 |                         return ret;

<Many similar errors snipped>
---

This builds fine on gcc version 11.4.0, but does break with v12.2.0.
I *think* it might be related to the recent mjom changes that removed
the default constructors from the auto-generated classes.  We briefly
discussed this on the mailing list [1].

Anybody else able to reproduce this?

Regards,
Naush

[1] https://lists.libcamera.org/pipermail/libcamera-devel/2024-January/040367.html


More information about the libcamera-devel mailing list