OpenRV
OpenRV copied to clipboard
Linux build: Qt5 `resources` and `translations` are in a different folder
Hi,
I am trying to build OpenRV on Gentoo (5.15.80-gentoo-x86_64) and I managed to install all the dependencies including Qt packages.
However during the CMake configure step, I have these two errors:
$ cmake -B cmake-build -DRV_DEPS_QT5_LOCATION=/usr/lib64/qt5
...
-- Copying Qt into /home/johhnry/git/AcademySoftwareFoundation/OpenRV/cmake-build/stage/app
-- Copying Qt libexec files ...
-- Copying Qt resources files ...
CMake Error at cmake/dependencies/qt5.cmake:127 (FILE):
FILE COPY cannot find "/usr/lib64/qt5/resources": No such file or
directory.
Call Stack (most recent call first):
cmake/dependencies/CMakeLists.txt:36 (INCLUDE)
-- Copying Qt translations files ...
CMake Error at cmake/dependencies/qt5.cmake:133 (FILE):
FILE COPY cannot find "/usr/lib64/qt5/translations": No such file or
directory.
Call Stack (most recent call first):
cmake/dependencies/CMakeLists.txt:36 (INCLUDE)
...
I found that on my system, the qt5 files are located in /usr/lib64/qt5 but the resources and translations folder are located in /usr/share/qt5.
This is corresponding Cmake configuration code that does that:
# cmake/dependencies/qt5.cmake
MESSAGE(STATUS "Copying Qt resources files ...")
FILE(
COPY "${RV_DEPS_QT5_LOCATION}/resources"
DESTINATION "${RV_STAGE_ROOT_DIR}"
)
MESSAGE(STATUS "Copying Qt translations files ...")
FILE(
COPY "${RV_DEPS_QT5_LOCATION}/translations"
DESTINATION "${RV_STAGE_ROOT_DIR}"
)
I know that CentOS is the preferred platform to build on but could this be fixed by changing the CMake configuration or it's a distribution specific issue?
Thanks!
You should be able to properly build RV if you grab your Qt5 from qt.io's installer. This is what we suggest because other sources might have missing files to build PySide2.
However, we only tested the build on RHEL, and you might hit other issues.
Hi @geffrak,
Thanks for the quick answer, I was able to fix it by modifying the CMake code directly since it's easy to change ;)
Can you propose a pull request?
For now I hard coded the path for both folders, I don't know if it's a standard location but on my other Pop_OS! install I have them in /usr/share/qt5 too.
Should it be a simple if folder exist in RV_DEPS_QT5_LOCATION then ... else use /usr/share/qt5? But it's not configurable thought since it's hard coded and does not depend on a variable...
It could be one variable per QT subfolder. If it exists we use that otherwise we look at the Qt standard path.
I don’t know how Qt for Python will react to non standard paths however.
Fixed by #8