Solved Configure & Build from Source for aarch64
-
Hello,
I am trying to Build/Configure from source and I have run into a problem that is totally beyond my knowledge. I need some guidance on a workaround, please.
The error message during the configure command prior to the make step is:
Configuring 'qtgraphicaleffects' CMake Error at qtgraphicaleffects/src/effects/CMakeLists.txt:7 (add_qml_module): Unknown CMake command "add_qml_module".
I am using the instructions at https://doc.qt.io/qt-5/linux-building.html for the following platform:
-
Ubuntu 20.10 (using 64-bit pre-installed official) image
-
Raspberry Pi 4 (hence the aarch64 reference in the Subject line)
The specific command line for the configure operation is:
$ ../configure -developer-build -opensource -nomake examples -nomake tests
I had to build CMake from source since the Ubuntu repository had an older version.
$ cmake --version cmake version 3.18.4 CMake suite maintained and supported by Kitware (kitware.com/cmake). $
The steps to download the source (from the cited Qt documentation with adjustments to my local folder names) were:
$ git clone git://code.qt.io/qt/qt5.git $ cd qt5 $ perl init-repository $ git submodule update –-init –-recursive
No errors or warnings were reported during the execution of the above commands to download the source files. All the prerequisites for the build were completed - Build essentials, Libxcb, Qt WebKit, Qt WebEngine and Qt Multimedia. The only difference between the documentation and my installation is that all the llvm files were under /usr/lib (and not /usr/llvm as mentioned in the documentation). So my export statement for LLVM_INSTALL_DIR was set to /usr/lib.
Thanks for reading this plea for help! As stated above, I have no clue about add_qml_module; please advise on a workaround.
Kind regards.
-
-
You are building Qt 6 (that's what is in
dev
branch at the moment), which is still not released. For best results, try with some stable Qt version like 5.15.1. -
You are building Qt 6 (that's what is in
dev
branch at the moment), which is still not released. For best results, try with some stable Qt version like 5.15.1. -
Hello @sierdzio,
Thank you very much for your prompt response. I inserted the following command after cloning the repository:
$ git checkout 5.15.1
It helped me overcome the error message and run the subsequent make commands to completion. Self-inflicted operator/user error on my part since my limited knowledge on Git commands led me to believe that I would be on the master branch by default. Thanks to you, now I know the difference between dev, stable, release, lts and lts-release.
Issue resolved!
I had some errors flagged related to QtWebEngine but that is a topic for a fresh thread later. Installing Qt fulfilled step 2 of 6 prerequisites. My goal is to build RStudio from source for my platform.
Thanks again; I haven't given Qt much consideration previously (since I work mostly in middleware) but now understanding its true portability and versatility (especially for mobile apps), I am sure that I will be working on the Qt tutorials soon. :)
Kind regards.