Bug#1068159: openjfx: FTBFS on arm{el,hf}: /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
Tags 1068159 +patch Thanks The build failure is caused by the following in modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/projects/build/linux/common/config.h > /* Number of bits in a file offset, on hosts where this is settable. */ > #undef _FILE_OFFSET_BITS Looking at the file, this looks like output from autotools that was copied to become a static configuration file when code was vendored. One option would be to remove this line completely, however to minimise the risk of causing regressions on architectures not involved in the time64 transition I choose instead to place it behind a #ifndef guard. > /* Number of bits in a file offset, on hosts where this is settable. */ > #ifndef _TIME_BITS > # undef _FILE_OFFSET_BITS > #endif With this change, I was able to build the package successfully on armhf. Debdiff attached, if I get no response I will probablly NMU this in a week or so.diff -Nru openjfx-11.0.11+1/debian/changelog openjfx-11.0.11+1/debian/changelog --- openjfx-11.0.11+1/debian/changelog 2023-07-16 03:30:26.0 + +++ openjfx-11.0.11+1/debian/changelog 2024-04-11 15:34:39.0 + @@ -1,3 +1,10 @@ +openjfx (11.0.11+1-3.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Don't undefine _FILE_OFFSET_BITS if _TIME_BITS is set (Closes: #1068159) + + -- root Thu, 11 Apr 2024 15:34:39 + + openjfx (11.0.11+1-3.1) unstable; urgency=medium * Team upload. diff -Nru openjfx-11.0.11+1/debian/patches/40-dont-unset-file-offset-bits-if-time-bits-set.patch openjfx-11.0.11+1/debian/patches/40-dont-unset-file-offset-bits-if-time-bits-set.patch --- openjfx-11.0.11+1/debian/patches/40-dont-unset-file-offset-bits-if-time-bits-set.patch 1970-01-01 00:00:00.0 + +++ openjfx-11.0.11+1/debian/patches/40-dont-unset-file-offset-bits-if-time-bits-set.patch 2024-04-11 15:34:39.0 + @@ -0,0 +1,29 @@ +Description: Don't undefine _FILE_OFFSET_BITS if _TIME_BITS is set. + Having _TIME_BITS set to 64 but _FILE_OFFSET_BITS not set on a 32-bit + architectureis not supported by glibc. As a result of this, unsetting + _FILE_OFFSET_BITS on a 32-bit architecture with 64-bit time causes a build + failure. + + I suspect the unsetting of _FILE_OFFSET_BITS is a leftover from an + autogenerated file that became a static file rather than a deliberate + choice to override system settings. + + I suspect that unsetting _FILE_OFFSET_BITS is unnessacery in general and the + line could be completely removed. However to minimise the risk of regressions + I instead used an ifndef gaurd +Author: Peter Michael Green +Bug-Debian: https://bugs.debian.org/1068159 + +--- openjfx-11.0.11+1.orig/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/projects/build/linux/common/config.h openjfx-11.0.11+1/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/projects/build/linux/common/config.h +@@ -544,7 +544,9 @@ + #endif + + /* Number of bits in a file offset, on hosts where this is settable. */ +-#undef _FILE_OFFSET_BITS ++#ifndef _TIME_BITS ++# undef _FILE_OFFSET_BITS ++#endif + + /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ + #undef _LARGEFILE_SOURCE diff -Nru openjfx-11.0.11+1/debian/patches/series openjfx-11.0.11+1/debian/patches/series --- openjfx-11.0.11+1/debian/patches/series 2023-07-16 03:30:26.0 + +++ openjfx-11.0.11+1/debian/patches/series 2024-04-11 15:34:39.0 + @@ -21,3 +21,4 @@ disable-ffmpeg.patch 38-javadoc.patch webkit-217079-only-use-jumpislands-with-JIT.patch +40-dont-unset-file-offset-bits-if-time-bits-set.patch
Bug#1068159: openjfx: FTBFS on arm{el,hf}: /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
Source: openjfx Version: 11.0.11+1-3.1 Severity: serious Tags: ftbfs Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: sramac...@debian.org https://buildd.debian.org/status/fetch.php?pkg=openjfx=armel=11.0.11%2B1-3.1%2Bb2=1711746481=0 gcc -fPIC -Wformat -Wextra -Wformat-security -fstack-protector -Werror=implicit-function-declaration -Werror=trampolines -D_GNU_SOURCE -DGST_REMOVE_DEPRECATED -DGSTREAMER_LITE -DHAVE_CONFIG_H -DOUTSIDE_SPEEX -DLINUX -DGST_DISABLE_GST_DEBUG -DGST_DISABLE_LOADSAVE -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<>/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -I../../../plugins -I../../../gstreamer-lite/projects/build/linux/common -I../../../gstreamer-lite/gstreamer -I../../../gstreamer-lite/gstreamer/libs -I../../../gstreamer-lite/gstreamer/gst/parse -I../../../gstreamer-lite/gst-plugins-base -I../../../gstreamer-lite/gst-plugins-base/gst-libs -I../../../gstreamer-lite/projects/plugins -I../../../gstreamer-lite/gst-plugins-base/gst-libs -I../../../gstreamer-lite/gst-plugins-good/gst-libs -I../../../gstreamer-lite/gst-plugins-good/gst/isomp4 -I../../../gstreamer-lite/gst-plugins-bad/gst-libs -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabi/glib-2.0/include -c ../../../gstreamer-lite/gstreamer/gst/gst.c -o /<>/modules/javafx.media/build/native/linux/Release/obj/gstreamer-lite/gstreamer/gst/gst.o In file included from /usr/include/features.h:393, from /usr/include/arm-linux-gnueabi/bits/libc-header-start.h:33, from /usr/include/limits.h:26, from /usr/lib/gcc/arm-linux-gnueabi/13/include/limits.h:205, from /usr/lib/gcc/arm-linux-gnueabi/13/include/syslimits.h:7, from /usr/lib/gcc/arm-linux-gnueabi/13/include/limits.h:34, from /usr/lib/arm-linux-gnueabi/glib-2.0/include/glibconfig.h:11, from /usr/include/glib-2.0/glib/gtypes.h:34, from /usr/include/glib-2.0/glib/galloca.h:34, from /usr/include/glib-2.0/glib.h:32, from ../../../gstreamer-lite/gstreamer/gst/gst_private.h:36, from ../../../gstreamer-lite/gstreamer/gst/gst.c:94: /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" | ^ gcc -fPIC -Wformat -Wextra -Wformat-security -fstack-protector -Werror=implicit-function-declaration -Werror=trampolines -D_GNU_SOURCE -DGST_REMOVE_DEPRECATED -DGSTREAMER_LITE -DHAVE_CONFIG_H -DOUTSIDE_SPEEX -DLINUX -DGST_DISABLE_GST_DEBUG -DGST_DISABLE_LOADSAVE -ffunction-sections -fdata-sections -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<>/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -I../../../plugins -I../../../gstreamer-lite/projects/build/linux/common -I../../../gstreamer-lite/gstreamer -I../../../gstreamer-lite/gstreamer/libs -I../../../gstreamer-lite/gstreamer/gst/parse -I../../../gstreamer-lite/gst-plugins-base -I../../../gstreamer-lite/gst-plugins-base/gst-libs -I../../../gstreamer-lite/projects/plugins -I../../../gstreamer-lite/gst-plugins-base/gst-libs -I../../../gstreamer-lite/gst-plugins-good/gst-libs -I../../../gstreamer-lite/gst-plugins-good/gst/isomp4 -I../../../gstreamer-lite/gst-plugins-bad/gst-libs -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabi/glib-2.0/include -c ../../../gstreamer-lite/gstreamer/gst/gstallocator.c -o /<>/modules/javafx.media/build/native/linux/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o ../../../gstreamer-lite/gstreamer/gst/gst.c: In function ‘gst_init_check’: ../../../gstreamer-lite/gstreamer/gst/gst.c:411:22: warning: unused parameter ‘argc’ [-Wunused-parameter] 411 | gst_init_check (int *argc, char **argv[], GError ** err) | ~^~~~ ../../../gstreamer-lite/gstreamer/gst/gst.c:411:35: warning: unused parameter ‘argv’ [-Wunused-parameter] 411 | gst_init_check (int *argc, char **argv[], GError ** err) |~~~^~ ../../../gstreamer-lite/gstreamer/gst/gst.c:411:53: warning: unused parameter ‘err’ [-Wunused-parameter] 411 | gst_init_check (int *argc, char **argv[], GError ** err) make[2]: Leaving directory '/<>/modules/javafx.media/src/main/native/gstreamer/projects/linux/gstreamer-lite' | ~~^~~