You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue after using vcpkg to install and package a Qt6.5.0 project. The application fails to locate certain dynamic libraries on a new machine, despite these libraries being present in the lib folder under the application directory.
Steps to Reproduce:
Use vcpkg to install Qt6.5.0 on a Linux system.
Build and package a Qt application that includes the libqxcb plugin.
Deploy the application on a different machine.
Attempt to run the application.
Observed Behavior:
The application fails with an error indicating that libqxcb cannot locate certain libraries, even though they exist in the lib directory of the application.
Running readelf -d libqxcb reveals that the RUNPATH is set to $ORIGIN:$ORIGIN/../../../lib, which incorrectly points to the parent directory of the application folder instead of the correct lib directory within the application.
Root Cause:
It appears that the issue is caused by the directory structure created by vcpkg when installing Qt. The structure includes an additional Qt6 folder, which affects the relative path calculation during RUNPATH configuration, resulting in an extra ../ in the RUNPATH.
Expected Behavior:
The RUNPATH should correctly point to $ORIGIN:$ORIGIN/../../lib to ensure that the libraries in the lib directory are correctly found at runtime.
Proposed Solution:
The packaging or installation process should adjust the RUNPATH to reflect the correct relative path, or alternatively, the directory structure should avoid introducing unnecessary levels that interfere with path resolution.
Additional Context:
This issue may impact other Qt-related plugins as well. Adjusting the RUNPATH manually is possible, but this should ideally be handled automatically by vcpkg during the installation or packaging process.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description:
I encountered an issue after using vcpkg to install and package a Qt6.5.0 project. The application fails to locate certain dynamic libraries on a new machine, despite these libraries being present in the lib folder under the application directory.
Steps to Reproduce:
Use vcpkg to install Qt6.5.0 on a Linux system.
Build and package a Qt application that includes the libqxcb plugin.
Deploy the application on a different machine.
Attempt to run the application.
Observed Behavior:
The application fails with an error indicating that libqxcb cannot locate certain libraries, even though they exist in the lib directory of the application.
Running readelf -d libqxcb reveals that the RUNPATH is set to $ORIGIN:$ORIGIN/../../../lib, which incorrectly points to the parent directory of the application folder instead of the correct lib directory within the application.
Root Cause:
It appears that the issue is caused by the directory structure created by vcpkg when installing Qt. The structure includes an additional Qt6 folder, which affects the relative path calculation during RUNPATH configuration, resulting in an extra ../ in the RUNPATH.
Expected Behavior:
The RUNPATH should correctly point to $ORIGIN:$ORIGIN/../../lib to ensure that the libraries in the lib directory are correctly found at runtime.
Proposed Solution:
The packaging or installation process should adjust the RUNPATH to reflect the correct relative path, or alternatively, the directory structure should avoid introducing unnecessary levels that interfere with path resolution.
Environment:
OS: Ubuntu 20.04
vcpkg version: 2024-07-10-d2dfc73769081bdd9b782d08d27794780b7a99b9
Qt version: 6.5.0
Additional Context:
This issue may impact other Qt-related plugins as well. Adjusting the RUNPATH manually is possible, but this should ideally be handled automatically by vcpkg during the installation or packaging process.
Beta Was this translation helpful? Give feedback.
All reactions