nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 33 lines 1.5 kB view raw
1From 7bc56c886c8b9fa27842a14bbb964ffe8e576a9e Mon Sep 17 00:00:00 2001 2From: Jaeyoon Jung <jaeyoon.jung@lge.com> 3Date: Tue, 12 Aug 2025 10:55:52 +0900 4Subject: [PATCH] Fix build with musl 5 6Added __GLIBC__ macro for 'execinfo.h' and related functions as they are 7GLIBC specific and not available in other libc implementation like musl. 8--- 9 onnxruntime/core/platform/posix/stacktrace.cc | 4 ++-- 10 1 file changed, 2 insertions(+), 2 deletions(-) 11 12diff --git a/onnxruntime/core/platform/posix/stacktrace.cc b/onnxruntime/core/platform/posix/stacktrace.cc 13index a34f6fd82ddd1..ab00f5fbb233e 100644 14--- a/onnxruntime/core/platform/posix/stacktrace.cc 15+++ b/onnxruntime/core/platform/posix/stacktrace.cc 16@@ -3,7 +3,7 @@ 17 18 #include "core/common/common.h" 19 20-#if !defined(__ANDROID__) && !defined(__wasm__) && !defined(_OPSCHEMA_LIB_) && !defined(_AIX) 21+#if !defined(__ANDROID__) && !defined(__wasm__) && !defined(_OPSCHEMA_LIB_) && !defined(_AIX) && defined(__GLIBC__) 22 #include <execinfo.h> 23 #endif 24 #include <vector> 25@@ -13,7 +13,7 @@ namespace onnxruntime { 26 std::vector<std::string> GetStackTrace() { 27 std::vector<std::string> stack; 28 29-#if !defined(NDEBUG) && !defined(__ANDROID__) && !defined(__wasm__) && !defined(_OPSCHEMA_LIB_) 30+#if !defined(NDEBUG) && !defined(__ANDROID__) && !defined(__wasm__) && !defined(_OPSCHEMA_LIB_) && defined(__GLIBC__) 31 constexpr int kCallstackLimit = 64; // Maximum depth of callstack 32 33 void* array[kCallstackLimit];