Menu

#2705 gnuplot 6.0.0 fails to build with Qt6 on Fedora

None
closed-fixed
nobody
None
2024-05-28
2024-05-03
No

Build fails on Fedora Rawhide with Qt6:

g++ -DHAVE_CONFIG_H -I. -I../../src -I..  -I../term -I../../term -DBINDIR=\"/usr/bin\" -DX11_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DQT_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DGNUPLOT_SHARE_DIR=\"/usr/share/gnuplot/6.0\" -DGNUPLOT_PS_DIR=\"/usr/share/gnuplot/6.0/PostScript\" -DGNUPLOT_JS_DIR=\"/usr/share/gnuplot/6.0/js\" -DGNUPLOT_LUA_DIR=\"/usr/share/gnuplot/6.0/lua\" -DCONTACT=\"gnuplot-bugs@lists.sourceforge.net\" -DHELPFILE=\"/usr/share/gnuplot/6.0/gnuplot.gih\" -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's&^&&'`\" -DGNUPLOT_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -I/usr/include/qt6/QtNetwork -I/usr/include/qt6 -DQT_NETWORK_LIB -I/usr/include/qt6/QtSvg -DQT_SVG_LIB -I/usr/include/qt6/QtGui -DQT_GUI_LIB -I/usr/include/qt6/QtPrintSupport -DQT_PRINTSUPPORT_LIB -I/usr/include/qt6/QtCore5Compat -DQT_CORE5COMPAT_LIB -I/usr/include/qt6/QtCore -DQT_CORE_LIB -I/usr/lib64/qt6/mkspecs/linux-g++ -DGNUPLOT_QT=\"`echo gnuplot_qt | sed 's&^&&'`\" -DQTGNUPLOT_DATA_DIR=\"/usr/share/gnuplot/6.0/qt\" -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include/webp -DAVIF_DLL  -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/libpng16 -DWITH_GZFILEOP -I/usr/include/sysprof-6 -pthread -I/usr/include/webp -I/usr/include/qt6/QtNetwork -I/usr/include/qt6 -DQT_NETWORK_LIB -I/usr/include/qt6/QtSvg -DQT_SVG_LIB -I/usr/include/qt6/QtGui -DQT_GUI_LIB -I/usr/include/qt6/QtPrintSupport -DQT_PRINTSUPPORT_LIB -I/usr/include/qt6/QtCore5Compat -DQT_CORE5COMPAT_LIB -I/usr/include/qt6/QtCore -DQT_CORE_LIB -I/usr/lib64/qt6/mkspecs/linux-g++  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -fPIC  -c -o qtterminal/gnuplot_qt.o ../../src/qtterminal/gnuplot_qt.cpp
make[4]: Leaving directory '/builddir/build/BUILD/gnuplot-6.0.0/qt/src'
In file included from ../../src/qtterminal/gnuplot_qt.cpp:44:
../../src/qtterminal/QtGnuplotApplication.h:49:10: fatal error: QApplication: No such file or directory
   49 | #include <QApplication>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:1049: qtterminal/gnuplot_qt.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Entering directory '/builddir/build/BUILD/gnuplot-6.0.0/qt/src'
g++ -DHAVE_CONFIG_H -I. -I../../src -I..  -I../term -I../../term -DBINDIR=\"/usr/bin\" -DX11_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DQT_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DGNUPLOT_SHARE_DIR=\"/usr/share/gnuplot/6.0\" -DGNUPLOT_PS_DIR=\"/usr/share/gnuplot/6.0/PostScript\" -DGNUPLOT_JS_DIR=\"/usr/share/gnuplot/6.0/js\" -DGNUPLOT_LUA_DIR=\"/usr/share/gnuplot/6.0/lua\" -DCONTACT=\"gnuplot-bugs@lists.sourceforge.net\" -DHELPFILE=\"/usr/share/gnuplot/6.0/gnuplot.gih\" -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's&^&&'`\" -DGNUPLOT_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -I/usr/include/qt6/QtNetwork -I/usr/include/qt6 -DQT_NETWORK_LIB -I/usr/include/qt6/QtSvg -DQT_SVG_LIB -I/usr/include/qt6/QtGui -DQT_GUI_LIB -I/usr/include/qt6/QtPrintSupport -DQT_PRINTSUPPORT_LIB -I/usr/include/qt6/QtCore5Compat -DQT_CORE5COMPAT_LIB -I/usr/include/qt6/QtCore -DQT_CORE_LIB -I/usr/lib64/qt6/mkspecs/linux-g++ -DGNUPLOT_QT=\"`echo gnuplot_qt | sed 's&^&&'`\" -DQTGNUPLOT_DATA_DIR=\"/usr/share/gnuplot/6.0/qt\" -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include/webp -DAVIF_DLL  -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/libpng16 -DWITH_GZFILEOP -I/usr/include/sysprof-6 -pthread -I/usr/include/webp -I/usr/include/qt6/QtNetwork -I/usr/include/qt6 -DQT_NETWORK_LIB -I/usr/include/qt6/QtSvg -DQT_SVG_LIB -I/usr/include/qt6/QtGui -DQT_GUI_LIB -I/usr/include/qt6/QtPrintSupport -DQT_PRINTSUPPORT_LIB -I/usr/include/qt6/QtCore5Compat -DQT_CORE5COMPAT_LIB -I/usr/include/qt6/QtCore -DQT_CORE_LIB -I/usr/lib64/qt6/mkspecs/linux-g++  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -fPIC  -c -o qtterminal/QtGnuplotWindow.o ../../src/qtterminal/QtGnuplotWindow.cpp
make[4]: Leaving directory '/builddir/build/BUILD/gnuplot-6.0.0/qt/src'
In file included from ../../src/qtterminal/QtGnuplotWindow.cpp:49:
../../src/qtterminal/QtGnuplotWindow.h:49:10: fatal error: QMainWindow: No such file or directory
   49 | #include <QMainWindow>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:1049: qtterminal/QtGnuplotWindow.o] Error 1
