Best way to install Qt5 on Ubuntu 23.10

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_4.11.2
_Operating System:_Ubuntu 23.10
_Compiler/Version:_g++ 13.2.0
_CMake Version:_3.27

What’s the best way to install Qt for G4.11.2 ?

I try to install Qt5 on a Ubuntu23.10 OS compiling Qt5.15.2 source with a « make » and « make install » to have Qt5 in /usr/local

I download the qt-everywhere-src-5.15.2.tar.gz file from the Qt
(Index of /archive/qt/5.15/5.15.2/single page

after unzipping this file, i did a shadow building, that i create a qt-everywhere-src-5.15.2-build directory out of the src file.
i run inside the build directory, the configure file

cd ~/qt-everywhere-src-5.15.2-build
~/ qt-everywhere-src-5.15.2/configure

I should modify the ~/qt-everywhere-src-5.15.2/qtbase/src/corelib/global/qglobal.h file to avoid a first error (error : ‘numeric_limits’ is not a class template…)

Such an error is documented on the web. One should add the three first lines to the qglobal.h header file

#ifdef __cplusplus
#include
#endif

Afterthat configure is successfull and generate makefiles in the ~/qt-everywhere-src-5.15.2-build repertory

I ran then « make » but have the following error

image

I try on a second PC the same process. I note that on this other PC the output lines were different since it request that llvm-config file is in the PATH

image

So i add in my « .basrhc file » ‘export PATH=${PATH}:/usr/lib/llvm-13/bin’
I ran again « make » but got the following error

image

I also try downloading the Qt online installer via Qt Account Downloads and follow the instructions in the installer. I select the following components using the following wizard.

image

I got the following in /usr/local

image

So dear experts what is the best way to install Qt5 for G4 ?

Gosh, you show commendable persistence!! Have you tried homebrew? (https://brew.sh) Works a treat on my Mac. They say Linux too - The Missing Package Manager for macOS (or Linux).

For Qt5 it would be
$ brew install qt@5

Why not just install the system packages for qt5?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.