Error in compiling OGRE android

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
TormentLiang
Gnoblar
Posts: 1
Joined: Mon Jul 15, 2013 6:59 am

Error in compiling OGRE android

Post by TormentLiang » Mon Jul 15, 2013 9:09 am

I was following http://www.ogre3d.org/tikiwiki/tiki-ind ... on=Android to compile OGRE(V1.9, from https://bitbucket.org/sinbad/ogre/get/v1-9.zip) onto android, but I ran into some compilation errors whenI was trying to make with MinGW at about 51%.

Code: Select all

[ 51%] Built target OgreMain
[ 51%] Building CXX object RenderSystems/GLES2/CMakeFiles/RenderSystem_GLES2.dir
/src/gles2w.cpp.o
In file included from ..\..\..\RenderSystems\GLES2\src\gles2w.cpp:1:0:
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:194:63: error: typedef 'PFNG
LDEBUGMESSAGECALLBACKKHRPROC' is initialized (use decltype instead)
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:194:63: error: 'GLDEBUGPROCK
HR' was not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:194:88: error: expected prim
ary-expression before 'const'
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:226:16: error: ISO C++ forbi
ds declaration of 'GLsync' with no type [-fpermissive]
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:226:16: error: typedef 'GLsy
nc' is initialized (use decltype instead)
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:226:30: error: 'PFNGLFENCESY
NCAPPLEPROC' was not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:227:56: error: typedef 'PFNG
LISSYNCAPPLEPROC' is initialized (use decltype instead)
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:227:56: error: 'GLsync' was
not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:228:55: error: typedef 'PFNG
LDELETESYNCAPPLEPROC' is initialized (use decltype instead)
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:228:55: error: 'GLsync' was
not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:229:61: error: typedef 'PFNG
LCLIENTWAITSYNCAPPLEPROC' is initialized (use decltype instead)
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:229:61: error: 'GLsync' was
not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:229:85: error: expected prim
ary-expression before 'flags'
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:229:92: error: 'GLuint64' wa
s not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:230:53: error: typedef 'PFNG
LWAITSYNCAPPLEPROC' is initialized (use decltype instead)
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:230:53: error: 'GLsync' was
not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:230:77: error: expected prim
ary-expression before 'flags'
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:230:84: error: 'GLuint64' wa
s not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:231:72: error: 'GLint64' has
 not been declared
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:232:54: error: typedef 'PFNG
LGETSYNCIVAPPLEPROC' is initialized (use decltype instead)
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:232:54: error: 'GLsync' was
not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:232:74: error: expected prim
ary-expression before 'pname'
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:232:89: error: expected prim
ary-expression before 'bufSize'
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:232:106: error: expected pri
mary-expression before '*' token
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:232:107: error: 'length' was
 not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:232:121: error: expected pri
