I’m deploying a business system on openEuler 22.03 LTS SP3, which requires a self-compiled Qt 5.12.6. After setting global environment variables, the Kiran desktop fails to log in even with the correct password. I’d like to seek advice on an environment isolation solution that minimally impacts the current business operations.
【openEuler Version】
openEuler 22.03 LTS SP3
Kernel & Compiler:
Kernel: 5.10.0-182.0.0.95.oe2203sp3.x86_64
Architecture: x86_64
GCC/G++: 10.3.1
【Resource Configuration】
- Desktop environment: Kiran, Display manager: LightDM.
- Business applications are primarily used by regular users.
- Self-compiled Qt version: 5.12.6, installed at: /opt/Qt5.12.6/gcc_64
【Issue Manifestation and Impact】
Environment variables were configured in /etc/profile.d/, including the following Qt-related settings:
export QTDIR=/opt/Qt5.12.6/gcc_64
export PATH=$QTDIR/bin:$PATH:./
export QT_PLUGIN_PATH=$QTDIR/plugins
After this, the graphical login interface accepts correct passwords but fails to enter the desktop. SSH login remains functional.
Checking .xsession-errors, the following critical error was found:
/usr/bin/kiran-session-manager: /opt/Qt5.12.6/gcc_64/lib/libQt5Core.so.5: version ‘Qt_5.15’ not found
Other errors relate to system KF5, gsettings, and similar libraries. From the logs, it’s clear that desktop components require Qt 5.15, but they’re inadvertently loading Qt 5.12.6 from the business directory first.
【Diagnosis and Research Conducted】
-
Checked login logs and confirmed that desktop processes are loading
/opt/Qt5.12.6/gcc_64/lib/libQt5Core.so.5. -
Found similar community discussions:
One post suggests moving system library paths ahead in
LD_LIBRARY_PATHto restore login, but I haven’t verified whether this would cause business applications to fall back to the system Qt, potentially breaking the requirement that business apps use Qt 5.12.6. -
I’m aware of methods such as setting RPATH/RUNPATH per binary, using
qt.conf, and configuring environment variables selectively for terminals or services—but haven’t yet decided on a final approach.
【Business Constraints and Requirements】
The existing business includes multiple programs, and the startup entry points cannot be modified. I aim to avoid modifying startup scripts, adding wrapper scripts, or changing business source code wherever possible.
Expected requirements:
- Kiran desktop and system applications must function normally using the system-provided Qt.
- Business applications must use Qt 5.12.6 from
/opt/Qt5.12.6/gcc_64. - Keep the existing business startup methods as-is.
- If feasible, continue managing business dependencies via environment variables.