[libcamera-devel] Building with "meson build --buildtype=release" fails

Kieran Bingham kieran.bingham at ideasonboard.com
Tue Apr 12 14:39:30 CEST 2022


Quoting Eric Curtin via libcamera-devel (2022-04-12 13:28:14)
> Might be because of -O3 optimisation.
> 

Yikes. I thought I had a release build tested in my compiler matrix -
but I don't. I'll add one but of course we still need to fix this too!


> [82/394] g++ -Isrc/libcamera/base/libcamera-base.so.0.0.0.p
> -Isrc/libcamera/base -I../src/libcamera/base -Iinclude -I../include
> -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
> -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include
> config.h -fPIC -pthread -DLIBCAMERA_BASE_PRIVATE -MD -MQ
> src/libcamera/base/libcamera-base.so.0.0.0.p/object.cpp.o -MF
> src/libcamera/base/libcamera-base.so.0.0.0.p/object.cpp.o.d -o
> src/libcamera/base/libcamera-base.so.0.0.0.p/object.cpp.o -c
> ../src/libcamera/base/object.cpp
> FAILED: src/libcamera/base/libcamera-base.so.0.0.0.p/object.cpp.o
> g++ -Isrc/libcamera/base/libcamera-base.so.0.0.0.p
> -Isrc/libcamera/base -I../src/libcamera/base -Iinclude -I../include
> -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
> -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O3 -Wshadow -include
> config.h -fPIC -pthread -DLIBCAMERA_BASE_PRIVATE -MD -MQ
> src/libcamera/base/libcamera-base.so.0.0.0.p/object.cpp.o -MF
> src/libcamera/base/libcamera-base.so.0.0.0.p/object.cpp.o.d -o
> src/libcamera/base/libcamera-base.so.0.0.0.p/object.cpp.o -c
> ../src/libcamera/base/object.cpp
> In file included from ../src/libcamera/base/object.cpp:13:
> ../include/libcamera/base/message.h: In member function ‘void
> libcamera::Object::notifyThreadMove()’:
> ../include/libcamera/base/message.h:58:47: error: array subscript
> ‘const libcamera::InvokeMessage[0]’ is partly outside array bounds of
> ‘libcamera::Message [1]’ [-Werror=array-bounds]
>    58 |         Semaphore *semaphore() const { return semaphore_; }
>       |                                               ^~~~~~~~~~
> ../src/libcamera/base/object.cpp:280:17: note: while referencing ‘msg’
>   280 |         Message msg(Message::ThreadMoveMessage);
>       |                 ^~~
> cc1plus: all warnings being treated as errors
> 
> Is mise le meas/Regards,
> 
> Eric Curtin
>


More information about the libcamera-devel mailing list