Building on riscv64 works if 1) LTO is disabled and 2) The following diff is applied:
diff --git a/debian/patches/c95cc0237d2f7a0f5ca5dc3fb4b5961b2b1dcdfc.patch b/debian/patches/c95cc0237d2f7a0f5ca5dc3fb4b5961b2b1dcdfc.patch index da42088..df69ba7 100644 --- a/debian/patches/c95cc0237d2f7a0f5ca5dc3fb4b5961b2b1dcdfc.patch +++ b/debian/patches/c95cc0237d2f7a0f5ca5dc3fb4b5961b2b1dcdfc.patch @@ -10,6 +10,7 @@ Also split HWY_HAVE_RUNTIME_DISPATCH into multiple macros to enable overriding parts of the logic. PiperOrigin-RevId: 639709709 +Updated: 2025-09-29, enable HWY_HAVE_RUNTIME_DISPATCH_RVV --- hwy/detect_targets.h | 51 ++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 14 deletions(-) @@ -28,7 +29,7 @@ Index: highway/hwy/detect_targets.h +// #error check, whereas 14.1 fails with "argument type 'vuint16m8_t' requires +// the V ISA extension": https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115325. +// Hence disable runtime dispatch for now. -+#if HWY_ARCH_RISCV && 0 ++#if HWY_ARCH_RISCV +#define HWY_HAVE_RUNTIME_DISPATCH_RVV 1 +#else +#define HWY_HAVE_RUNTIME_DISPATCH_RVV 0 diff --git a/debian/rules b/debian/rules index fbef85d..236754d 100755 --- a/debian/rules +++ b/debian/rules @@ -35,7 +35,7 @@ endif ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),riscv64)) # https://github.com/google/highway/issues/1740 - CMAKE_EXTRA_FLAGS += -DHWY_CMAKE_RVV:BOOL=OFF + # CMAKE_EXTRA_FLAGS += -DHWY_CMAKE_RVV:BOOL=OFF endif include /usr/share/dpkg/buildtools.mk -- You received this bug notification because you are a member of Debcrafters packages, which is subscribed to highway in Ubuntu. https://bugs.launchpad.net/bugs/2121375 Title: FTBFS with GCC 15.2 Status in gcc: Unknown Status in Highway: Unknown Status in gcc-15 package in Ubuntu: Confirmed Status in highway package in Ubuntu: Confirmed Bug description: Highland fails to build on source on the ppc64el and riscv64 architectures. In GCC 15.2 we have enbabled RVA23 extensions including vector instructions. When trying to rebuild the package an error occurs. This has been reported to GCC upstream in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121512. Since release 1.2.0 highway has received RISC-V vector related fixed, e.g. 9cff02ac65ac ("Fixes to compilation errors with RVV with EMU128 or SCALAR baseline") #!/bin/sh /usr/bin/c++ \ -g \ -O2 \ -freport-bug \ -fno-omit-frame-pointer \ -ffile-prefix-map=/home/${USER}/workspace/build-highway/highway-1.2.0=. \ -flto=auto \ -ffat-lto-objects \ -fstack-protector-strong \ -Wformat \ -Werror=format-security \ -fno-stack-clash-protection \ -fdebug-prefix-map=/home/${USER}/workspace/build-highway/highway-1.2.0=/usr/src/highway-1.2.0-3ubuntu3 \ -DHWY_BROKEN_EMU128=0 \ -Wdate-time \ -D_FORTIFY_SOURCE=3 \ -Wl,-Bsymbolic-functions \ -flto=auto \ -ffat-lto-objects \ -Wl,-z,relro \ -Wl,-z,now \ -fPIE \ -pie \ -Wl,--dependency-file=CMakeFiles/hwy_benchmark.dir/link.d CMakeFiles/hwy_benchmark.dir/hwy/examples/benchmark.cc.o \ -o examples/hwy_benchmark \ -Wl,-rpath,/home/${USER}/workspace/build-highway/highway-1.2.0/obj-riscv64-linux-gnu libhwy.so.1.2.0 during RTL pass: expand In function ‘BitCastToByte’, inlined from ‘BitCast’ at /usr/src/highway-1.2.0-3ubuntu3/hwy/ops/rvv-inl.h:901:33, inlined from ‘Zero’ at /usr/src/highway-1.2.0-3ubuntu3/hwy/ops/rvv-inl.h:695:17, inlined from ‘operator()’ at /usr/src/highway-1.2.0-3ubuntu3/hwy/examples/benchmark.cc:118:18, inlined from ‘operator()’ at /usr/src/highway-1.2.0-3ubuntu3/hwy/examples/benchmark.cc:75:61, inlined from ‘CallClosure’ at /usr/src/highway-1.2.0-3ubuntu3/hwy/nanobenchmark.h:154:14: /usr/src/highway-1.2.0-3ubuntu3/hwy/ops/rvv-inl.h:866:1: internal compiler error: in generate_insn, at config/riscv/riscv-vector-builtins.cc:4470 0x243847d internal_error(char const*, ...) ../../src/gcc/diagnostic-global-context.cc:517 0x5b67bf fancy_abort(char const*, int, char const*) ../../src/gcc/diagnostic.cc:1749 0xdd60bf riscv_vector::function_expander::generate_insn(insn_code) ../../src/gcc/config/riscv/riscv-vector-builtins.cc:4470 0xdd60bf riscv_vector::function_expander::generate_insn(insn_code) ../../src/gcc/config/riscv/riscv-vector-builtins.cc:4468 0xdde4fd riscv_vector::function_expander::expand() ../../src/gcc/config/riscv/riscv-vector-builtins.h:688 0xdde4fd riscv_vector::expand_builtin(unsigned int, tree_node*, rtx_def*) ../../src/gcc/config/riscv/riscv-vector-builtins.cc:4990 0x72cb91 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../src/gcc/expr.cc:12499 0x733497 store_expr(tree_node*, rtx_def*, int, bool, bool) ../../src/gcc/expr.cc:6771 0x734575 expand_assignment(tree_node*, tree_node*, bool) ../../src/gcc/expr.cc:6492 0x647a85 expand_call_stmt ../../src/gcc/cfgexpand.cc:3143 0x647a85 expand_gimple_stmt_1 ../../src/gcc/cfgexpand.cc:4218 0x647a85 expand_gimple_stmt ../../src/gcc/cfgexpand.cc:4365 0x64bce3 expand_gimple_basic_block ../../src/gcc/cfgexpand.cc:6483 0x64bce3 execute ../../src/gcc/cfgexpand.cc:7232 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-15/README.Bugs> for instructions. make: *** [/tmp/ccRMqIG3.mk:2: /tmp/ccG6RxKY.ltrans0.ltrans.o] Error 1 lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status --- ProblemType: Bug ApportVersion: 2.33.1-0ubuntu2 Architecture: riscv64 CasperMD5CheckResult: skip CurrentDesktop: XFCE DistroRelease: Ubuntu 25.10 InstallationDate: Installed on 2025-03-17 (161 days ago) InstallationMedia: Ubuntu-Server 25.04 "Plucky Puffin" - Daily riscv64 (20250316) Package: highway PackageArchitecture: riscv64 ProcEnviron: LANG=en_US.UTF-8 PATH=(custom, no user) SHELL=/bin/bash TERM=xterm-256color ProcVersionSignature: Ubuntu 6.14.0-22.22.1-generic 6.14.5 Tags: questing Uname: Linux 6.14.0-22-generic riscv64 UpgradeStatus: Upgraded to questing on 2025-05-17 (100 days ago) UserGroups: N/A _MarkForUpload: True To manage notifications about this bug go to: https://bugs.launchpad.net/gcc/+bug/2121375/+subscriptions -- Mailing list: https://launchpad.net/~debcrafters-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~debcrafters-packages More help : https://help.launchpad.net/ListHelp

