Bug#1110520: jpeg-xl: FTBFS on riscv64: undefined reference to `__cxa_call_terminate'

Bo YU tsu.yubo at gmail.com
Sat Aug 9 02:14:43 BST 2025


Hi,

On Fri, Aug 08, 2025 at 11:20:21PM +0200, Aurelien Jarno wrote:

>> /usr/bin/ld: /usr/lib/riscv64-linux-gnu/libgtest.a(gtest-all.cc.o): in function `testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(char const*)':
>> (.text+0xb0e6): undefined reference to `__cxa_call_terminate'
>> /usr/bin/ld: /usr/lib/riscv64-linux-gnu/libgtest.a(gtest-all.cc.o): in function `testing::internal::OpenFileForWriting(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
>> (.text+0xb1c6): undefined reference to `__cxa_call_terminate'
>> /usr/bin/ld: (.text+0xb28e): undefined reference to `__cxa_call_terminate'
>> /usr/bin/ld: /usr/lib/riscv64-linux-gnu/libgtest.a(gtest-all.cc.o): in function `testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(char const*)':
>> (.text+0xb356): undefined reference to `__cxa_call_terminate'
>> /usr/bin/ld: (.text+0xb41c): undefined reference to `__cxa_call_terminate'
>> /usr/bin/ld: /usr/lib/riscv64-linux-gnu/libgtest.a(gtest-all.cc.o):(.text+0xb4e2): more undefined references to `__cxa_call_terminate' follow
>> /usr/bin/ld: /usr/lib/riscv64-linux-gnu/libIlmThread-3_1.so: undefined reference to `__cxa_call_terminate at CXXABI_1.3.15'
>> collect2: error: ld returned 1 exit status
>
>The problem seems to happens because jpeg-xl is built with gcc-13 on
>riscv64. It is also reproducible on s390x. It's not clear to me why, as
>the packages providing libgtest.a or libIlmThread-3_1.so haven't been
>rebuilt since the last build of jpeg-xl on riscv64.

I suspect jpeg-xl will be having FTBFS on these architecture were limited 
to use gcc-13:

https://wiki.gentoo.org/wiki/Upgrading_GCC#undefined_reference_to_.60_cxa_call_terminate.40CXXABI_1.3.15.27

https://forums.gentoo.org/viewtopic-t-1172390-start-0.html

>
>Nevertheless I have tested that jpeg-xl builds fine on riscv64 with
>gcc-14 (not clear why it has been changed to gcc-13 on riscv64), so the

here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1100753

>easiest fix is to build it with it. Here is the patch I tested:

+1

BR,
Bo

>
>
>Regards
>Aurelien
>
>-- 
>Aurelien Jarno                          GPG: 4096R/1DDD8C9B
>aurelien at aurel32.net                     http://aurel32.net
>

-- 
Regards,
--
   Bo YU

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-phototools-devel/attachments/20250809/cc269cff/attachment.sig>


More information about the Pkg-phototools-devel mailing list