This is an automated email from the ASF dual-hosted git repository.

liujiayi771 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 147ed917a5 [VL] Add dlerror message for library load failures (#10952)
147ed917a5 is described below

commit 147ed917a5ed9dca9778807e7c25cc645821f201
Author: Joey <[email protected]>
AuthorDate: Wed Oct 29 09:43:19 2025 +0800

    [VL] Add dlerror message for library load failures (#10952)
---
 cpp/velox/udf/UdfLoader.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cpp/velox/udf/UdfLoader.cc b/cpp/velox/udf/UdfLoader.cc
index 857fae0c3f..430927b2bf 100644
--- a/cpp/velox/udf/UdfLoader.cc
+++ b/cpp/velox/udf/UdfLoader.cc
@@ -36,9 +36,13 @@ void* loadSymFromLibrary(
     const std::string& libPath,
     const std::string& func,
     bool throwIfNotFound = true) {
+  // Clear any existing dlerror() state before calling dlsym.
+  dlerror();
   void* sym = dlsym(handle, func.c_str());
   if (!sym && throwIfNotFound) {
-    throw gluten::GlutenException(func + " not found in " + libPath);
+    const char* error = dlerror();
+    throw gluten::GlutenException(
+        fmt::format("Failed to load {} in {}: {}", func, libPath, error != 
nullptr ? error : "unknown error"));
   }
   return sym;
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to