From 01392597d9ae7e2934acfae77e7259edec20d12c Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sun, 12 Apr 2026 22:54:47 +0200 Subject: [PATCH] fix ubuntu compilation issue in nim-testutils The when defined(enable_libbacktrace): is evaluated at compile time and is false by default. When Nim loads this config.nims as a parent config during the testutils build, the libbacktrace block is silently skipped. Nothing is passed as --import. Why the old guard (not defined(disable_libbacktrace)) wasn't enough: it required someone to explicitly opt out, but disable_libbacktrace is never passed during nimble's internal dependency build invocations. The opt-in approach is safe by default. If any build in this project genuinely uses libbacktrace, you'd need to both add it to waku.nimble requires and pass -d:enable_libbacktrace explicitly. --- config.nims | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.nims b/config.nims index 329384ac4..0f6052c9b 100644 --- a/config.nims +++ b/config.nims @@ -83,8 +83,9 @@ if not defined(macosx) and not defined(android): # add debugging symbols and original files and line numbers --debugger: native - if not (defined(windows) and defined(i386)) and not defined(disable_libbacktrace): + when defined(enable_libbacktrace): # light-weight stack traces using libbacktrace and libunwind + # opt-in: pass -d:enable_libbacktrace (requires libbacktrace in project deps) --define: nimStackTraceOverride switch("import", "libbacktrace")