From c87d807443bec4042c2f4a05d7ab56ee44b10026 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Sat, 20 Jun 2026 22:20:35 -0400 Subject: [PATCH] cmake: don't link ICU/iconv on cross-builds (vestigial without system boost) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feather.exe links ${ICU_LIBRARIES}, set by the monero submodule's static-build branch assuming depends ships ICU + libiconv. Feather's depends doesn't, and its depends boost is --without-icu, so nothing references ICU/iconv symbols — the mingw link failed on missing -licu*/-liconv. Clear ICU_LIBRARIES when CMAKE_CROSSCOMPILING; native (system boost, built with ICU) unchanged. --- src/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ef35f7ae..dc24ddd3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -274,6 +274,15 @@ if (DEPENDS) target_link_directories(feather PRIVATE "${LIB_DIR}") endif() +# ICU_LIBRARIES is set by the monero/wownero submodule (its STATIC-build branch, ~CMakeLists.txt:1131: +# `set(ICU_LIBRARIES icuio ... iconv)`) assuming depends ships ICU + libiconv — true for monero's own +# depends, NOT feather's. And our cross-build's depends boost is --without-icu, so nothing references +# ICU/iconv symbols: the link is vestigial. Drop it when cross-compiling (else the mingw link fails on +# missing -licu*/-liconv). Native builds keep it — their system boost IS built against ICU. +if(CMAKE_CROSSCOMPILING) + set(ICU_LIBRARIES "") +endif() + target_link_libraries(feather PRIVATE wallet_api epee