Source: feather-wallet
Version: 2.8.1+dfsg-1
Severity: normal
Tags: FTBFS patch
User: [email protected]
Usertags: loong64
Dear maintainers,
Compiling the feather-wallet failed for loong64 in the Debian Package
Auto-Building environment.
The error log is as follows,
```
......
[ 4%] Building CXX object
monero/src/cryptonote_basic/CMakeFiles/obj_cryptonote_basic.dir/account.cpp.o
cc: error: unrecognized command-line option ‘-maes’
c++: error: unrecognized command-line option ‘-maes’
c++: error: unrecognized command-line option ‘-maes’
c++: error: unrecognized command-line option ‘-maes’
cd
/<<PKGBUILDDIR>>/obj-loongarch64-linux-gnu/monero/src/cryptonote_basic
&& /usr/bin/c++ -DAUTO_INITIALIZE_EASYLOGGINGPP -DBLOCKCHAIN_DB=DB_LMDB
-DBOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION -DBOOST_NO_AUTO_PTR
-DBOOST_UUID_DISABLE_ALIGNMENT -DBUILD_GUI_DEPS=1
-DDEFAULT_DB_TYPE=\"lmdb\" -DDEVICE_TREZOR_READY=1 -DHAVE_EXPLICIT_BZERO
-DHAVE_HIDAPI -DHAVE_STRPTIME -DHAVE_TREZOR_LIBUSB=1
-DPER_BLOCK_CHECKPOINT -DPROTOBUF_INLINE_NOT_IN_HEADERS=0
-I/<<PKGBUILDDIR>>/monero/external/rapidjson/include
-I/<<PKGBUILDDIR>>/monero/external/easylogging++
-I/<<PKGBUILDDIR>>/monero/src
-I/<<PKGBUILDDIR>>/monero/contrib/epee/include
-I/<<PKGBUILDDIR>>/monero/external
-I/<<PKGBUILDDIR>>/monero/external/supercop/include
-I/<<PKGBUILDDIR>>/obj-loongarch64-linux-gnu/monero/generated_include
-I/<<PKGBUILDDIR>>/obj-loongarch64-linux-gnu/monero/translations
-I/<<PKGBUILDDIR>>/monero/external/db_drivers/liblmdb
-I/usr/include/hidapi -I/usr/include/libusb-1.0 -g -O2
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time
-D_FORTIFY_SOURCE=2 -pthread -maes -march=native
-Dcryptonote=MWYSUTPAXIBT -fno-strict-aliasing -D_GNU_SOURCE
-Dstatic_assert=_Static_assert -Wall -Wextra -Wpointer-arith -Wundef
-Wvla -Wwrite-strings -Wno-error=extra
-Wno-error=deprecated-declarations -Wno-unused-parameter
-Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized
-Wlogical-op -Wno-error=maybe-uninitialized -Wno-error=cpp -Wno-reorder
-Wno-missing-field-initializers -fPIC -fno-strict-aliasing
-ftemplate-depth=900 -std=c++17 -MD -MT
monero/src/cryptonote_basic/CMakeFiles/obj_cryptonote_basic.dir/account.cpp.o
-MF CMakeFiles/obj_cryptonote_basic.dir/account.cpp.o.d -o
CMakeFiles/obj_cryptonote_basic.dir/account.cpp.o -c
/<<PKGBUILDDIR>>/monero/src/cryptonote_basic/account.cpp
c++: error: unrecognized command-line option ‘-maes’
c++: error: unrecognized command-line option ‘-maes’
c++: error: unrecognized command-line option ‘-maes’
......
```
The full build log can be found at
https://buildd.debian.org/status/fetch.php?pkg=feather-wallet&arch=loong64&ver=2.8.1%2Bdfsg-1&stamp=1763006798&raw=0.
Please consider the patch I attached.
I have built feather-wallet successfully on locally.
Your opinions are welcome.
Best regards,
Dandan Zhang
Description: Do not use -maes CFLAGS and CXXFLAGS on loong64
.
feather-wallet (2.8.1+dfsg-1+loong64) unstable; urgency=medium
.
* Do not use -maes CFLAGS and CXXFLAGS on loong64.
Author: Dandan Zhang <[email protected]>
---
Last-Update: 2025-11-18
--- feather-wallet-2.8.1+dfsg.orig/monero/CMakeLists.txt
+++ feather-wallet-2.8.1+dfsg/monero/CMakeLists.txt
@@ -327,6 +327,11 @@ if(ARCH_ID STREQUAL "s390x")
set(S390X 1)
endif()
+if(ARCH_ID STREQUAL "loongarch64")
+set(LOONGARCH 1)
+set(LOONGARCH64 1)
+endif()
+
if(ARCH_ID STREQUAL "riscv64")
set(RISCV 1)
set(RISCV64 1)
@@ -748,7 +753,7 @@ else()
message(STATUS "AES support explicitly disabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_AES")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_AES")
- elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC AND NOT S390X AND NOT RISCV)
+ elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC AND NOT LOONGARCH AND NOT S390X AND NOT RISCV)
message(STATUS "AES support enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")