Discussion:
Bug#1086249: xapian-core FTBFS on i386 with gcc 14
Add Reply
Olly Betts
2024-10-29 18:40:01 UTC
Reply
Permalink
../../tests/unittest.cc:962:49: warning: left shift count >= width of type [-Wshift-count-overflow]
962 | constexpr off_t high_offset = (off_t{1} << 32) + BLOCK_SIZE;
| ~~~~~~~~~^~~~~
../../tests/unittest.cc:962:49: error: right operand of shift expression ‘(1 << 32)’ is greater than or equal to the precision 32 of the left operand [-fpermissive]
962 | constexpr off_t high_offset = (off_t{1} << 32) + BLOCK_SIZE;
| ~~~~~~~~~~^~~~~~
Strange - LFS support should be enabled so off_t should be 64-bit...

(This part of this testcase ought to be conditional and skipped for
platforms which only have a 32-bit off_t, but that shouldn't include any
Debian architectures.)

Cheers,
Olly
Olly Betts
2024-11-06 21:40:01 UTC
Reply
Permalink
Post by Olly Betts
../../tests/unittest.cc:962:49: warning: left shift count >= width of type [-Wshift-count-overflow]
962 | constexpr off_t high_offset = (off_t{1} << 32) + BLOCK_SIZE;
| ~~~~~~~~~^~~~~
../../tests/unittest.cc:962:49: error: right operand of shift expression ‘(1 << 32)’ is greater than or equal to the precision 32 of the left operand [-fpermissive]
962 | constexpr off_t high_offset = (off_t{1} << 32) + BLOCK_SIZE;
| ~~~~~~~~~~^~~~~~
Strange - LFS support should be enabled so off_t should be 64-bit...
(This part of this testcase ought to be conditional and skipped for
platforms which only have a 32-bit off_t, but that shouldn't include any
Debian architectures.)
LFS was enabled on 32-bit architectures as part of the 64-bit time_t
https://wiki.debian.org/ReleaseGoals/64bit-time#Decision
I know, but LFS has been enabled explicitly upstream using
AC_SYS_LARGEFILE for a very long time so that difference shouldn't
matter.
checking for gcc option to enable large file support... support not detected
Digging deeper, it sadly seems autoconf upstream broke AC_SYS_LARGEFILE
for C++ in a recent release:

https://savannah.gnu.org/support/index.php?110983
It works for me with
AC_LANG([C])
AC_SYS_LARGEFILE
dnl Run tests using the C++ compiler.
AC_LANG([C++])
That's potentially probing something different though (the C and C++
compilers specified could need different options for LFS support for
example). That is rather a corner case and it shouldn't be problematic
in the limited context of the Debian package, but it'd be nicer to have
a cleaner fix that works more generally.

If this is blocking other work feel free to NMU the above workaround or
similar. Otherwise I'll sort it out once I'm not on vacation.

Cheers,
Olly

Loading...