Building QT 5.12.11 LTS to run on both CentOS7 and CentOS8
-
I can build 5.12.11 LTS from source on CentOS7 with the native gcc 4.8.5 using the suggested config options from the table on the support page (e.g., -opensource -confirm-license -verbose -release -shared -nomake tests -nomake examples -no-libudev -no-use-gold-linker -force-debug-info -separate
-debug-info -no-sql-mysql -plugin-sql-psql -plugin-sql-sqlite -qt-libjpeg -qt-libpng -qt-xcb -sysconfdir /etc/xdg -qt-pcre -qt-harfbuzz -R .)The CentOS7 build does create a libQt5X11Extras.so and Qt binaries link against the native CentOS7 libraries like libicu*.so.50 and libpng15.so.15. That CentOS7 build cannot run on CentOS8 because those system library versions have been respectively bumped to 60 and 16.
If I build the same 5.12.11 source on CentOS8 using the native gcc 8.4.1 with the same config options used for the CentOS7 build, then the newer libicu* and libpng* system libs are linked in, but no libQt5X11Extras.so is built - which our code uses.
I'm somewhat new to building QT from source and so would like to understand if my approach is correct, e.g., is it OK to expect the 5.12.11 source can be configured to build libQt5X11Extras.so on CentOS8 - or what a workaround/alternative could be for config options.
-
Hi and welcome to devnet,
If that module is not built then you are likely missing one of its dependencies. Did you check that ?
-
Hi, and welcome!
As @SGaist mentioned, it's likely a dependency issue. Ensure that you've installed all the development libraries listed at https://doc.qt.io/qt-5/linux-requirements.html
The same configuration options should then work.
-
Thank you SGaist and JKSH for the prompt replies and info. For both the cos7 and cos8 builds the init-repository command listed the qtx11extras module by default and I also manually did a "git submodule init qtx11extras" followed by a "git submodule update qtx11extras". When I compare the build logs I see the cos7 build enters the qtx11extras/src subdir and shortly after a perl command is run, make recurses down 3 levels and builds that source. But in the cos8 build make only recurses down 2 levels and does not issue commands to build the source. I will try to see if I am missing something on the cos8 system. I have attached a screenshot comparing the build logs.
