From 3fa560aeb038a97f6111c21e8c987568382775c2 Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Fri, 1 Apr 2022 11:01:29 +1000 Subject: [PATCH] QNX: don't set LD_LIBRARY_PATH Setting this variable causes an instance of LD_LIBRARY_PATH containing /lib to be added to the environment. In the context of QNX x64, this tricks the Linux dynamic loader into attempto to the target Qt libraries (e.g. libQt6Core.so) instead of the host ones when running host tools such as qmake, as the loader will find a matching library dependency in LD_LIBRARY_PATH before it can even reach the ld cache. This will obviously fail. An instance of LD_LIBRARY_PATH containing the path to the Qt libraries should not be required anyway - these explicitly passed as linker flags to the compiler driver. Host tools rely on the builting RPATH of their binaries. Task-number: QTCREATORBUG-27287 Change-Id: I0527a7a77c6c76fa0229ea65695cc0d9f7d9811b Reviewed-by: Reviewed-by: hjk --- src/plugins/qnx/qnxqtversion.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/qnx/qnxqtversion.cpp b/src/plugins/qnx/qnxqtversion.cpp index 9bcb4ed831d..bb935987c2c 100644 --- a/src/plugins/qnx/qnxqtversion.cpp +++ b/src/plugins/qnx/qnxqtversion.cpp @@ -156,7 +156,6 @@ void QnxQtVersion::addToEnvironment(const Kit *k, Environment &env) const QtSupport::QtVersion::addToEnvironment(k, env); updateEnvironment(); env.modify(m_qnxEnv); - env.prependOrSetLibrarySearchPath(libraryPath()); } void QnxQtVersion::setupQmakeRunEnvironment(Environment &env) const