Bug 313662

Summary: Phonon 'five' and phonon4qt5 branches fails to compile when QT5 has been compiled with -opengl es2
Product: [Frameworks and Libraries] Phonon Reporter: bluescreenavenger
Component: generalAssignee: Harald Sitter <sitter>
Status: RESOLVED FIXED    
Severity: normal CC: heri+kde, jb, martin.sandsmark, myriam, romain.perier
Priority: NOR    
Version: 4.6-git   
Target Milestone: 4.6.1   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description bluescreenavenger 2013-01-22 00:59:59 UTC
It seems that Phonon branches for QT5 do not currently support compiling with a QT5 that has been set to use es2 opengl. As qtwayland requires es2, I think this should be supported

Reproducible: Always




-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Enabling backend state machine validation.
-- Using CMake automoc builtin
-- Performing Test HAVE_FPIE_SUPPORT
-- Performing Test HAVE_FPIE_SUPPORT - Success
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success
-- Performing Test __KDE_HAVE_GCC_VISIBILITY
-- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success
-- Looking for XOpenDisplay in /opt/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /opt/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /opt/lib/i386-linux-gnu/libX11.so
-- Found OpenGL: /opt/lib/i386-linux-gnu/libGL.so  
-- PHONON_QT_IMPORTS_DIR is set to /opt/lib/qt5/imports.
      The QML plugins for Phonon will not be installed into the Qt system installation directory,
      which is /opt/imports .
      This means the QML plugins file will not be found by default.
      You can:
       * switch the cmake option PHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT to TRUE
       * set PHONON_QT_IMPORTS_INSTALL_DIR manually to the system Qt location
       * at runtime, set the QML_IMPORT_PATH environment variable
-- PHONON_QT_MKSPECS_INSTALL_DIR is set to /opt/share/qt5/mkspecs/modules.
      The Qt mkspecs file for Phonon will not be installed into the Qt system installation directory,
      which is /opt/mkspecs/modules .
      This means the qt_phonon.pri file will not be found by default.
      You can:
       * switch the cmake option PHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT to TRUE
       * set PHONON_QT_MKSPECS_INSTALL_DIR manually to the system Qt location
       * at runtime, with Qt >= 4.8, set the QMAKEPATH environment variable
-- PHONON_QT_PLUGIN_INSTALL_DIR is set to /opt/lib/qt5/plugins/designer.
      The Qt designer plugins for Phonon will not be installed into the Qt system installation directory,
      which is /opt/plugins/designer .
      This means the designer plugins file will not be found by default.
      You can:
       * switch the cmake option PHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT to TRUE
       * set PHONON_QT_PLUGINS_INSTALL_DIR manually to the system Qt location
       * at runtime, set the QT_PLUGIN_PATH environment variable
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- checking for module 'glib-2.0'
--   found glib-2.0, version 2.35.5
-- Found GLIB2: /opt/lib/i386-linux-gnu/libglib-2.0.so
CMake Warning at phonon/CMakeLists.txt:25 (message):
  QZeitgeist has not been ported to Qt5, support is disabled.


