libcamera upstream builds broken?

Milan Zamazal mzamazal at redhat.com
Wed Feb 14 11:39:29 CET 2024


Kieran Bingham <kieran.bingham at ideasonboard.com> writes:

> Hi Naush,
>
> Quoting Naushir Patuck (2024-02-14 09:48:05)
>> 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:
>
> Can you check that you have a fully clean build environment? (Blow away
> any existing builddir)
>
> https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1094916
> shows the most recent build (commit 38d28cc5) on our CI as all green at
> least...
>
>
> https://gitlab.freedesktop.org/camera/libcamera/-/jobs/54600354#L166
> shows that this was with
>
> C compiler for the host machine: gcc-12 (gcc 12.2.0 "gcc-12 (Debian 12.2.0-14) 12.2.0")
> C linker for the host machine: gcc-12 ld.bfd 2.40
> C++ compiler for the host machine: g++-12 (gcc 12.2.0 "g++-12 (Debian 12.2.0-14) 12.2.0")
> C++ linker for the host machine: g++-12 ld.bfd 2.40
>
> Double checking a clean builddir is the first step. I think we likely
> introduced some issue where the dependencies weren't matched on the
> mojom files, so the mojom doesn't rebuild if you cross between a 0.1
> build and a 0.2 build ;-(

I can reproduce the error with Naushir's meson options and g++ 12.3.0.  It
compiles fine without `-Dbuildtype=release' -- can it be the reason why it
passes on the CI?

> --
> Kieran
>
>
>> 
>> ---
>> $ 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.
>
> Oh that's curious.
>
> GCC 12 was built here:
> https://gitlab.freedesktop.org/camera/libcamera/-/jobs/54600354
>
>> 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