Bug#1066836: libcamera: ftbfs with 64-bit time_t
Hi Steve,
do you also plan to submit this to the libcamera-devel mailing list?
--
Kieran
Quoting Steve Langasek (2024-03-14 05:35:04)
> Package: libcamera
> Version: 0.2.0-1
> Severity: serious
> Tags: patch
> Justification: ftbfs
> User: ubuntu-devel@lists.ubuntu.com
> Usertags: origin-ubuntu noble ubuntu-patch
>
> Dear maintainers,
>
> libcamera fails to build from source on 32-bit architectures under 64-bit
> time_t, because it has a module that legitimately un-sets _FILE_OFFSET_BITS
> for building but this is not allowed without also unsetting _TIME_BITS:
>
> [...]
> [267/430] c++ -Isrc/v4l2/v4l2-compat.so.p -Isrc/v4l2 -I../src/v4l2 -Iinclude -I../include -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Werror -std=c++17 -Wno-redundant-move -Wno-psabi -Wshadow -include /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/config.h -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/libcamera-0.2.0-1ubuntu3 -Wno-error -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -fPIC -DLIBCAMERA_BASE_PRIVATE -U_FILE_OFFSET_BITS -D_FILE_OFFSET_BITS=32 -D_LARGEFILE64_SOURCE -fvisibility=hidden -MD -MQ src/v4l2/v4l2-compat.so.p/v4l2_camera.cpp.o -MF src/v4l2/v4l2-compat.so.p/v4l2_camera.cpp.o.d -o src/v4l2/v4l2-compat.so.p/v4l2_camera.cpp.o -c ../src/v4l2/v4l2_camera.cpp
> FAILED: src/v4l2/v4l2-compat.so.p/v4l2_camera.cpp.o
> c++ -Isrc/v4l2/v4l2-compat.so.p -Isrc/v4l2 -I../src/v4l2 -Iinclude -I../include -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -Werror -std=c++17 -Wno-redundant-move -Wno-psabi -Wshadow -include /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/config.h -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/libcamera-0.2.0-1ubuntu3 -Wno-error -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -fPIC -DLIBCAMERA_BASE_PRIVATE -U_FILE_OFFSET_BITS -D_FILE_OFFSET_BITS=32 -D_LARGEFILE64_SOURCE -fvisibility=hidden -MD -MQ src/v4l2/v4l2-compat.so.p/v4l2_camera.cpp.o -MF src/v4l2/v4l2-compat.so.p/v4l2_camera.cpp.o.d -o src/v4l2/v4l2-compat.so.p/v4l2_camera.cpp.o -c ../src/v4l2/v4l2_camera.cpp
> In file included from /usr/include/features.h:394,
> from /usr/include/arm-linux-gnueabihf/c++/13/bits/os_defines.h:39,
> from /usr/include/arm-linux-gnueabihf/c++/13/bits/c++config.h:679,
> from /usr/include/c++/13/bits/requires_hosted.h:31,
> from /usr/include/c++/13/deque:60,
> from ../src/v4l2/v4l2_camera.h:10,
> from ../src/v4l2/v4l2_camera.cpp:8:
> /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
> 26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
> | ^~~~~
> [...]
>
> (https://launchpad.net/ubuntu/+source/libcamera/0.2.0-1ubuntu3/+build/27902670)
>
> Since this is a legitimate un-setting of _FILE_OFFSET_BITS in order to get
> access to the necessary libc6 prototypes and macros, and since the functions
> being intercepted are not sensitive to time_t, the simplest solution is to
> also unset _TIME_BITS.
>
> Please see the attached patch, which has been uploaded to Ubuntu to fix this
> build failure.
>
> Thanks for considering,
> --
> Steve Langasek Give me a lever long enough and a Free OS
> Debian Developer to set it on, and I can move the world.
> Ubuntu Developer https://www.debian.org/
> slangasek@ubuntu.com vorlon@debian.org
Reply to: