Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 871957

Summary: dev-qt/qtcore: Configure anomaly between "qtcore" and "qtgui" causes compile failure for custom program building
Product: Gentoo Linux Reporter: Stephen Lewis <lewis+gentoo>
Component: Current packagesAssignee: Qt Bug Alias <qt>
Status: UNCONFIRMED ---    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Trivial QT app causes problem with -Werror
Host emerge --info

Description Stephen Lewis 2022-09-19 23:00:22 UTC
Created attachment 812992 [details]
Trivial QT app causes problem with -Werror

Inconsistent #defines leads to -Werror failure in "qtcore", "qtgui"
Global USE "jpeg" is OFF, curiously "gtgui" also has local "jpeg"
Similar to bug 751349 but user should be able to set -Werror
Trivial QT app attached shows problem:

g++ -fPIC -Werror $(pkg-config --cflags --libs Qt5Widgets) qtgui.cpp
In file included from /usr/include/qt5/QtGui/qtguiglobal.h:44,
                 from /usr/include/qt5/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/qt5/QtWidgets/qapplication.h:43,
                 from /usr/include/qt5/QtWidgets/QApplication:1,
                 from qtgui.cpp:1:
/usr/include/qt5/QtGui/qtgui-config.h:25: error: "QT_NO_IMAGEFORMAT_JPEG" redefined [-Werror]
   25 | #define QT_NO_IMAGEFORMAT_JPEG true
      | 
In file included from /usr/include/qt5/QtCore/qconfig.h:1,
                 from /usr/include/qt5/QtCore/qglobal.h:66,
                 from /usr/include/qt5/QtGui/qtguiglobal.h:43,
                 from /usr/include/qt5/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/qt5/QtWidgets/qapplication.h:43,
                 from /usr/include/qt5/QtWidgets/QApplication:1,
                 from qtgui.cpp:1:
/usr/include/qt5/Gentoo/gentoo-qconfig.h:8: note: this is the location of the previous definition
    8 | #define QT_NO_IMAGEFORMAT_JPEG
      | 
cc1plus: all warnings being treated as errors
Comment 1 Stephen Lewis 2022-09-19 23:04:01 UTC
Created attachment 812995 [details]
Host emerge --info