3

I am currently using python 2.7.9. I've tried reinstalling cython and updating all the dependencies but it didn't work. I don't know what the problem is with Buildozer or Cython. The app is running properly directly from terminal.

#error Do not use this file, it is the result of a failed Cython compilation.
  ^
 error: command 'ccache' failed with exit status 1

Error compiling Cython file:
------------------------------------------------------------
...
    cpdef release(self)
    cpdef get_pixel_color(self, int wx, int wy)

    cdef void create_fbo(self)
    cdef void delete_fbo(self)
    cdef void apply(self)
                  ^
------------------------------------------------------------

kivy/graphics/fbo.pxd:27:19: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
    cdef void leave(self) except *
    cdef void apply(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:123:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
    cpdef release(self)
    cpdef get_pixel_color(self, int wx, int wy)

    cdef void create_fbo(self)
    cdef void delete_fbo(self)
    cdef void apply(self)
                  ^
------------------------------------------------------------

kivy/graphics/fbo.pxd:27:19: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
    cdef void leave(self) except *
    cdef void apply(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:123:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void stop(self):
        '''Stop using the shader.
        '''
        glUseProgram(0)

    cdef void set_uniform(self, str name, value):
        ^
------------------------------------------------------------

kivy/graphics/shader.pyx:233:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef dict uniform_locations
    cdef dict uniform_values

    cdef void use(self)
    cdef void stop(self)
    cdef void set_uniform(self, str name, value) except *
                        ^
------------------------------------------------------------

kivy/graphics/shader.pxd:29:25: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        if name in self.uniform_values and self.uniform_values[name] == value:
            return
        self.uniform_values[name] = value
        self.upload_uniform(name, value)

    cdef void upload_uniform(self, str name, value):
        ^
------------------------------------------------------------

kivy/graphics/shader.pyx:239:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef dict uniform_values

    cdef void use(self)
    cdef void stop(self)
    cdef void set_uniform(self, str name, value) except *
    cdef void upload_uniform(self, str name, value) except *
                           ^
------------------------------------------------------------

kivy/graphics/shader.pxd:30:28: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        cdef GLfloat mat[16]
        for x in xrange(16):
            mat[x] = <GLfloat>value.mat[x]
        glUniformMatrix4fv(loc, 1, False, mat)

    cdef int get_uniform_loc(self, str name):
        ^
------------------------------------------------------------

kivy/graphics/shader.pyx:424:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void use(self)
    cdef void stop(self)
    cdef void set_uniform(self, str name, value) except *
    cdef void upload_uniform(self, str name, value) except *
    cdef void upload_uniform_matrix(self, int loc, Matrix value)
    cdef int get_uniform_loc(self, str name) except *
                           ^
------------------------------------------------------------

kivy/graphics/shader.pxd:32:28: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
                glEnableVertexAttribArray(attr.index)

        # save for the next run.
        self._current_vertex_format = vertex_format

    cdef void build(self):
        ^
------------------------------------------------------------

kivy/graphics/shader.pyx:465:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void stop(self)
    cdef void set_uniform(self, str name, value) except *
    cdef void upload_uniform(self, str name, value) except *
    cdef void upload_uniform_matrix(self, int loc, Matrix value)
    cdef int get_uniform_loc(self, str name) except *
    cdef void build(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/shader.pxd:33:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...

    cdef void build(self):
        self.build_vertex()
        self.build_fragment()

    cdef void build_vertex(self, int link=1):
        ^
------------------------------------------------------------

kivy/graphics/shader.pyx:469:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void set_uniform(self, str name, value) except *
    cdef void upload_uniform(self, str name, value) except *
    cdef void upload_uniform_matrix(self, int loc, Matrix value)
    cdef int get_uniform_loc(self, str name) except *
    cdef void build(self) except *
    cdef void build_vertex(self, int link=*) except *
                         ^
------------------------------------------------------------

kivy/graphics/shader.pxd:34:26: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        if self.vertex_shader is not None:
            glAttachShader(self.program, self.vertex_shader.shader)
        if link:
            self.link_program()

    cdef void build_fragment(self, int link=1):
        ^
------------------------------------------------------------

kivy/graphics/shader.pyx:479:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void upload_uniform(self, str name, value) except *
    cdef void upload_uniform_matrix(self, int loc, Matrix value)
    cdef int get_uniform_loc(self, str name) except *
    cdef void build(self) except *
    cdef void build_vertex(self, int link=*) except *
    cdef void build_fragment(self, int link=*) except *
                           ^
------------------------------------------------------------

kivy/graphics/shader.pxd:35:28: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        if self.fragment_shader is not None:
            glAttachShader(self.program, self.fragment_shader.shader)
        if link:
            self.link_program()

    cdef void link_program(self):
        ^
------------------------------------------------------------

kivy/graphics/shader.pyx:489:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void upload_uniform_matrix(self, int loc, Matrix value)
    cdef int get_uniform_loc(self, str name) except *
    cdef void build(self) except *
    cdef void build_vertex(self, int link=*) except *
    cdef void build_fragment(self, int link=*) except *
    cdef void link_program(self) except *
                         ^
------------------------------------------------------------

kivy/graphics/shader.pxd:36:26: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
    cpdef release(self)
    cpdef get_pixel_color(self, int wx, int wy)

    cdef void create_fbo(self)
    cdef void delete_fbo(self)
    cdef void apply(self)
                  ^
------------------------------------------------------------

kivy/graphics/fbo.pxd:27:19: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
    cdef void leave(self) except *
    cdef void apply(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:123:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
    cpdef release(self)
    cpdef get_pixel_color(self, int wx, int wy)

    cdef void create_fbo(self)
    cdef void delete_fbo(self)
    cdef void apply(self)
                  ^
------------------------------------------------------------

kivy/graphics/fbo.pxd:27:19: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
    cdef void leave(self) except *
    cdef void apply(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:123:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        elif self._stencilbuffer_attached:
            glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)
        else:
            glClear(GL_COLOR_BUFFER_BIT)

    cdef void apply(self):
        ^
------------------------------------------------------------

kivy/graphics/fbo.pyx:326:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
    cdef void leave(self) except *
    cdef void apply(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:123:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
    cpdef release(self)
    cpdef get_pixel_color(self, int wx, int wy)

    cdef void create_fbo(self)
    cdef void delete_fbo(self)
    cdef void apply(self)
                  ^
------------------------------------------------------------

kivy/graphics/fbo.pxd:27:19: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
    cdef void leave(self) except *
    cdef void apply(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:123:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
    cpdef release(self)
    cpdef get_pixel_color(self, int wx, int wy)

    cdef void create_fbo(self)
    cdef void delete_fbo(self)
    cdef void apply(self)
                  ^
------------------------------------------------------------

kivy/graphics/fbo.pxd:27:19: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
    cdef void leave(self) except *
    cdef void apply(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:123:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        if self.context_state:
            context.set_states(self.context_state)
        if self.context_pop:
            context.pop_states(self.context_pop)

    cdef void set_state(self, str name, value):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:258:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef dict context_state
    cdef list context_push
    cdef list context_pop

    cdef RenderContext get_context(self)
    cdef void set_state(self, str name, value) except *
                      ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:61:23: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...

    cdef void set_state(self, str name, value):
        self.context_state[name] = value
        self.flag_update()

    cdef void push_state(self, str name):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:262:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef list context_push
    cdef list context_pop

    cdef RenderContext get_context(self)
    cdef void set_state(self, str name, value) except *
    cdef void push_state(self, str name) except *
                       ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:62:24: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...

    cdef void push_state(self, str name):
        self.context_push.append(name)
        self.flag_update()

    cdef void pop_state(self, str name):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:266:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef list context_pop

    cdef RenderContext get_context(self)
    cdef void set_state(self, str name, value) except *
    cdef void push_state(self, str name) except *
    cdef void pop_state(self, str name) except *
                      ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:63:23: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        self._shader.set_uniform(name, value)

    cdef get_state(self, str name):
        return self.state_stacks[name][-1]

    cdef void set_states(self, dict states):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:789:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef int _use_parent_modelview

    cdef void set_texture(self, int index, Texture texture)
    cdef void set_state(self, str name, value, int apply_now=?)
    cdef get_state(self, str name)
    cdef void set_states(self, dict states) except *
                       ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:116:24: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void set_states(self, dict states):
        cdef str name
        for name, value in states.iteritems():
            self.set_state(name, value)

    cdef void push_state(self, str name):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:794:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...

    cdef void set_texture(self, int index, Texture texture)
    cdef void set_state(self, str name, value, int apply_now=?)
    cdef get_state(self, str name)
    cdef void set_states(self, dict states) except *
    cdef void push_state(self, str name) except *
                       ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:117:24: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_state(self, str name):
        stack = self.state_stacks[name]
        stack.append(stack[-1])
        self.flag_update()

    cdef void push_states(self, list names):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:799:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void set_texture(self, int index, Texture texture)
    cdef void set_state(self, str name, value, int apply_now=?)
    cdef get_state(self, str name)
    cdef void set_states(self, dict states) except *
    cdef void push_state(self, str name) except *
    cdef void push_states(self, list names) except *
                        ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:118:25: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_states(self, list names):
        cdef str name
        for name in names:
            self.push_state(name)

    cdef void pop_state(self, str name):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:804:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void set_state(self, str name, value, int apply_now=?)
    cdef get_state(self, str name)
    cdef void set_states(self, dict states) except *
    cdef void push_state(self, str name) except *
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
                      ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:119:23: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        oldvalue = stack.pop()
        if oldvalue != stack[-1]:
            self.set_state(name, stack[-1])
            self.flag_update()

    cdef void pop_states(self, list names):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:811:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef get_state(self, str name)
    cdef void set_states(self, dict states) except *
    cdef void push_state(self, str name) except *
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
                       ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:120:24: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
            _active_texture = index
            glActiveTexture(GL_TEXTURE0 + index)
        texture.bind()
        self.flag_update()

    cdef void enter(self):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:831:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void set_states(self, dict states) except *
    cdef void push_state(self, str name) except *
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:121:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        self.flag_update()

    cdef void enter(self):
        self._shader.use()

    cdef void leave(self):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:834:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_state(self, str name) except *
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
    cdef void leave(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:122:19: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
        self._shader.use()

    cdef void leave(self):
        self._shader.stop()

    cdef void apply(self):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:837:9: 'apply' already defined

Error compiling Cython file:
------------------------------------------------------------
...
        self._shader.use()

    cdef void leave(self):
        self._shader.stop()

    cdef void apply(self):
        ^
------------------------------------------------------------

kivy/graphics/instructions.pyx:837:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef void push_states(self, list names) except *
    cdef void pop_state(self, str name) except *
    cdef void pop_states(self, list names) except *
    cdef void enter(self) except *
    cdef void leave(self) except *
    cdef void apply(self) except *
                  ^
------------------------------------------------------------

kivy/graphics/instructions.pxd:123:19: Previous declaration is here
 /home/sterilistic/Desktop/PongApp/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'dependency_links'
   warnings.warn(msg)
 /home/sterilistic/Desktop/PongApp/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
   warnings.warn(msg)

Cython check avoided.
Using this graphics system: OpenGL ES 2
running build_ext
Build configuration is:
 * use_rpi = 0
 * use_opengl_es2 = 1
 * use_opengl_debug = 0
 * use_glew = 0
 * use_sdl2 = 0
 * use_ios = 0
 * use_mesagl = 0
 * use_x11 = 0
 * use_gstreamer = 0
 * use_avfoundation = 0
 * use_osx_frameworks = 0
 * debug = False
Detected compiler is unix
building 'kivy.graphics.opengl' extension

kivy/graphics/vbo.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.
  ^
 error: command 'ccache' failed with exit status 1
# Command failed: ./distribute.sh -m "kivy" -d "myapp"
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
Ted Klein Bergman
  • 9,146
  • 4
  • 29
  • 50

2 Answers2

2

This is a problem with an incompatible cython version. Try using kivy's master branch (add kivy==master to the buildozer.spec) and make sure buildozer re-downloads python-for-android by deleting the .buildozer directory in your app directory. Don't delete the one in your home dir, this contains the (much larger) Android SDK and NDK, which you don't want to have to download again.

inclement
  • 29,124
  • 4
  • 48
  • 60
  • 1
    That did the trick for me! If anyone's wondering, where @inclement says to put `kyvy==master` in the buildozer.spec file, the exact place is where it says `requirements = kivy`, it should read `requirements = kivy==master` – aesede Dec 09 '15 at 20:14
0
sudo apt-get install cython

solved it for me :)

Alex
  • 5,759
  • 1
  • 32
  • 47