make[4]: Entering directory '/builddir/build/BUILD/gnuplot-6.0.0/qt/src'
g++ -DHAVE_CONFIG_H -I. -I../../src -I..  -I../term -I../../term -DBINDIR=\"/usr/bin\" -DX11_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DQT_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -DGNUPLOT_SHARE_DIR=\"/usr/share/gnuplot/6.0\" -DGNUPLOT_PS_DIR=\"/usr/share/gnuplot/6.0/PostScript\" -DGNUPLOT_JS_DIR=\"/usr/share/gnuplot/6.0/js\" -DGNUPLOT_LUA_DIR=\"/usr/share/gnuplot/6.0/lua\" -DCONTACT=\"gnuplot-bugs@lists.sourceforge.net\" -DHELPFILE=\"/usr/share/gnuplot/6.0/gnuplot.gih\" -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's&^&&'`\" -DGNUPLOT_DRIVER_DIR=\"/usr/libexec/gnuplot/6.0\" -I/usr/include/qt6/QtNetwork -I/usr/include/qt6 -DQT_NETWORK_LIB -I/usr/include/qt6/QtSvg -DQT_SVG_LIB -I/usr/include/qt6/QtGui -DQT_GUI_LIB -I/usr/include/qt6/QtPrintSupport -DQT_PRINTSUPPORT_LIB -I/usr/include/qt6/QtCore5Compat -DQT_CORE5COMPAT_LIB -I/usr/include/qt6/QtCore -DQT_CORE_LIB -I/usr/lib64/qt6/mkspecs/linux-g++ -DGNUPLOT_QT=\"`echo gnuplot_qt | sed 's&^&&'`\" -DQTGNUPLOT_DATA_DIR=\"/usr/share/gnuplot/6.0/qt\" -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include/webp -DAVIF_DLL  -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/libpng16 -DWITH_GZFILEOP -I/usr/include/sysprof-6 -pthread -I/usr/include/webp -I/usr/include/qt6/QtNetwork -I/usr/include/qt6 -DQT_NETWORK_LIB -I/usr/include/qt6/QtSvg -DQT_SVG_LIB -I/usr/include/qt6/QtGui -DQT_GUI_LIB -I/usr/include/qt6/QtPrintSupport -DQT_PRINTSUPPORT_LIB -I/usr/include/qt6/QtCore5Compat -DQT_CORE5COMPAT_LIB -I/usr/include/qt6/QtCore -DQT_CORE_LIB -I/usr/lib64/qt6/mkspecs/linux-g++  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -fPIC  -c -o qtterminal/QtGnuplotApplication.o ../../src/qtterminal/QtGnuplotApplication.cpp
make[4]: Leaving directory '/builddir/build/BUILD/gnuplot-6.0.0/qt/src'
In file included from ../../src/qtterminal/QtGnuplotApplication.cpp:44:
../../src/qtterminal/QtGnuplotApplication.h:49:10: fatal error: QApplication: No such file or directory
   49 | #include <QApplication>
      |          ^~~~~~~~~~~~~~
compilation terminated.

These files are in /usr/include/qt6/QtWidgets but that component does not appear to be looked for and added to the include/lib list.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2024-05-04

    The gnuplot configuration check is

    PKG_CHECK_MODULES_NOFAIL(QT, [Qt6Core Qt6Gui Qt6Network Qt6Svg Qt6PrintSupport Qt6Core5Compat])
    

    On my machines (Mageia 8/9/10) the Qt6Widgets module is a requirement for the QtPrintSupport package and is pulled in automatically by that. So checking for QtPrintSupport implicitly also checks for Qt6Widgets.

    Name: Qt6 PrintSupport
    Description: Qt PrintSupport module
    Version: 6.4.1
    Libs: -L${libdir} -lQt6PrintSupport
    Cflags: -I${includedir}/QtPrintSupport -I${includedir} -DQT_PRINTSUPPORT_LIB
    Requires: Qt6Core Qt6Gui Qt6Widgets
    

    Do the Fedora dependencies work differently?
    Does adding Qt6Widgets to the PKG_CHECK_MODULES list at least produce a more useful error message?

     

    Last edit: Ethan Merritt 2024-05-04
  • Orion Poplawski

    Orion Poplawski - 2024-05-05

    In Fedora the QtWidgets package is part of the qt6-qtbase package, so it's present. The problem is that there is no -I/usr/include/qt6/QtWidgets being added to the compile flags. But it does look like adding Qt6Widgets to the PKG_CHECK_MODULES line gets that added and allows the build to succeed.

     
  • Ethan Merritt

    Ethan Merritt - 2024-05-15
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2024-05-15

    requested fix merged into 6.0 and 6.1

     
  • Ethan Merritt

    Ethan Merritt - 2024-05-28
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.