mary-expression before '*' token
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:232:122: error: 'values' was
 not declared in this scope
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:257:105: error: conflicting
declaration 'typedef void (* PFNGLMULTIDRAWARRAYSEXTPROC)(GLenum, const GLint*,
const GLsizei*, GLsizei)'
E:\android-ndk-r8c\platforms\android-8\arch-arm\usr\include/GLES2/gl2ext.h:629:2
8: error: 'PFNGLMULTIDRAWARRAYSEXTPROC' has a previous declaration as 'typedef v
oid (* PFNGLMULTIDRAWARRAYSEXTPROC)(GLenum, GLint*, GLsizei*, GLsizei)'
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:498:8: error: 'PFNGLDEBUGMES
SAGECALLBACKKHRPROC' does not name a type
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:530:8: error: 'PFNGLFENCESYN
CAPPLEPROC' does not name a type
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:531:8: error: 'PFNGLISSYNCAP
PLEPROC' does not name a type
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:532:8: error: 'PFNGLDELETESY
NCAPPLEPROC' does not name a type
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:533:8: error: 'PFNGLCLIENTWA
ITSYNCAPPLEPROC' does not name a type
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:534:8: error: 'PFNGLWAITSYNC
APPLEPROC' does not name a type
..\..\..\RenderSystems\GLES2\include/GLES2/gles2w.h:536:8: error: 'PFNGLGETSYNCI
VAPPLEPROC' does not name a type
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:324:1: error: 'PFNGLDEBUGMESSAGECALL
BACKKHRPROC' does not name a type
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:356:1: error: 'PFNGLFENCESYNCAPPLEPR
OC' does not name a type
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:357:1: error: 'PFNGLISSYNCAPPLEPROC'
 does not name a type
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:358:1: error: 'PFNGLDELETESYNCAPPLEP
ROC' does not name a type
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:359:1: error: 'PFNGLCLIENTWAITSYNCAP
PLEPROC' does not name a type
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:360:1: error: 'PFNGLWAITSYNCAPPLEPRO
C' does not name a type
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:362:1: error: 'PFNGLGETSYNCIVAPPLEPR
OC' does not name a type
..\..\..\RenderSystems\GLES2\src\gles2w.cpp: In function 'void load_procs()':
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:630:2: error: 'gleswDebugMessageCall
backKHR' was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:630:34: error: 'PFNGLDEBUGMESSAGECAL
LBACKKHRPROC' was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:630:68: error: expected ';' before '
get_proc'
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:662:2: error: 'gleswFenceSyncAPPLE'
was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:662:25: error: 'PFNGLFENCESYNCAPPLEP
ROC' was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:662:50: error: expected ';' before '
get_proc'
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:663:2: error: 'gleswIsSyncAPPLE' was
 not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:663:22: error: 'PFNGLISSYNCAPPLEPROC
' was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:663:44: error: expected ';' before '
get_proc'
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:664:2: error: 'gleswDeleteSyncAPPLE'
 was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:664:26: error: 'PFNGLDELETESYNCAPPLE
PROC' was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:664:52: error: expected ';' before '
get_proc'
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:665:2: error: 'gleswClientWaitSyncAP
PLE' was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:665:30: error: 'PFNGLCLIENTWAITSYNCA
PPLEPROC' was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:665:60: error: expected ';' before '
get_proc'
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:666:2: error: 'gleswWaitSyncAPPLE' w
as not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:666:24: error: 'PFNGLWAITSYNCAPPLEPR
OC' was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:666:48: error: expected ';' before '
get_proc'
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:668:2: error: 'gleswGetSyncivAPPLE'
was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:668:25: error: 'PFNGLGETSYNCIVAPPLEP
ROC' was not declared in this scope
..\..\..\RenderSystems\GLES2\src\gles2w.cpp:668:50: error: expected ';' before '
get_proc'
make[2]: *** [RenderSystems/GLES2/CMakeFiles/RenderSystem_GLES2.dir/src/gles2w.c
pp.o] Error 1
make[1]: *** [RenderSystems/GLES2/CMakeFiles/RenderSystem_GLES2.dir/all] Error 2

make: *** [all] Error 2
I have already manually added OGRE_DEPENDENCIES_DIR for cMake, but it did not work.
0 x

Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am

Re: Error in compiling OGRE android

Post by Emerich » Mon Jul 15, 2013 4:39 pm

The wiki article you're referring to is for the Visual Studio compiler - maybe you get those since you're using mingw?
0 x

Spekoda
Halfling
Posts: 40
Joined: Wed Jun 12, 2013 5:38 pm
Location: Finland

Re: Error in compiling OGRE android

Post by Spekoda » Thu Jul 18, 2013 5:23 pm

Hei guys!
Yes I get similar error, it must be the 1.9 repository for GLES2 has gotten corrupt. This could be similar I think.

When trying to build this is the first error:

Code: Select all

