Bug#850021: openmw: FTBFS on armhf: error: 'GL_AMBIENT' was not declared in this scope

2017-01-05 Thread bret curtis
Hello all,

I've attached a patch for openscenegraph-3.4 that will get it build
with libGL instead of libGLESv2 for armhf. In theory this patch should
also allow OSG-3.4 to be built on armel as well.

Cheers,
Bret


On Tue, Jan 3, 2017 at 11:25 AM, Andreas Beckmann  wrote:
> Control: reassign -1 ftp.debian.org
> Control: severity -1 normal
> Control: retitle -1 RM: openmw [armhf] -- RoQA; needs OSG built against libGL
>
> On 2017-01-03 11:15, bret curtis wrote:
>> Known issue, please read this bug:
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838792
>>
>> Summation: OSG is being built with libGLESv2 and not with libGL on
>> armhf, OpenMW doesn't support GLESv2, nor GLESv1. If we 'fix' the
>> build issue, OpenMW will run, but you only see a black screen. OSG is
>> compiled with libGLESv2 support because of the plugin osgQt.so which
>> requires Qt. Qt is compiled with GLESv2 support instead of libGL on
>> armhf.
>
> So let's remove the outdated openmw armhf binary packages until
> OSG has been "fixed".
>
>
> Andreas
diff --git a/debian/control b/debian/control
index 1877a5d..8531ea6 100644
--- a/debian/control
+++ b/debian/control
@@ -19,17 +19,13 @@ Build-Depends: debhelper (>= 7.0.50),
libgdal-dev,
libx11-dev,
libxmu-dev,
-   freeglut3-dev [!armhf],
-   libgl1-mesa-dev [!armhf] | libgl-dev [!armhf],
-   libegl1-mesa-dev [armhf],
-   libgles2-mesa-dev [armhf],
+   freeglut3-dev,
+   libgl1-mesa-dev | libgl-dev,
libxine2-dev,
libavcodec-dev,
libswscale-dev,
libavdevice-dev,
libavresample-dev,
-   qtbase5-dev,
-   libqt5opengl5-dev,
librsvg2-dev,
libpoppler-glib-dev,
liblua5.2-dev,
diff --git a/debian/rules b/debian/rules
index f2113fb..92855f8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -64,24 +64,6 @@ CXXFLAGS := ${CXXFLAGS} ${ARCH_CXX_FLAGS}
 
 LDFLAGS += -Wl,--as-needed
 
-ifeq (armhf,$(DEB_HOST_ARCH))
-EGL_LDFLAGS=$(shell pkg-config egl --libs)
-OPENGLES_LDFLAGS=$(shell pkg-config glesv2 --libs)
-ARMHF_DEFINES=-D OSG_GL1_AVAILABLE:BOOL=OFF \
-	-D OSG_GL2_AVAILABLE:BOOL=OFF \
-	-D OSG_GL3_AVAILABLE:BOOL=OFF \
-	-D OSG_GLES1_AVAILABLE:BOOL=OFF \
-	-D OSG_GLES2_AVAILABLE:BOOL=ON \
-	-D OSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
-	-D OSG_GL_MATRICES_AVAILABLE:BOOL=OFF \
-	-D OSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
-	-D OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=OFF \
-	-D OSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=OFF \
-	-D OSG_CPP_EXCEPTIONS_AVAILABLE:BOOL=OFF \
-	-D OPENGL_gl_LIBRARY:STRING="${OPENGLES_LDFLAGS}" \
-	-D OPENGL_egl_LIBRARY:STRING="${EGL_LDFLAGS}"
-endif
-
 #
 # Shared libraries version numbers
 #
@@ -329,8 +311,6 @@ MANEXAMPLES = \
 	osgwidgettable.1 \
 	osgwidgetwindow.1 \
 	osgwindows.1 \
-	osgQtBrowser.1 \
-	osgQtWidgets.1 \
 	osganalysis.1 \
 	osganimationeasemotion.1 \
 	osganimationmorph.1 \
@@ -352,12 +332,10 @@ MANEXAMPLES = \
 	osguserstats.1 \
 	osgvertexattributes.1 \
 	osgviewerGTK.1 \
-	osgviewerQtContext.1 \
 	osgviewerSDL.1 \
 	osgvirtualprogram.1 \
 	present3D.1 \
 	osguserdata.1 \
-	osgviewerQt.1 \
 	osgviewerWX.1 \
 	osgatomiccounter.1 \
 	osgcomputeshaders.1 \
@@ -432,7 +410,7 @@ doc-stamp:
 	mkdir -p html
 	doxygen debian/Doxyfile-openscenegraph
 # Use Debian's jquery.js
-	rm html/openscenegraph/jquery.js
+	rm -f html/openscenegraph/jquery.js
 	find html -name "*.html" -print0 | xargs -0 perl -i -pe 's|src="jquery.js"|src="/usr/share/javascript/jquery/jquery.js"|'
 	touch doc-stamp
 
