diff options
Diffstat (limited to 'tensorflow/stream_executor/dso_loader.cc')
-rw-r--r-- | tensorflow/stream_executor/dso_loader.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tensorflow/stream_executor/dso_loader.cc b/tensorflow/stream_executor/dso_loader.cc index db1f8d9ba9..5210a81092 100644 --- a/tensorflow/stream_executor/dso_loader.cc +++ b/tensorflow/stream_executor/dso_loader.cc @@ -123,9 +123,13 @@ static mutex& GetRpathMutex() { port::Status s = port::Env::Default()->LoadLibrary(path_string.c_str(), dso_handle); if (!s.ok()) { +#if !defined(PLATFORM_WINDOWS) + char* ld_library_path = getenv("LD_LIBRARY_PATH"); +#endif LOG(INFO) << "Couldn't open CUDA library " << path #if !defined(PLATFORM_WINDOWS) - << ". LD_LIBRARY_PATH: " << getenv("LD_LIBRARY_PATH") + << ". LD_LIBRARY_PATH: " + << (ld_library_path != nullptr ? ld_library_path : "") #endif ; return port::Status(port::error::FAILED_PRECONDITION, |