-- 
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ Qt5 Core (qtbase)
+ Qt5 Gui (qtbase)
+ Qt5 Widgets (qtbase)
+ Qt5 DBus (qtbase)
+ Qt5 Designer (qttools)
+ Qt5 OpenGL (qtbase)
+ OpenGL
+ Qt5 Declarative (qtquick1)
+ PulseAudio
+ GLib2
Congratulations! All external packages have been found.
-----------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: /srcbuild/phonon/build
Scanning dependencies of target phonon4qt5_automoc
Scanning dependencies of target phonon4qt5experimental_automoc
Scanning dependencies of target phononqmlplugin_automoc
[  1%] [  2%] [  4%] Automoc for target phonon4qt5
Automoc for target phonon4qt5experimental
Automoc for target phononqmlplugin
Generating moc_avcapture.cpp
Generating moc_audiodataoutput.cpp
Generating moc_factory_p.cpp
Generating moc_videodataoutput.cpp
Generating moc_videodataoutput2.cpp
Generating moc_videowidget.cpp
Generating moc_visualization.cpp
[  4%] Built target phonon4qt5experimental_automoc
Generating moc_audiooutputelement.cpp
Generating moc_mediaelement.cpp
Generating moc_metadata.cpp
Generating moc_subtitleelement.cpp
Generating moc_videoformatspy.cpp
Generating moc_videooutputelement.cpp
Generating moc_volumefadereffectelement.cpp
[  4%] Built target phononqmlplugin_automoc
Generating moc_abstractaudiooutput.cpp
Generating moc_abstractmediastream.cpp
Generating moc_audiooutput.cpp
Generating moc_audiooutputadaptor_p.cpp
Generating moc_backendcapabilities.cpp
Generating moc_effect.cpp
Generating moc_effectwidget.cpp
Generating factory.moc
Generating moc_factory_p.cpp
Generating moc_videographicsobject.cpp
Generating moc_iodevicestream_p.cpp
Generating moc_mediacontroller.cpp
Generating moc_mediaobject.cpp
Generating moc_pulsestream_p.cpp
Generating moc_pulsesupport.cpp
Generating moc_seekslider.cpp
Generating moc_swiftslider_p.cpp
Generating moc_videoplayer.cpp
Generating moc_videowidget.cpp
Generating moc_volumefadereffect.cpp
Generating moc_volumeslider.cpp
Generating moc_audiodataoutput.cpp
Generating moc_statesvalidator_p.cpp
[  4%] Built target phonon4qt5_automoc
Scanning dependencies of target phonon4qt5
[  5%] [  6%] [  8%] [  9%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/abstractmediastream.cpp.o
Building CXX object phonon/CMakeFiles/phonon4qt5.dir/abstractaudiooutput_p.cpp.o
Building CXX object phonon/CMakeFiles/phonon4qt5.dir/abstractaudiooutput.cpp.o
Building CXX object phonon/CMakeFiles/phonon4qt5.dir/abstractvideooutput.cpp.o
[ 11%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/abstractvideooutput_p.cpp.o
[ 12%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/audiodataoutput.cpp.o
[ 13%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/audiooutput.cpp.o
[ 15%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/audiooutputinterface.cpp.o
[ 16%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/backendcapabilities.cpp.o
[ 18%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/effect.cpp.o
[ 19%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/effectparameter.cpp.o
[ 20%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/effectwidget.cpp.o
[ 22%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/factory.cpp.o
[ 23%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/globalconfig.cpp.o
[ 25%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/iodevicestream.cpp.o
/srcbuild/phonon/phonon/factory.cpp:308:2: warning: #warning TODO hyperspeed: the message box only ought to be shown once and not for every backend switch [-Wcpp]
[ 26%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/mediacontroller.cpp.o
[ 27%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/mediaobject.cpp.o
[ 29%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/medianode.cpp.o
[ 30%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/mediasource.cpp.o
/srcbuild/phonon/phonon/mediaobject.cpp: In member function ‘void Phonon::MediaObject::play()’:
/srcbuild/phonon/phonon/mediaobject.cpp:120:71: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
[ 31%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/mrl.cpp.o
[ 33%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/objectdescription.cpp.o
[ 34%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/objectdescriptionmodel.cpp.o
[ 36%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/path.cpp.o
[ 37%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/phononnamespace.cpp.o
[ 38%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/platform.cpp.o
[ 40%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/pulsesupport.cpp.o
[ 41%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/seekslider.cpp.o
[ 43%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/statesvalidator.cpp.o
[ 44%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/streaminterface.cpp.o
/srcbuild/phonon/phonon/statesvalidator.cpp:193:2: warning: #warning TODO: buffering state needs fixing, should not transit to stop [-Wcpp]
[ 45%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/swiftslider.cpp.o
[ 47%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/volumefadereffect.cpp.o
[ 48%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/volumeslider.cpp.o
[ 50%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/videoplayer.cpp.o
[ 51%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/videowidget.cpp.o
[ 52%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/graphicsview/glpainter.cpp.o
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:35:2: warning: #warning context may be long gone, leading to crashery [-Wcpp]
[ 54%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/graphicsview/glslpainter.cpp.o
/srcbuild/phonon/phonon/graphicsview/glslpainter.cpp:99:2: warning: #warning context may be long gone, leading to crashery [-Wcpp]
/srcbuild/phonon/phonon/graphicsview/glslpainter.cpp:196:2: warning: #warning DUPLICATED CODE [-Wcpp]
[ 55%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/graphicsview/qpainterpainter.cpp.o
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp: In member function ‘void Phonon::GlPainter::initColorMatrix()’:
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:77:12: warning: enumeration value ‘Format_Invalid’ not handled in switch [-Wswitch]
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:77:12: warning: enumeration value ‘Format_RGB32’ not handled in switch [-Wswitch]
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:77:12: warning: enumeration value ‘Format_I420’ not handled in switch [-Wswitch]
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp: In member function ‘void Phonon::GlPainter::initTextures()’:
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:119:53: error: ‘GL_TEXTURE_PRIORITY’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:120:23: error: ‘GL_TEXTURE_ENV’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:120:39: error: ‘GL_TEXTURE_ENV_MODE’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:120:60: error: ‘GL_MODULATE’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:120:71: error: ‘glTexEnvf’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:126:23: error: ‘GL_UNPACK_ROW_LENGTH’ was not declared in this scope
[ 56%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/graphicsview/videographicsobject.cpp.o
make[2]: *** [phonon/CMakeFiles/phonon4qt5.dir/graphicsview/glpainter.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/srcbuild/phonon/phonon/graphicsview/videographicsobject.cpp:240:2: warning: #warning what if no painter could be created? [-Wcpp]
/srcbuild/phonon/phonon/graphicsview/videographicsobject.cpp: In member function ‘Phonon::AbstractVideoGraphicsPainter* Phonon::PrivatePainterFactory::factorize(QList<Phonon::VideoFrame::Format>, QMap<Phonon::GraphicsPainterType, QList<Phonon::VideoFrame::Format> >)’:
/srcbuild/phonon/phonon/graphicsview/videographicsobject.cpp:72:15: warning: enumeration value ‘GraphicsPainterGlArb’ not handled in switch [-Wswitch]
/srcbuild/phonon/phonon/graphicsview/videographicsobject.cpp: At global scope:
/srcbuild/phonon/phonon/graphicsview/videographicsobject.cpp:228:6: warning: unused parameter ‘option’ [-Wunused-parameter]
/srcbuild/phonon/phonon/graphicsview/videographicsobject.cpp:228:6: warning: unused parameter ‘widget’ [-Wunused-parameter]
make[1]: *** [phonon/CMakeFiles/phonon4qt5.dir/all] Error 2
make: *** [all] Error 2
PackageCompileSource finished in 20 seconds
rm: cannot remove `//srcbuild/phonon/Logs/*': No such file or directory
cp: cannot stat `//srcbuild/phonon/Logs/*': No such file or directory
[  1%] [  2%] [  4%] Automoc for target phonon4qt5
Automoc for target phonon4qt5experimental
Automoc for target phononqmlplugin
[  4%] Built target phononqmlplugin_automoc
[  4%] Built target phonon4qt5experimental_automoc
[  4%] Built target phonon4qt5_automoc
[  5%] [  6%] [  9%] [  9%] Building CXX object phonon/CMakeFiles/phonon4qt5.dir/audiooutputadaptor.cpp.o
Building CXX object phonon/CMakeFiles/phonon4qt5.dir/graphicsview/glpainter.cpp.o
Building CXX object phonon/CMakeFiles/phonon4qt5.dir/phonon4qt5_automoc.cpp.o
Building CXX object phonon/CMakeFiles/phonon4qt5.dir/pulsestream.cpp.o
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:35:2: warning: #warning context may be long gone, leading to crashery [-Wcpp]
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp: In member function ‘void Phonon::GlPainter::initColorMatrix()’:
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:77:12: warning: enumeration value ‘Format_Invalid’ not handled in switch [-Wswitch]
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:77:12: warning: enumeration value ‘Format_RGB32’ not handled in switch [-Wswitch]
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:77:12: warning: enumeration value ‘Format_I420’ not handled in switch [-Wswitch]
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp: In member function ‘void Phonon::GlPainter::initTextures()’:
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:119:53: error: ‘GL_TEXTURE_PRIORITY’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:120:23: error: ‘GL_TEXTURE_ENV’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:120:39: error: ‘GL_TEXTURE_ENV_MODE’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:120:60: error: ‘GL_MODULATE’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:120:71: error: ‘glTexEnvf’ was not declared in this scope
/srcbuild/phonon/phonon/graphicsview/glpainter.cpp:126:23: error: ‘GL_UNPACK_ROW_LENGTH’ was not declared in this scope
make[2]: *** [phonon/CMakeFiles/phonon4qt5.dir/graphicsview/glpainter.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [phonon/CMakeFiles/phonon4qt5.dir/all] Error 2
make: *** [all] Error 2
Comment 1 Jean-Baptiste Kempf 2013-05-25 20:52:47 UTC
Can you please try again with the important changes and merges that have happened today in the master.
Comment 2 bluescreenavenger 2013-05-31 03:13:52 UTC
Now I am getting:

CMake Error at cmake/FindPhononInternal.cmake:404 (message):
  Qt compiled without support for -fvisibility=hidden.  This will break
  plugins and linking of some applications.  Please fix your Qt installation
  (try passing --reduce-exports to configure).
Call Stack (most recent call first):
  CMakeLists.txt:45 (include)


-- Configuring incomplete, errors occurred!


I built my QT with
-confirm-license  -opensource -qpa -xcb -egl -opengl es2 -prefix $INSTALLDIR -release  -no-reduce-relocations -reduce-exports -no-gtkstyle -openssl-linked -make examples
Comment 3 Harald Sitter 2013-05-31 10:59:52 UTC
Please note that you need to pass -DPHONON_BUILD_PHONON4QT5=ON to cmake.
Comment 4 bluescreenavenger 2013-05-31 11:42:01 UTC
Awesome. That worked. 
It seems this page will need to be modified for those instructions though:
http://community.kde.org/Frameworks/Building/Details
Comment 5 Harald Sitter 2013-05-31 11:46:29 UTC
Marking fixed, although technically we just deactivated the broken parts by default :P

Also community.kde is a wiki, so feel free to edit :)