@@ -451,7 +429,6 @@ build-stamp:
 		-D CMAKE_BUILD_TYPE=RelWithDebInfo \
 		-D CMAKE_RELWITHDEBINFO_POSTFIX="" \
 		-D OSG_USE_LOCAL_LUA_SOURCE:BOOL=OFF \
-		${ARMHF_DEFINES} \
 		../..
 	${MAKE} ${PARALLEL_OPTIONS} VERBOSE=1 -C build/osg
 


Bug#850021: openmw: FTBFS on armhf: error: 'GL_AMBIENT' was not declared in this scope

2017-01-03 Thread Andreas Beckmann
Control: reassign -1 ftp.debian.org
Control: severity -1 normal
Control: retitle -1 RM: openmw [armhf] -- RoQA; needs OSG built against libGL

On 2017-01-03 11:15, bret curtis wrote:
> Known issue, please read this bug:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838792
> 
> Summation: OSG is being built with libGLESv2 and not with libGL on
> armhf, OpenMW doesn't support GLESv2, nor GLESv1. If we 'fix' the
> build issue, OpenMW will run, but you only see a black screen. OSG is
> compiled with libGLESv2 support because of the plugin osgQt.so which
> requires Qt. Qt is compiled with GLESv2 support instead of libGL on
> armhf.

So let's remove the outdated openmw armhf binary packages until
OSG has been "fixed".


Andreas



Bug#850021: openmw: FTBFS on armhf: error: 'GL_AMBIENT' was not declared in this scope

2017-01-03 Thread bret curtis
Known issue, please read this bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838792

Summation: OSG is being built with libGLESv2 and not with libGL on
armhf, OpenMW doesn't support GLESv2, nor GLESv1. If we 'fix' the
build issue, OpenMW will run, but you only see a black screen. OSG is
compiled with libGLESv2 support because of the plugin osgQt.so which
requires Qt. Qt is compiled with GLESv2 support instead of libGL on
armhf.

Short term solution: Have OSG build without Qt support thus disabling
osgQt plugin, then remove the armhf hacks to support GLESv2. It will
compile

Long term solution: Qt on armhf needs to be built with libGL instead
of libGLESv2.

If necessary, please file a bug against OSG-3.4. Hopefully this won't
be necessary as I've added Alberto to conversation who maintains
OSG-3.4

For example, on OpenMW's launchpad, we have our own OSG-3.4 builds
that use libGL instead of libGLESv2 on armhf and OpenMW works just
fine on armhf.
https://launchpad.net/~openmw/+archive/ubuntu/openmw/+packages
https://launchpad.net/~openmw/+archive/ubuntu/openmw/+files/openscenegraph-3.4_3.4.0+dfsg1-4+openmw1~xenial1.debian.tar.xz

I hope this helps. I guess this bug will stay open until either
OSG-3.4 is updated (implying either removal of osgQt or update of Qt
itself) or we remove OpenMW from armhf support.

Cheers,
Bret


On Tue, Jan 3, 2017 at 10:29 AM, Andreas Beckmann  wrote:
> Package: openmw
> Version: 0.41.0-1
> Severity: serious
> Justification: fails to build from source (but built successfully in the past)
>
> Hi,
>
> openmw FTBFS on armhf, but built there previously:
>
> https://buildd.debian.org/status/fetch.php?pkg=openmw&arch=armhf&ver=0.41.0-1&stamp=1482596646
>
> [  8%] Building CXX object 
> components/CMakeFiles/components.dir/sceneutil/lightmanager.cpp.o
> cd /«PKGBUILDDIR»/build/components && /usr/bin/c++   
> -DGLOBAL_CONFIG_PATH=\"/etc\" -DGLOBAL_DATA_PATH=\"/usr/share/games\" 
> -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB 
> -DTIXML_USE_STL -D__STDC_CONSTANT_MACROS -I/«PKGBUILDDIR»/. -isystem 
> /usr/include/SDL2 -isystem /usr/include/MYGUI -isystem /usr/include/AL 
> -isystem /usr/include/bullet -isystem /usr/include/qt4 -isystem 
> /usr/include/qt4/QtOpenGL -isystem /usr/include/qt4/QtGui -isystem 
> /usr/include/qt4/QtNetwork -isystem /usr/include/qt4/QtCore 
> -I/«PKGBUILDDIR»/build/components  -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wundef 
> -Wno-unused-parameter -std=c++98 -pedantic -Wno-long-long 
> -Wno-unused-but-set-parameter -O2 -g -DNDEBUG   -o 
> CMakeFiles/components.dir/sceneutil/lightmanager.cpp.o -c 
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp: In member function 
> 'void SceneUtil::LightStateAttribute::applyLight(GLenum, const osg::Light*) 
> const':
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:61:34: error: 
> 'GL_AMBIENT' was not declared in this scope
>  glLightfv( lightNum, GL_AMBIENT,   
> light->getAmbient().ptr() );
>   ^~
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:61:86: error: 
> 'glLightfv' was not declared in this scope
>  glLightfv( lightNum, GL_AMBIENT,   
> light->getAmbient().ptr() );
>   
> ^
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:62:34: error: 
> 'GL_DIFFUSE' was not declared in this scope
>  glLightfv( lightNum, GL_DIFFUSE,   
> light->getDiffuse().ptr() );
>   ^~
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:63:34: error: 
> 'GL_SPECULAR' was not declared in this scope
>  glLightfv( lightNum, GL_SPECULAR,  
> light->getSpecular().ptr() );
>   ^~~
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:64:34: error: 
> 'GL_POSITION' was not declared in this scope
>  glLightfv( lightNum, GL_POSITION,  
> light->getPosition().ptr() );
>   ^~~
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:70:34: error: 
> 'GL_CONSTANT_ATTENUATION' was not declared in this scope
>  glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  
> light->getConstantAttenuation() );
>   ^~~
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:70:92: error: 'glLightf' 
> was not declared in this scope
>  glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  
> light->getConstantAttenuation() );
>   
>   ^
> /«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:71:34: error: 
> '

