# Build android fails

**URL:** <https://discourse.libcinder.org/t/build-android-fails/705>\
**Category:** Uncategorized\
**Created:** [May 27, 2017, 8:03am UTC](https://discourse.libcinder.org/t/build-android-fails/705 "2017-05-27T08:03:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrea](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/andrea/32/193_2.png) [@Andrea](https://discourse.libcinder.org/u/Andrea)\
**Post date:** [May 27, 2017, 8:03am UTC](https://discourse.libcinder.org/t/build-android-fails/705/1 "2017-05-27T08:03:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andrea](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/andrea/32/193_2.png) [@Andrea](https://discourse.libcinder.org/u/Andrea)\
**Post date:** [May 27, 2017, 9:17am UTC](https://discourse.libcinder.org/t/build-android-fails/705/2 "2017-05-27T09:17:37Z")

</div>

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 )

---

<div class="post-metadata">

**Author:** ![rich.e](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/rich.e/32/1025_2.png) [@rich.e](https://discourse.libcinder.org/u/rich.e)\
**Post date:** [May 28, 2017, 1:25am UTC](https://discourse.libcinder.org/t/build-android-fails/705/3 "2017-05-28T01:25:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Andrea](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/andrea/32/193_2.png) [@Andrea](https://discourse.libcinder.org/u/Andrea)\
**Post date:** [May 28, 2017, 7:38am UTC](https://discourse.libcinder.org/t/build-android-fails/705/4 "2017-05-28T07:38:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rich.e](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/rich.e/32/1025_2.png) [@rich.e](https://discourse.libcinder.org/u/rich.e)\
**Post date:** [May 28, 2017, 9:19pm UTC](https://discourse.libcinder.org/t/build-android-fails/705/5 "2017-05-28T21:19:18Z")

</div>

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](https://github.com/cinder/Cinder/blob/fc8b74c8a36bfd5a6ded7e61d82a15bb87e61b73/include/cinder/gl/platform.h#L234) to read:

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

```

so you can build on android. See [this issue](https://github.com/cinder/Cinder/issues/1856) to track its progress.

---

<div class="post-metadata">

**Author:** ![Andrea](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/andrea/32/193_2.png) [@Andrea](https://discourse.libcinder.org/u/Andrea)\
**Post date:** [May 29, 2017, 7:25am UTC](https://discourse.libcinder.org/t/build-android-fails/705/6 "2017-05-29T07:25:17Z")

</div>

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
