Build android fails


#1

Hi,

when I run the fullbuild-armeabi-v7a script, cmake is pointing to the wrong folder, it should go 1 level up, am I missing anything or is this an error in the script?

CMake Error at CMakeLists.txt:782 (add_library):
Cannot find source file:

/Users/Q/Code/Cinder/proj/src/cinder/app/android/android_native_app_glue.c


#2

this line in the CMakeLists.txt sets the wrong path, I’ve got rid of it and it worked

CMakeLists.txt line 411
get_filename_component( CINDER_DIR “${CMAKE_CURRENT_SOURCE_DIR}/…” ABSOLUTE )


#3

Nice, if you get it working can you send a PR? Android support is still considered experimental, in large because it needs more maintenance support from people who work on that platform.


#4

I just pulled the latest commit from the master branch, the CmakeLists requires a slightly different change, but the build now fails here:

[ 29%] Building CXX object CMakeFiles/cinder.dir/Users/Q/Code/Cinder/src/cinder/gl/Batch.cpp.o
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp: In function 'void cinder::gl::pushDebugGroup(const string&)':
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp:1006:20: error: 'GL_DEBUG_SOURCE_APPLICATION' was not declared in this scope
  glPushDebugGroup( GL_DEBUG_SOURCE_APPLICATION, 0, -1, message.c_str() );
                    ^
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp:1006:72: error: 'glPushDebugGroup' was not declared in this scope
  glPushDebugGroup( GL_DEBUG_SOURCE_APPLICATION, 0, -1, message.c_str() );
                                                                        ^
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp: In function 'void cinder::gl::pushDebugGroup(GLuint, const string&)':
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp:1010:20: error: 'GL_DEBUG_SOURCE_APPLICATION' was not declared in this scope
  glPushDebugGroup( GL_DEBUG_SOURCE_APPLICATION, id, -1, message.c_str() );
                    ^
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp:1010:73: error: 'glPushDebugGroup' was not declared in this scope
  glPushDebugGroup( GL_DEBUG_SOURCE_APPLICATION, id, -1, message.c_str() );
                                                                         ^
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp: In function 'void cinder::gl::pushDebugGroup(GLenum, GLuint, const string&)':
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp:1014:52: error: 'glPushDebugGroup' was not declared in this scope
  glPushDebugGroup( source, id, -1, message.c_str() );
                                                    ^
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp: In function 'void cinder::gl::popDebugGroup()':
/Users/Q/Code/Cinder/src/cinder/gl/wrapper.cpp:1018:18: error: 'glPopDebugGroup' was not declared in this scope
  glPopDebugGroup();

EDIT:
for what I understand CINDER_GL_HAS_KHR_DEBUG is defined for both CINDER_GL_ES_2 and CINDER_GL_ES_3 however GL_DEBUG_SOURCE_APPLICATION is only defined for angle or CINDER_GL_ES_3_2 which is not supported yet in android or at least the version I’m trying to build(19).

That said, I have absolutely no idea about what those definitions do.


#5

Ah yea, that is a recent one, and I think your assessment is just about right. We’ll have that fixed soon, but in the meantime I think you can modify this line to read:

#if defined( GL_KHR_debug ) && ( CINDER_GL_ES_VERSION >= CINDER_GL_ES_VERSION_3_1 )
...

so you can build on android. See this issue to track its progress.


#6

I just saw a commit from Andrew that should fix the issue. I also found some other small issues that break it, I’ll send a PR as soon as I manage to build