summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pascal Muetschard <pmuetschard@google.com> 2023-11-08 11:07:23 +0100
committer Pascal Muetschard <pmuetschard@google.com> 2023-11-08 11:09:38 +0100
commit1d801f52ec02f0ddd174e6ab72511de0de248074 (patch)
tree6d9fc3065a9ad407df5b30da8d458d4e58ef3e13
parent22daeee1fae2d38179af79299c54c85e86f8dbae (diff)
Ensure gpu_counter_producer can always find the driver's .so.
Test: tested locally Change-Id: I4971e1b422bf4b278e8c3153e2134956c8d35700
-rw-r--r--cmds/gpu_counter_producer/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmds/gpu_counter_producer/main.cpp b/cmds/gpu_counter_producer/main.cpp
index 1054cba74a6b..4616638379e2 100644
--- a/cmds/gpu_counter_producer/main.cpp
+++ b/cmds/gpu_counter_producer/main.cpp
@@ -133,6 +133,12 @@ int main(int argc, char** argv) {
daemon(0, 0);
}
+ if (getenv("LD_LIBRARY_PATH") == nullptr) {
+ setenv("LD_LIBRARY_PATH", "/vendor/lib64:/vendor/lib", 0 /*override*/);
+ LOG_INFO("execv with: LD_LIBRARY_PATH=%s", getenv("LD_LIBRARY_PATH"));
+ execvpe(pname, argv, environ);
+ }
+
if (!writeToPidFile()) {
LOG_ERR("Could not open %s", kPidFileName);
return 1;