Qt6 dev on Ubuntu 20.04 command line
-
@SGaist thanks for your help the problem is I don't find that module:
First I found the architecture.
aqt list-qt linux desktop --arch 6.5.0
Then I showed the list of modules:
aqt list-qt linux desktop --long-modules 6.5.0 wasm_multithread
qt5compat Qt 5 Compatibility Module qtcharts Qt Charts qtdatavis3d Qt Data Visualization qtgrpc Qt Protobuf and Qt GRPC qthttpserver Qt HTTP Server qtimageformats Qt ImageFormats qtlottie Qt Lottie Animation qtmultimedia Qt Multimedia qtquick3d Qt Quick 3D qtquick3dphysics Quick: 3D Physics qtquicktimeline Qt Quick Timeline qtscxml Qt State Machines qtshadertools Qt Shader Tools qtspeech Qt Speech qtvirtualkeyboard Qt Virtual Keyboard qtwebchannel Qt WebChannel qtwebsockets Qt WebSockets
-
@SGaist Okay I did SOME progress.
This is how it's supposed to install:
aqt install-qt linux desktop 6.5.0 -m qtscxml
however, the application won't run
aqt install-qt linux desktop 6.5.0 -m qtscxml INFO : aqtinstall(aqt) v3.1.5 on Python 3.8.10 [CPython GCC 9.4.0] INFO : Downloading qtsvg... INFO : Downloading qtdeclarative... INFO : Downloading qtscxml... INFO : Downloading qtbase... INFO : Redirected: qt.mirror.constant.com INFO : Redirected: qt.mirror.constant.com INFO : Redirected: qt.mirror.constant.com INFO : Redirected: qt.mirror.constant.com INFO : Finished installation of qtsvg-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 2.28309651 INFO : Finished installation of qtscxml-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 2.41947950 INFO : Downloading qttools... INFO : Downloading qttranslations... INFO : Redirected: qt.mirror.constant.com INFO : Redirected: qt.mirror.constant.com INFO : Finished installation of qttranslations-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 2.75272194 INFO : Downloading qtwayland... INFO : Redirected: qt.mirror.constant.com INFO : Finished installation of qtbase-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 7.15153952 INFO : Downloading icu... INFO : Finished installation of qtwayland-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 2.77396194 INFO : Redirected: qt.mirror.constant.com INFO : Finished installation of icu-linux-Rhel7.2-x64.7z in 3.15005919 INFO : Finished installation of qttools-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 9.06875782 INFO : Finished installation of qtdeclarative-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z in 13.88366899 INFO : Patching /build.dir/6.5.0/gcc_64/bin/qmake INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6StateMachine.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6OpenGLWidgets.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Gui.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QuickControls2.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QmlIntegration.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QmlXmlListModel.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Widgets.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Core.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6LabsSharedImage.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6DBus.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QmlCore.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QmlLocalStorage.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Scxml.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Sql.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QuickDialogs2Utils.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6LabsWavefrontMesh.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6LabsFolderListModel.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QmlModels.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Concurrent.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Platform.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6ScxmlQml.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Designer.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Qml.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Svg.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QuickDialogs2QuickImpl.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6SvgWidgets.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6PrintSupport.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QuickDialogs2.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QuickWidgets.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6WaylandClient.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QuickTemplates2.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6UiPlugin.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QuickTest.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6StateMachineQml.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Test.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6OpenGL.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6LabsQmlModels.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QuickLayouts.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6LabsAnimation.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6LabsSettings.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Quick.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Help.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6UiTools.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Network.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QmlWorkerScript.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6QuickControls2Impl.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Linguist.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Core5Compat.pc INFO : Patching /build.dir/6.5.0/gcc_64/lib/pkgconfig/Qt6Xml.pc INFO : Finished installation INFO : Time elapsed: 15.81068512 second
-
Which application won't run ?
In which context ? -
It's an app I programmed that runs on other distros but I need to do this on Jenkins on Ubuntu 20.04
I installed Qt6 using this command:aqt list-qt linux desktop --arch 6.5.0
The error that I get when compiling the application is:
Could not find a package configuration file provided by "Qt6" with any of the following names: Qt6Config.cmake qt6-config.cmake
The error that I get when trying to run the application (that I compiled previously) is:
error while loading shared libraries: libQt6StateMachine.so.6
-
@SGaist I even tried installing all modules:
aqt install-qt linux desktop 6.5.0 -m all gcc_64
It seems these packages are only installed localy inside that folder.
I would appreciate anybody that has done this -
For the compilation issue, did you point cmake to the Qt lib folder ? Using CMAKE_PREFIX_PATH if memory serves well.
As for running your "pre-built" application, use LD_LIBRARY_PATH to point the library loader to the custom path.
-
@SGaist thanks for your help I'm getting close I read CMAKE_PREFIX_PATH and tried every single possible thing
DCMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH
I've tried the main folder, the subfolder
This is the file here:find ./ -iname 'Qt6Config.cmake'
This is where the file is located:
./6.5.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake -
mkdir build cd build cmake -DCMAKE_PREFIX_PATH=<full_path>/6.5.0/gcc_64/lib/cmake <full_path_to_your_project>
However ! There is an even simpler solution I forgot about: unless aqinstall does something different, you should have a wrapper named
qt-cmake
in the bin folder of your Qt installation, use that one as it has everything set already. -
@SGaist said in Qt6 dev on Ubuntu 20.04 command line:
cmake -DCMAKE_PREFIX_PATH=<full_path>/6.5.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake <full_path_to_your_project>
I think CMAKE_PREFIX_PATH is meant to be a directory, not a file. One of my scripts regularly uses the equivalent of:
cmake -D "CMAKE_PREFIX_PATH=<full_path>/6.5.0/gcc_64/" ...
you should have a wrapper named qt-cmake in the bin folder of your Qt installation
Nice! I didn't know about that. Just looked at its there from my Qt Online Installer versions (and I assume
aqinstall
). I'll have a play and probably start using it from now on :DFor interest, internally it does the equivalent of:
cmake -DCMAKE_TOOLCHAIN_FILE="<full_path>/6.5.0/gcc_64/lib/cmake/Qt6/qt.toolchain.cmake" "$@"
Thanks @SGaist :D
-
@Paul-Colby Good catch ! Copy-Paste without cleanup error and thanks for the additional tip :-)