Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 515080 - [qt overlay] dev-qt/qtgui-5.3.0 not defining QT_OPENGL
Summary: [qt overlay] dev-qt/qtgui-5.3.0 not defining QT_OPENGL
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-25 09:21 UTC by JY
Modified: 2014-06-28 02:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
qconfig.h with fix (qconfig.h,3.95 KB, text/x-chdr)
2014-06-26 07:43 UTC, JY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JY 2014-06-25 09:21:05 UTC
qtgui ebuild adds QT_NO_OPENGL macro in QCONFIG_DEFINE if there is not use flag, but do not add QT_OPENGL if there is one.


Reproducible: Always

Steps to Reproduce:
1. Install qtgui-5.3.0 with opengl use
2. Try to compile a program including QOpenGLShader
Actual Results:  
error telling that class QOpenGLShader is not defined

Expected Results:  
program compiling

code in qtgui-5.3.0.ebuild :

QCONFIG_DEFINE=(
$(use accessibility && echo QT_ACCESSIBILITY_ATSPI_BRIDGE || echo QT_NO_ACCESSIBILITY_ATSPI_BRIDGE)
$(use egl || echo QT_NO_EGL QT_NO_EGL_X11)
$(use eglfs || echo QT_NO_EGLFS)
$(use evdev || echo QT_NO_EVDEV)
$(use gles2 && echo QT_OPENGL_ES QT_OPENGL_ES_2)
$(use jpeg || echo QT_NO_IMAGEFORMAT_JPEG)
$(use opengl || echo QT_NO_OPENGL)
$(use png || echo QT_NO_IMAGEFORMAT_PNG)
)

QtCore/qconfig.h :

#if defined(QT_NO_OPENGL) && defined(QT_OPENGL)
# undef QT_NO_OPENGL
#elif !defined(QT_NO_OPENGL) && !defined(QT_OPENGL)
# define QT_NO_OPENGL
#endif
Comment 1 JY 2014-06-25 10:02:45 UTC
Fix available here : https://github.com/gentoo/qt/pull/57
Comment 2 Davide Pesavento (RETIRED) gentoo-dev 2014-06-26 00:08:42 UTC
The fix looks good, but I'm not sure if I understand what's really going on.

We don't add QT_OPENGL because the configure script doesn't...

# enable opengl
if [ "$CFG_OPENGL" = "no" ]; then
    QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
else
    QT_CONFIG="$QT_CONFIG opengl"
fi

Can you attach your entire qconfig.h please?
Comment 3 JY 2014-06-26 07:43:02 UTC
Created attachment 379704 [details]
qconfig.h with fix
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2014-06-28 02:25:11 UTC
Ok I see what's going on...
QtCore/qconfig.h is generated when qtcore is built, i.e. when the opengl deps may or may not be installed. If they're not, CFG_OPENGL is set to "no", QT_NO_OPENGL ends up in QCONFIG_FLAGS, and the preprocessor stuff is generated. Later, when qtgui is built, it's too late to change qconfig.h.

The patch is therefore correct, however this is just one symptom of a more general problem that has to be fixed for good at the eclass level (see also bug 510556).
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2014-06-28 02:38:28 UTC
Merged https://github.com/gentoo/qt/pull/59