Bug#850021: openmw: FTBFS on armhf: error: 'GL_AMBIENT' was not declared in this scope

2017-01-03 Thread Andreas Beckmann
Package: openmw
Version: 0.41.0-1
Severity: serious
Justification: fails to build from source (but built successfully in the past)

Hi,

openmw FTBFS on armhf, but built there previously:

https://buildd.debian.org/status/fetch.php?pkg=openmw&arch=armhf&ver=0.41.0-1&stamp=1482596646

[  8%] Building CXX object 
components/CMakeFiles/components.dir/sceneutil/lightmanager.cpp.o
cd /«PKGBUILDDIR»/build/components && /usr/bin/c++   
-DGLOBAL_CONFIG_PATH=\"/etc\" -DGLOBAL_DATA_PATH=\"/usr/share/games\" 
-DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB 
-DTIXML_USE_STL -D__STDC_CONSTANT_MACROS -I/«PKGBUILDDIR»/. -isystem 
/usr/include/SDL2 -isystem /usr/include/MYGUI -isystem /usr/include/AL -isystem 
/usr/include/bullet -isystem /usr/include/qt4 -isystem 
/usr/include/qt4/QtOpenGL -isystem /usr/include/qt4/QtGui -isystem 
/usr/include/qt4/QtNetwork -isystem /usr/include/qt4/QtCore 
-I/«PKGBUILDDIR»/build/components  -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wundef 
-Wno-unused-parameter -std=c++98 -pedantic -Wno-long-long 
-Wno-unused-but-set-parameter -O2 -g -DNDEBUG   -o 
CMakeFiles/components.dir/sceneutil/lightmanager.cpp.o -c 
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp: In member function 'void 
SceneUtil::LightStateAttribute::applyLight(GLenum, const osg::Light*) const':
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:61:34: error: 'GL_AMBIENT' 
was not declared in this scope
 glLightfv( lightNum, GL_AMBIENT,   
light->getAmbient().ptr() );
  ^~
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:61:86: error: 'glLightfv' 
was not declared in this scope
 glLightfv( lightNum, GL_AMBIENT,   
light->getAmbient().ptr() );

  ^
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:62:34: error: 'GL_DIFFUSE' 
was not declared in this scope
 glLightfv( lightNum, GL_DIFFUSE,   
light->getDiffuse().ptr() );
  ^~
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:63:34: error: 
'GL_SPECULAR' was not declared in this scope
 glLightfv( lightNum, GL_SPECULAR,  
light->getSpecular().ptr() );
  ^~~
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:64:34: error: 
'GL_POSITION' was not declared in this scope
 glLightfv( lightNum, GL_POSITION,  
light->getPosition().ptr() );
  ^~~
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:70:34: error: 
'GL_CONSTANT_ATTENUATION' was not declared in this scope
 glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  
light->getConstantAttenuation() );
  ^~~
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:70:92: error: 'glLightf' 
was not declared in this scope
 glLightf ( lightNum, GL_CONSTANT_ATTENUATION,  
light->getConstantAttenuation() );

^
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:71:34: error: 
'GL_LINEAR_ATTENUATION' was not declared in this scope
 glLightf ( lightNum, GL_LINEAR_ATTENUATION,
light->getLinearAttenuation() );
  ^
/«PKGBUILDDIR»/components/sceneutil/lightmanager.cpp:72:34: error: 
'GL_QUADRATIC_ATTENUATION' was not declared in this scope
 glLightf ( lightNum, GL_QUADRATIC_ATTENUATION, 
light->getQuadraticAttenuation() );
  ^~~~
components/CMakeFiles/components.dir/build.make:769: recipe for target 
'components/CMakeFiles/components.dir/sceneutil/lightmanager.cpp.o' failed
make[3]: *** 
[components/CMakeFiles/components.dir/sceneutil/lightmanager.cpp.o] Error 1


Andreas