From 222785974b513f3cd8a77a8402abeafc6bc2e490 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 19 Nov 2025 11:45:18 +0300 Subject: [PATCH 1/2] fix: reduce debug level for rpc/evo.cpp to avoid clang crash in guix Workaround for LLVM 18.1.8 bug: reduce debug level for rpc/evo.cpp to avoid crash in debug info generation for complex std::function template --- src/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 9a3b18c65482..61f000e47b09 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -616,6 +616,10 @@ if !ENABLE_WALLET libbitcoin_node_a_SOURCES += dummywallet.cpp endif +# Workaround for LLVM 18.1.8 bug: reduce debug level for rpc/evo.cpp to avoid crash +# in debug info generation for complex std::function template +rpc/libbitcoin_node_a-evo.$(OBJEXT): CXXFLAGS += -g0 + if ENABLE_ZMQ libbitcoin_zmq_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) $(ZMQ_CFLAGS) libbitcoin_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) From 387d5bf3a95cfdf598018d340355231b9224f90a Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 19 Nov 2025 15:14:45 +0300 Subject: [PATCH 2/2] fix: only apply it when using clang --- src/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 61f000e47b09..d1dcf900e332 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -617,8 +617,9 @@ libbitcoin_node_a_SOURCES += dummywallet.cpp endif # Workaround for LLVM 18.1.8 bug: reduce debug level for rpc/evo.cpp to avoid crash -# in debug info generation for complex std::function template -rpc/libbitcoin_node_a-evo.$(OBJEXT): CXXFLAGS += -g0 +# in debug info generation for complex std::function template. +# Only apply this workaround when using Clang. +rpc/libbitcoin_node_a-evo.$(OBJEXT): CXXFLAGS += $(shell $(CXX) --version | grep -q clang && echo "-g0") if ENABLE_ZMQ libbitcoin_zmq_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS) $(ZMQ_CFLAGS)