[libcamera-devel] FTBFS on i386 with 4de31ccc9

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Mar 20 01:50:19 CET 2020


Hi Jan,

Thank you for the bug report.

On Mon, Mar 09, 2020 at 09:53:40PM +0100, Jan Engelhardt wrote:
> Greetings.
> 
> 
> On i586, building libcamera 4de31ccc9ef47e7b16330d226d071d5d006faa6d
> from source fails with:
> 
> [    6s] ../include/libcamera/controls.h:173:36: error: static assertion failed: Invalid size of ControlValue class
> [    6s]   173 | static_assert(sizeof(ControlValue) == 16, "Invalid size of ControlValue class");
> 
> Naturally, the struct on this architecture is 12, not 16.
> 
> 25b  {   ControlType type_ : 8;
> =4B  {   bool isArray_ : 1;
>      {   std::size_t numElements_ : 16;
> 
> 8B   {   union {
>                   uint64_t value_;
>                   void *storage_;
>          };

Out of curiosity, is the above description of the class storage written
manually, or generated by a code inspection tool ? In the latter case
I'm interested to know what tool it would be.

> The problem was introduced with
> 
> commit 1fa4b43402a0af7cc41bb22b58cede687663cc7b
> Author: Jacopo Mondi <jacopo at jmondi.org>
> Date:   Thu Jan 2 12:01:32 2020 +0100
> 
>     libcamera: controls: Support array controls in ControlValue
>     
>     Add array controls support to the ControlValue class. The polymorphic
>     class can now store more than a single element and supports access and
>     creation through the use of Span<>.

I'll submit a fix shortly, and will CC you.

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list