CMake build can't find Qt6 library in /usr/local
0
votes
1
answer
909
views
I have an Orange Pi 5, an arm64 SBC running *Joshua Riek's Ubuntu 22.04.4 for RK3588* (link to project ).
I'm trying to build Duckstation , a PS1 emulator, which depends on Qt 6.6.2. The latest arm64 Qt version I have available through apt is version 6.2.4.
I'm building Qt 6.6.2 from source, but I'm having issues linking the built library to the Duckstation cmake build.
### Building Qt 6.6.2 from git
The Qt installer application is not available for arm64, so I followed Qt's documentation on how to build Qt6 from git, found here . The steps I have taken are as follows:
1. Clone the Qt6 repository and switch to 6.6.2 branch
### Building Duckstation
Following the build instructions on Duckstation's readme, here are the build steps
1. Clone the repository
**How do I link the built library to the CMake build?**
I have tried creating an ldconfig file
$ git clone git://code.qt.io/qt/qt5.git qt6
$ cd qt6
$ git switch 6.6.2
2. Initialize the submodules with init-repository script
$ perl init-repository
3. Create a build directory and configure
$ mkdir build && cd build
$ ../configure
I left the -prefix attribute out, by default it will be set to /usr/local/Qt-6.6.2
4. Build the whole Qt6 library and install
$ cmake --build . --parallel $(nproc)
$ sudo cmake --install .
Building the full library takes over an hour on this platform. After installing, the contents of the directory /usr/local/Qt-6.6.2
look like this:

$ git clone https://github.com/stenzek/duckstation.git duckstation
$ cd duckstation
2. Create a build directory and configure
$ mkdir build
$ cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
When trying to configure the build, I'm getting an error locating the Qt 6.6.2:

/etc/ld.so.conf.d/Qt-6.6.2.conf
which contains
/usr/local/Qt-6.6.2/bin
/usr/local/Qt-6.6.2/lib
After creating the file, I ran sudo ldconfig
.
If it's not a linking issue, am I installing the Qt6 to a wrong location, or missing some critical configuration step in the build?
As a sidenote: I'm able to build Duckstation successfully by patching the required Qt version to 6.2.4 and by modifying the sources a bit, but I'd like to be able to build the main branches, for handling updates more easily etc.
Asked by eeliale
(11 rep)
Mar 15, 2024, 01:09 PM
Last activity: Mar 15, 2024, 05:37 PM
Last activity: Mar 15, 2024, 05:37 PM