From b2af450cdbb02792d142f31d39ba79a3d570e5b6 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 16 Jun 2022 13:57:08 +0200 Subject: [PATCH] Debugger: (Re-)Fix start of Android lldb from NDK 23.x on Linux In order to help lldb locate libpython3.9.so, we need to point LD_LIBRARY_PATH to the right lib/ path inside the NDK. Amends: b54bf8ad867e0beddf0fcda6b4deacc3b6a0f7c8 Reason for amend: The "prepend" use-case of Environment::prependOrSet failed due to the undefined separator. Now, use Environment::prependOrSetLibrarySearchPath instead, since that handles the separator and knows the environment variable name. Fixes: QTCREATORBUG-27297 Change-Id: I770a6335a7a26c65d23c930f7d6f9795b3dc52b5 Reviewed-by: Marcus Tillmanns Reviewed-by: Reviewed-by: Alessandro Portale --- src/plugins/debugger/debuggeritem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index c8f6bdcb7ae..a6659506468 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -294,7 +294,7 @@ bool DebuggerItem::addAndroidLldbPythonEnv(const Utils::FilePath &lldbCmd, Utils if (HostOsInfo::isAnyUnixHost()) { const FilePath pythonLibDir = pythonDir.pathAppended("lib"); if (pythonLibDir.exists()) - env.prependOrSet("LD_LIBRARY_PATH", pythonLibDir.toString()); + env.prependOrSetLibrarySearchPath(pythonLibDir); } return true;