2015-09-07 38 views
2

我目前使用python 2.7.9。我已經嘗試重新安裝cython並更新所有的依賴關係,但它不起作用。我不知道Buildozer或Cython有什麼問題。該應用程序正在從終端直接正常運行。問題與基維和Buildozer

#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 

回答

2

這是一個不兼容的cython版本的問題。嘗試使用kivy的master分支(將kivy==master添加到buildozer.spec中)並確保buildozer通過刪除app目錄中的.buildozer目錄來重新下載python-for-android。不要刪除你家目錄中的那個,它包含(更大的)Android SDK和NDK,你不想再次下載它。

+0

這奏效了我! 如果有人想知道@inclement在buildozer.spec文件中說'kyvy == master'的地方,確切的地方就是它說'requirements = kivy'的地方,它應該讀取'requirements = kivy == master' – aesede

+0

any其他想法?這並沒有解決它對我:( – nmz787

0
sudo apt-get install cython 

解決了這個問題對我來說:)