diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ca75197..9515774 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,7 @@ +# Next + +* Included C error message when reporting PJRT plugin failures. + # v0.4.0 - 2024-09-23 * Binary distributed compiled in Ubuntu 24.04 (glibc 2.38), updated dependencies on the C library. This may cause issues in older distributions. diff --git a/pjrt/dynamiclib_dlopen.go b/pjrt/dynamiclib_dlopen.go index fa0bc53..19c52bb 100644 --- a/pjrt/dynamiclib_dlopen.go +++ b/pjrt/dynamiclib_dlopen.go @@ -131,7 +131,8 @@ func loadPlugin(pluginPath string) (handleWrapper dllHandleWrapper, err error) { handle := C.dlopen(nameC, C.RTLD_LAZY) cFree(nameC) if handle == nil { - err = errors.Errorf("failed to dynamically load PJRT plugin from %q: check with `ldd %s`, maybe there are missing required libraries.", pluginPath, pluginPath) + msg := C.GoString(C.dlerror()) + err = errors.Errorf("failed to dynamically load PJRT plugin from %q: %q -- check with `ldd %s` in case there are missing required libraries.", msg, pluginPath, pluginPath) klog.Warningf("%v", err) return }