8>------ Build started: Project: RenderSystem_GLES2, Configuration: Debug Win32 ------
6>  OgreShaderExTextureAtlasSampler.cpp
8>  gles2w.cpp
8>  OgreGLES2Context.cpp
8>  OgreGLES2DefaultHardwareBufferManager.cpp
8>  OgreGLES2DepthBuffer.cpp
8>c:\ogre\sorsa19\RenderSystems\GLES2\include\GLES2/gles2w.h(194): error C2065: 'GLDEBUGPROCKHR' : undeclared identifier
8>c:\ogre\sorsa19\RenderSystems\GLES2\include\GLES2/gles2w.h(194): error C2146: syntax error : missing ')' before identifier 'callback'
8>c:\ogre\sorsa19\RenderSystems\GLES2\include\GLES2/gles2w.h(194): error C2165: 'left-side modifier' : cannot modify pointers to data
8>c:\ogre\sorsa19\RenderSystems\GLES2\include\GLES2/gles2w.h(194): error C2513: 'void *' : no variable declared before '='
8>c:\ogre\sorsa19\RenderSystems\GLES2\include\GLES2/gles2w.h(194): error C2059: syntax error : ')'
8>c:\ogre\sorsa19\RenderSystems\GLES2\include\GLES2/gles2w.h(257): error C2371: 'PFNGLMULTIDRAWARRAYSEXTPROC' : redefinition; different basic types
8>          c:\ogre\sorsa19\Dependencies\include\GLES2/gl2ext.h(1371) : see declaration of 'PFNGLMULTIDRAWARRAYSEXTPROC'
This needs urgent attention please (my new galaxy s2 plus :)
0 x

Spekoda
Halfling
Posts: 40
Joined: Wed Jun 12, 2013 5:38 pm
Location: Finland

Re: Error in compiling OGRE android

Post by Spekoda » Sat Jul 20, 2013 3:27 am

Good news!
My error was caused by the wrong GLES2 and KHR directories being in in my ogre dependencies' include directory (also wrong place for them). I had the original powerVR include dirs GLES2 and KHR in the ogre deps directory. I think about 2 months ogre started to redefine those files in ogre_source\RenderSystems\GLES2\include\GLES2\GLES2 and KHR. In the original gl2ext.h GLDEBUGPROC is defined but in ogre's gl2ext.h GLDEBUGPROCKHR is defined instead.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: Error in compiling OGRE android

Post by masterfalcon » Sat Jul 20, 2013 4:43 am

The one in the Ogre source is a clone of the file provided by Khronos.

Could you provide details on your build environment? Platform, compiler, and SDK's that you're using, etc.
0 x

Spekoda
Halfling
Posts: 40
Joined: Wed Jun 12, 2013 5:38 pm
Location: Finland

Re: Error in compiling OGRE android

Post by Spekoda » Sat Jul 20, 2013 8:35 am

Ok I see, I've used the gles2 headers and libraries that are installed from Imagination's PowerVRSDKSetup-3.1.exe. I'm almost sure I have run ogre samples on windows using gles2 rendersystem, when ogre was built with the powerVR headers and libs. I've only built for windows 32, but I want to build for android next. I use cmake 2.8.11 and VC express 2010, powerVR sdk 3.1, directx sdk june2010, Transporter's precompiled boost 1.54 and dependencies (compiled 20.06) (thanks a lot Transporter!) None of the GLES2 additions are enabled in cmake. Rendersystems: D3D9 & GLES2.

Now when I build ogre it builds fine but when running the sample browser I get a RenderingAPI exeption: failed to choose config in Ogre::EGLSupport::chooseGLConfig. I realize the powerVR gles2 libraries should not be used to link against if you have different headers. But how do I get the correct libs like ibGLESv2.lib, that are needed in the ogre build?
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: Error in compiling OGRE android

Post by masterfalcon » Sat Jul 20, 2013 8:45 am

I'll have to try tomorrow. But you should be fine mixing these headers and libraries. Have you tried debugging to see what, if any, configs it is trying to use for EGL? BTW, you do realize that you are not compiling for Android right?
0 x

Spekoda
Halfling
Posts: 40
Joined: Wed Jun 12, 2013 5:38 pm
Location: Finland

Re: Error in compiling OGRE android

Post by Spekoda » Sat Jul 20, 2013 7:26 pm

Windows build yes. I don't know how to debug the sample browser because there is VS solution for it. When building and running the AdvancedOgreFramework using gles2 there's only gray screen and when you press esc the app exits with code 0; no errors.
0 x

Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am

Re: Error in compiling OGRE android

Post by Emerich » Sun Jul 21, 2013 5:33 pm

is the advanced framework using the RTSS? Either use that or try the shaderoptimizer.
0 x

Post Reply