Bug #1296
open3.1.4: meson.build:3180:4: ERROR: Problem encountered: Qt6 >= 6.0 required for qt-client in Qt6 mode, but not found
0%
Description
One of our downstream users has reported that they are unable to build Freeciv.
meson.build:3180:4: ERROR: Problem encountered: Qt6 >= 6.0 required for qt-client in Qt6 mode, but not found
The system where this issue was encountered has Qt 6.8.2
meson-log.txt
reveals the offending check to be here: https://github.com/freeciv/freeciv/blob/aa4161bf18fb142c0654ec26f53e308e95a759d4/meson.build#L3630-L3652
----------- Command line: `x86_64-pc-linux-gnu-g++ -I/usr/include/qt6/QtWidgets -I/usr/include/qt6 -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtCore -I/usr/lib64/qt6/mkspecs/linux-g++ /var/tmp/portage/games-strategy/freeciv-3.1.4/work/freeciv-3.1.4-build/meson-private/tmpsefbv08e/testfile.cpp -o /var/tmp/portage/games-strategy/freeciv-3.1.4/work/freeciv-3.1.4-build/meson-private/tmpsefbv08e/output.obj -c -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -std=c++17` -> 1 stderr: In file included from /usr/include/qt6/QtCore/qtcoreexports.h:7, from /usr/include/qt6/QtCore/qglobal.h:26, from /usr/include/qt6/QtCore/QtCore:4, from /var/tmp/portage/games-strategy/freeciv-3.1.4/work/freeciv-3.1.4-build/meson-private/tmpsefbv08e/testfile.cpp:1: /usr/include/qt6/QtCore/qcompilerdetection.h:1281:4: error: #error "You must build your code with position independent code if Qt was configured with -reduce-relocations. " "Compile your code with -fPIC (and not with -fPIE)." 1281 | # error "You must build your code with position independent code if Qt was configured with -reduce-relocations. "\ | ^~~~~ -----------
We don't quite understand why this check fails (sometimes - we obviously managed to successfully package and test it), or why it's not a straightforward version check - later Qt releases should just make this information available via pkg-config.
Gentoo Bug: https://bugs.gentoo.org/953902
Build Log: https://bugs.gentoo.org/attachment.cgi?id=924944
meson Log: https://bugs.gentoo.org/attachment.cgi?id=924946
Please let me know if there's any
Files