How to rotate 3d objects properly?

208 views
Skip to first unread message

me2 beats

unread,
Aug 28, 2018, 1:27:06 AM8/28/18
to Kivy users support
I want the objects to rotate with the mouse or fingers in my application, as they rotate in almost all 3d viewers.

I took the example with monkey head and tried to make some changes.

but it seems if you just use Rotate(), then the rotation axes do not change with respect to monkey head itself,
but they change with respect to user when the 3d object rotates. And I want the axles always to remain fixed.

that is, the expectation was as follows (demo gif)
    but the reality turned out to be this

Are there examples where there is such a seemingly standard (at least logical) rotation of 3d objects in Kivy?

me2 beats

unread,
Aug 28, 2018, 1:33:32 AM8/28/18
to Kivy users support
I tried to make changes only in the renderer class (as you understood - without success), here is the code.

class Renderer(Widget):
   
def __init__(self, **kwargs):

       
self.last = (0,0)

       
self.canvas = RenderContext(compute_normal_mat=True)
       
self.canvas.shader.source = resource_find('simple.glsl')
       
self.scene = ObjFile(resource_find("monkey.obj"))
       
super(Renderer, self).__init__(**kwargs)
       
with self.canvas:
           
self.cb = Callback(self.setup_gl_context)
           
PushMatrix()
           
self.setup_scene()
           
PopMatrix()
           
self.cb = Callback(self.reset_gl_context)
       
Clock.schedule_interval(self.update_glsl, 1 / 60.)

   
def setup_gl_context(self, *args):
        glEnable
(GL_DEPTH_TEST)

   
def reset_gl_context(self, *args):
        glDisable
(GL_DEPTH_TEST)






   
def on_touch_down(self, touch):
       
super(Renderer, self).on_touch_down(touch)
       
self.on_touch_move(touch)

   
def on_touch_move(self, touch):

       
self.rot_x.angle += touch.dx
       
self.rot_y.angle -= touch.dy





   
def update_glsl(self, delta):
        asp
= self.width / float(self.height)
        proj
= Matrix().view_clip(-asp, asp, -1, 1, 1, 100, 1)
       
self.canvas['projection_mat'] = proj
       
self.canvas['diffuse_light'] = (1.0, 1.0, 0.8)
       
self.canvas['ambient_light'] = (0.1, 0.1, 0.1)
       
#self.rot.angle += 0




   
def setup_scene(self):
       
Color(1, 1, 1, 1)
       
PushMatrix()
       
Translate(0, 0, -3)
       
self.rot_x = Rotate(1, 0, 1, 0)
       
self.rot_y = Rotate(1, 1, 0, 0)
        m
= list(self.scene.objects.values())[0]
       
UpdateNormalMatrix()
       
self.mesh = Mesh(
            vertices
=m.vertices,
            indices
=m.indices,
            fmt
=m.vertex_format,
            mode
='triangles',
       
)
       
PopMatrix()


Gabriel Pettier

unread,
Aug 28, 2018, 8:11:54 AM8/28/18
to kivy-...@googlegroups.com
I think you just want to order the Rotate() instructions differently, as
they are allo influenced by the previous instructions.

if we assume you have (3 Rotate instructions, instead of the only "rot"
as in the example).

self.yaw = Rotate(axis=(0, 1, 0))
self.pitch = Rotate(axis=(1, 0, 0))
self.roll = Rotate(axis=(0, 0, 1))

in this order, then pitch and roll angles will be applied relative to
the yaw angle, and roll will also be affected by the pitch angle.

If you order them in the opposite:

self.roll = Rotate(axis=(0, 0, 1))
self.pitch = Rotate(axis=(1, 0, 0))
self.yaw = Rotate(axis=(0, 1, 0))

Then you get different results.
You can experiment with the order to find what's more natural to you.

Hope this helps
On Mon, Aug 27, 2018 at 10:27:06PM -0700, me2 beats wrote:
>I want the objects to rotate with the mouse or fingers in my application,
>as they rotate in almost all 3d viewers.
>
>I took *the example with monkey head*
><https://kivy.org/doc/stable/examples/gen__3Drendering__main__py.html> and
>tried to make some changes.
>
>but it seems if you just use Rotate(), then the rotation axes do not change
>with respect to monkey head itself,
>but they change with respect to user when the 3d object rotates. And I want
>the axles always to remain fixed.
>
>that is, *the expectation was as follows (demo gif)*
><https://imgur.com/LR9nxyY> but the reality *turned out to be this*
><https://imgur.com/IMorKOk>
>
>Are there examples where there is such a seemingly standard (at least
>logical) rotation of 3d objects in Kivy?
>
>--
>You received this message because you are subscribed to the Google Groups "Kivy users support" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
>To post to this group, send email to kivy-...@googlegroups.com.
>Visit this group at https://groups.google.com/group/kivy-users.
>To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/3813ef30-fe97-4f2e-b702-043456bd2d0e%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

Message has been deleted

me2 beats

unread,
Aug 28, 2018, 3:31:15 PM8/28/18
to Kivy users support
thanks for the answer Gabriel.

it seems this task can not be solved only with the use of the function Rotate()

could you see 2 gif examples below pls?
they illustrate what I need very
well.

my program works like this    but I want exactly this behavior

these examples show that my app first works as it should.
that is, I move the mouse right and turn the monkey's head so I see its right ear, the monkey looks to the right, and until that moment, everything is fine.

but now I move the mouse down and expect that I will see the top of the monkey's head (as if I'm playing the first part of gta). besides, I expect the monkey still to look to the right.

but instead the monkey lowers his head.

it turns out, Rotate() works in the monkey coordinate system, and I want to work in the user's coordinate system

Gabriel Pettier

unread,
Aug 31, 2018, 2:23:11 PM8/31/18
to kivy-...@googlegroups.com
Please see this edit of the 3DRendering example

```python

'''
3D Rotating Monkey Head
========================

This example demonstrates using OpenGL to display a rotating monkey head. This
includes loading a Blender OBJ file, shaders written in OpenGL's Shading
Language (GLSL), and using scheduled callbacks.

The monkey.obj file is an OBJ file output from the Blender free 3D creation
software. The file is text, listing vertices and faces and is loaded
using a class in the file objloader.py. The file simple.glsl is
a simple vertex and fragment shader written in GLSL.
'''

from kivy.app import App
from kivy.clock import Clock
from kivy.core.window import Window
from kivy.uix.widget import Widget
from kivy.resources import resource_find
from kivy.graphics.transformation import Matrix
from kivy.graphics.opengl import *
from kivy.graphics import *
from objloader import ObjFile


class Renderer(Widget):
def __init__(self, **kwargs):
self.canvas = RenderContext(compute_normal_mat=True)
self.canvas.shader.source = resource_find('simple.glsl')
self.scene = ObjFile(resource_find("monkey.obj"))
super(Renderer, self).__init__(**kwargs)
with self.canvas:
self.cb = Callback(self.setup_gl_context)
PushMatrix()
self.setup_scene()
PopMatrix()
self.cb = Callback(self.reset_gl_context)
Clock.schedule_interval(self.update_glsl, 1 / 60.)

def setup_gl_context(self, *args):
glEnable(GL_DEPTH_TEST)

def reset_gl_context(self, *args):
glDisable(GL_DEPTH_TEST)

def update_glsl(self, delta):
asp = self.width / float(self.height)
proj = Matrix().view_clip(-asp, asp, -1, 1, 1, 100, 1)
self.canvas['projection_mat'] = proj
self.canvas['diffuse_light'] = (1.0, 1.0, 0.8)
self.canvas['ambient_light'] = (0.1, 0.1, 0.1)
# self.rot.angle += delta * 100

def on_touch_move(self, touch):
dx = touch.dx
dy = touch.dy
self.yaw.angle += dx
self.pitch.angle += dy

def setup_scene(self):
Color(1, 1, 1, 1)
PushMatrix()
Translate(0, 0, -3)

# ORder is important here, if you invert it, the rotation will
# behave like in your first example (which can be a desired
# behavior, but not for you).

# self.roll = Rotate(1, 0, 0, 1) # commented out because mouse
# is only xy
self.pitch = Rotate(1, -1, 0, 0)
self.yaw = Rotate(1, 0, 1, 0)

m = list(self.scene.objects.values())[0]
UpdateNormalMatrix()
self.mesh = Mesh(
vertices=m.vertices,
indices=m.indices,
fmt=m.vertex_format,
mode='triangles',
)
PopMatrix()


class RendererApp(App):
def build(self):
return Renderer()


if __name__ == "__main__":
RendererApp().run()

```

(also visible on
https://gist.github.com/3b5c8ee473c48625dfe7f62b7df3b291 for edits or
future references)

As commented previously, what's important is the order in which you make
the Rotate functions.

On Tue, Aug 28, 2018 at 12:31:15PM -0700, me2 beats wrote:
>thanks for the answer Gabriel.
>
>it seems this task can not be solved only with the use of the function
>Rotate()
>
>could you see 2 gif examples below pls?
>they illustrate what I need very well.
>
>*my program works like this* <https://imgur.com/QbaVxtW> *but I want
>exactly this behavior* <https://imgur.com/REIQqBk>
>
>these examples show that my app first works as it should.
>that is, I move the mouse right and turn the monkey's head so I see its
>right ear, the monkey looks to the right, and until that moment, everything
>is fine.
>
>but now I move the mouse down and expect that I will see the top of the
>monkey's head (as if I'm playing the first part of gta). besides, I expect
>the monkey still to look to the right.
>
>but instead the monkey lowers his head.
>
>it turns out, Rotate() works in the monkey coordinate system, and I want to
>work in the user's coordinate system
>
>--
>You received this message because you are subscribed to the Google Groups "Kivy users support" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
>To post to this group, send email to kivy-...@googlegroups.com.
>Visit this group at https://groups.google.com/group/kivy-users.
>To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/a8eeca1e-9260-4af2-b096-24fe3b5b8d10%40googlegroups.com.

me2 beats

unread,
Aug 31, 2018, 3:43:26 PM8/31/18
to Kivy users support
thanks, it's better, I'll definitely use it somewhere.

but I also need this behavior (gif)

and now I have this behavior

as far as I understand, if I use this way, then an
object always rotates "incorrectly" along one of the axes.
But I want the object to rotate "correctly" along all axes.

I'm new to opengl, so I don't know how this type of rotation is called.
I google it a bit and it seems the solution is connected either with matrices, quaternions and possibly trigonometry, or with Translate() function
But I did not find any examples how to do this in kivy

Alexander Taylor

unread,
Sep 1, 2018, 4:41:13 AM9/1/18
to Kivy users support
You probably won't find any Kivy-specific example, unless possibly it's implemented in something like https://github.com/KeyWeeUsr/kivy3/blob/master/kivy3 or tshirtman's ddd code (I guess he would have pointed to it if it was). However, this is a general 3d graphics programming issue, and you can find code for e.g. a quaternion-based solution in Vispy http://vispy.org/ - you don't need quaternions, they just happen to be convenient for these calculations.

me2 beats

unread,
Sep 1, 2018, 6:04:21 AM9/1/18
to Kivy users support
Thank you
I found this question on stackoverflow
it seems this is about what I need, but I still can't understand how to do this in kivy, plus it doesn't look simple.


суббота, 1 сентября 2018 г., 13:41:13 UTC+5 пользователь Alexander Taylor написал:

me2 beats

unread,
Sep 3, 2018, 9:59:44 PM9/3/18
to Kivy users support
If I use quaternions, then I'm halfway to the solution.



there is only one problem - an unexpected rotation along the z axis (tilt?).


I think I don't need to rotate the object on the z axis (yaw in my case) using vertical and horizontal mouse drag. instead, I can use something else. that's ok.
but I don't know how to get rid of rotation along the z axis in this case.

if I just write self.yaw.angle = 0 at the end of on_touch_move(), then I will encounter a singularity and the object will jerk

and in general, I think it can be made easier)

Here is my code:

from kivy.app import App
from kivy.clock import Clock
from kivy.core.window import Window
from kivy.uix.widget import Widget
from kivy.resources import resource_find
from kivy.graphics.transformation import Matrix
from kivy.graphics.opengl import *
from kivy.graphics import *
from objloader import ObjFile



#============== quat =========================================================================

import numpy as np
from math import atan2, asin, pi, cos, sin, radians, degrees


def q2e(qua):
    L
= (qua[0]**2 + qua[1]**2 + qua[2]**2 + qua[3]**2)**0.5
    w
= qua[0] / L
    x
= qua[1] / L
    y
= qua[2] / L
    z
= qua[3] / L
   
Roll = atan2(2 * (w * x + y * z), 1 - 2 * (x**2 + y**2))
   
if Roll < 0:
       
Roll += 2 * pi


    temp
= w * y - z * x
   
if temp >= 0.5:
        temp
= 0.5
   
elif temp <= -0.5:
        temp
= -0.5

   
Pitch = asin(2 * temp)
   
Yaw = atan2(2 * (w * z + x * y), 1 - 2 * (y**2 + z**2))
   
if Yaw < 0:
       
Yaw += 2 * pi
   
return [Yaw,Pitch,Roll]



def e2q(ypr):
    y
,p,r = ypr
    roll
= r / 2
    pitch
= p / 2
    yaw
= y / 2

    w
= cos(roll) * cos(pitch) * cos(yaw) + \
        sin
(roll) * sin(pitch) * sin(yaw)
    x
= sin(roll) * cos(pitch) * cos(yaw) - \
        cos
(roll) * sin(pitch) * sin(yaw)
    y
= cos(roll) * sin(pitch) * cos(yaw) + \
        sin
(roll) * cos(pitch) * sin(yaw)
    z
= cos(roll) * cos(pitch) * sin(yaw) + \
        sin
(roll) * sin(pitch) * cos(yaw)
    qua
= [w, x, y, z]
   
return qua




def mult(q1, q2):

    w1
, x1, y1, z1 = q1
    w2
, x2, y2, z2 = q2
    w
= w1*w2 - x1*x2 - y1*y2 - z1*z2
    x
= w1*x2 + x1*w2 + y1*z2 - z1*y2
    y
= w1*y2 + y1*w2 + z1*x2 - x1*z2
    z
= w1*z2 + z1*w2 + x1*y2 - y1*x2
   
return np.array([w, x, y, z])


def list2deg(l):
   
return [degrees(i) for i in l]
#=====================================================================================================






class Renderer(Widget):
   
def __init__(self, **kwargs):


       
self.last = (0,0)


       
self.canvas = RenderContext(compute_normal_mat=True)
       
self.canvas.shader.source = resource_find('simple.glsl')
       
self.scene = ObjFile(resource_find("monkey.obj"))
       
super(Renderer, self).__init__(**kwargs)
       
with self.canvas:
           
self.cb = Callback(self.setup_gl_context)
           
PushMatrix()
           
self.setup_scene()
           
PopMatrix()
           
self.cb = Callback(self.reset_gl_context)
       
Clock.schedule_interval(self.update_glsl, 1 / 60.)

   
def setup_gl_context(self, *args):
        glEnable
(GL_DEPTH_TEST)

   
def reset_gl_context(self, *args):
        glDisable
(GL_DEPTH_TEST)







   
def on_touch_down(self, touch):

       
super(Renderer, self).on_touch_down(touch)
       
self.on_touch_move(touch)

   
def on_touch_move(self, touch):


        new_quat
= e2q([radians(0.5*touch.dx),radians(0.5*touch.dy),0])
       

       
self.quat = mult(self.quat, new_quat)

        euler_radians
= q2e(self.quat)

       
self.roll.angle, self.pitch.angle, self.yaw.angle = list2deg(euler_radians)

       
#self.yaw.angle = 0



   
def update_glsl(self, delta):
        asp
= self.width / float(self.height)
        proj
= Matrix().view_clip(-asp, asp, -1, 1, 1, 100, 1)
       
self.canvas['projection_mat'] = proj
       
self.canvas['diffuse_light'] = (1.0, 1.0, 0.8)
       
self.canvas['ambient_light'] = (0.1, 0.1, 0.1)





   
def setup_scene(self):

       
Color(1, 1, 1, 1)
       
PushMatrix()
       
Translate(0, 0, -3)


       
self.yaw = Rotate(0, 0, 0, 1)
       
self.pitch = Rotate(0, -1, 0, 0)
       
self.roll = Rotate(0, 0, 1, 0)


       
self.quat = e2q([0,0,0])

Ganesh J

unread,
Sep 4, 2018, 8:17:08 AM9/4/18
to kivy-...@googlegroups.com
Hi,

i am facing some issues for numpy
can you tell me which versions of setup needed to run this program.
OS = linux 16.04


my program:

import kivy
#kivy.require('1.0.6') # replace with your current kivy version !

from kivy.app import App
from kivy.uix.label import Label

import numpy

import cv2
__version__ = '1.0' #declare the app version. Will be used by buildozer
class MyApp(App):

    def build(self):
        return Label(text='Hello world Numpy '+numpy.__version__+' Opencv '+cv2.__version__)

if __name__ == '__main__':
    MyApp().run()

*****************************
****************************************LOG********************************
  RAN: /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/bin/python.host setup.py build_ext -v

  STDOUT:
Running from numpy source directory.
/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

openblas_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

atlas_3_10_blas_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

atlas_blas_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1604: UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1613: UserWarning:
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1616: UserWarning:
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
  NOT AVAILABLE

non-existing path in 'numpy/lib': 'benchmarks'
lapack_opt_info:
openblas_lapack_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

lapack_mkl_info:
mkl_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries lapack_atlas not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
numpy.distutils.system_info.atlas_3_10_threads_info
  NOT AVAILABLE

atlas_3_10_info:
  libraries  not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries lapack_atlas not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
numpy.distutils.system_info.atlas_3_10_info
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries lapack_atlas not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
numpy.distutils.system_info.atlas_threads_info
  NOT AVAILABLE

atlas_info:
  libraries  not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries lapack_atlas not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
numpy.distutils.system_info.atlas_info
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1506: UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1517: UserWarning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1520: UserWarning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  warnings.warn(LapackSrcNotFoundError.__doc__)
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
running build_ext
running build_src
build_src
building py_modules sources
building library "npymath" sources
customize Gnu95FCompiler
Found executable /usr/bin/gfortran
Found executable /home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld
Found executable /home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar
Found executable /home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib
customize Gnu95FCompiler
customize Gnu95FCompiler using config
C compiler: /usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/include/python2.7 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/include/python2.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC

compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/include/python2.7 -c'
ccache: _configtest.c
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/include/python2.7 _configtest.o -o _configtest
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
  File "setup.py", line 251, in <module>
    setup_package()
  File "setup.py", line 243, in setup_package
    setup(**metadata)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_ext.py", line 59, in run
    self.run_command('build_src')
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 153, in run
    self.build_sources()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 164, in build_sources
    self.build_library_sources(*libname_info)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 299, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 386, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 686, in get_mathlib_info
    raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program


  STDERR:


Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 978, in <module>
    main()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 975, in main
    ToolchainCL()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 512, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 149, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 193, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/build.py", line 573, in build_recipes
    recipe.build_arch(arch)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipe.py", line 843, in build_arch
    self.build_compiled_components(arch)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipe.py", line 855, in build_compiled_components
    _env=env, *self.setup_extra_args)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/logger.py", line 175, in shprint
    for line in output:
  File "/usr/local/lib/python3.5/dist-packages/sh.py", line 720, in next
    self.wait()
  File "/usr/local/lib/python3.5/dist-packages/sh.py", line 651, in wait
    self.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python3.5/dist-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/bin/python.host setup.py build_ext -v

  STDOUT:
Running from numpy source directory.
/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

openblas_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

atlas_3_10_blas_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

atlas_blas_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1604: UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1613: UserWarning:
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1616: UserWarning:
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
  NOT AVAILABLE

non-existing path in 'numpy/lib': 'benchmarks'
lapack_opt_info:
openblas_lapack_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

lapack_mkl_info:
mkl_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries lapack_atlas not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
numpy.distutils.system_info.atlas_3_10_threads_info
  NOT AVAILABLE

atlas_3_10_info:
  libraries  not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries lapack_atlas not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
numpy.distutils.system_info.atlas_3_10_info
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries lapack_atlas not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
numpy.distutils.system_info.atlas_threads_info
  NOT AVAILABLE

atlas_info:
  libraries  not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries lapack_atlas not found in /home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
numpy.distutils.system_info.atlas_info
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1506: UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
  libraries  not found in ['/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1517: UserWarning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1520: UserWarning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  warnings.warn(LapackSrcNotFoundError.__doc__)
  NOT AVAILABLE

/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
running build_ext
running build_src
build_src
building py_modules sources
building library "npymath" sources
customize Gnu95FCompiler
Found executable /usr/bin/gfortran
Found executable /home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld
Found executable /home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar
Found executable /home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib
customize Gnu95FCompiler
customize Gnu95FCompiler using config
C compiler: /usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/include/python2.7 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/include/python2.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC

compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/include/python2.7 -c'
ccache: _configtest.c
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -I/home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -isysroot /home/roopa/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/include/python2.7 _configtest.o -o _configtest
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc
/home/roopa/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
  File "setup.py", line 251, in <module>
    setup_package()
  File "setup.py", line 243, in setup_package
    setup(**metadata)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_ext.py", line 59, in run
    self.run_command('build_src')
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/python-installs/numpycnn/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 153, in run
    self.build_sources()
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 164, in build_sources
    self.build_library_sources(*libname_info)
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 299, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File "/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 386, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 686, in get_mathlib_info
    raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program


  STDERR:

b'\x1b[0m\r           working:   warnings.warn(LapackNotFoundError.__doc__)               \x1b[0m\r           working: lapack_src_info:                                           'b'\x1b[0m\r           working:   NOT AVAILABLE                                            'b'\x1b[0m\r           working: /home/roopa/Downloads/NumPyCNNAndroid-mas...(and 130 more) 'b'\x1b[0m\r           working:     Lapack (http://www.netlib.org/lapack/)...(and 19 more) 'b'\x1b[0m\r           working:     Directories to search for the sources ...(and 23 more) 'b'\x1b[0m\r           working:     numpy/distutils/site.cfg file (section...(and 28 more) 'b'\x1b[0m\r           working:     the LAPACK_SRC environment variable.                   'b'\x1b[0m\r           working:   warnings.warn(LapackSrcNotFoundError.__doc__)            'b'\x1b[0m\r           working:   NOT AVAILABLE                                            'b'\x1b[0m\r           working: /home/roopa/Downloads/NumPyCNNAndroid-mas...(and 163 more) 'b'\x1b[0m\r           working:   warnings.warn(msg)                                       'b'\x1b[0m\r           working: running build_ext                                          'b'\x1b[0m\r           working: running build_src                                          'b'\x1b[0m\r           working: build_src                                                  'b'\x1b[0m\r           working: building py_modules sources                                'b'\x1b[0m\r           working: building library "npymath" sources                         'b'\x1b[0m\r           working: customize Gnu95FCompiler                                   'b'\x1b[0m\r           working: Found executable /usr/bin/gfortran                         'b'\x1b[0m\r           working: Found executable /home/roopa/.buildozer/a...(and 119 more) 'b'\x1b[0m\r           working: Found executable /home/roopa/.buildozer/a...(and 119 more) 'b'\x1b[0m\r           working: Found executable /home/roopa/.buildozer/a...(and 123 more) 'b'\x1b[0m\r           working: customize Gnu95FCompiler                                   'b'\x1b[0m\r           working: customize Gnu95FCompiler using config                      'b'\x1b[0m\r           working: C compiler: /usr/bin/ccache arm-linux-and...(and 864 more) 'b"\x1b[0m\r           working: compile options: '-Inumpy/core/src/privat...(and 287 more) "b'\x1b[0m\r           working: ccache: _configtest.c                                      'b'\x1b[0m\r           working: /usr/bin/ccache arm-linux-androideabi-gcc...(and 405 more) 'b'\x1b[0m\r           working: /home/roopa/.buildozer/android/platform/a...(and 221 more) 'b'\x1b[0m\r           working: /home/roopa/.buildozer/android/platform/a...(and 219 more) 'b'\x1b[0m\r           working: /home/roopa/.buildozer/android/platform/a...(and 179 more) 'b'\x1b[0m\r           working: /home/roopa/.buildozer/android/platform/a...(and 180 more) 'b'\x1b[0m\r           working: collect2: error: ld returned 1 exit status                 'b'\x1b[0m\r           working: /home/roopa/.buildozer/android/platform/a...(and 221 more) 'b'\x1b[0m\r           working: /home/roopa/.buildozer/android/platform/a...(and 219 more) 'b'\x1b[0m\r           working: /home/roopa/.buildozer/android/platform/a...(and 179 more) 'b'\x1b[0m\r           working: /home/roopa/.buildozer/android/platform/a...(and 180 more) 'b'\x1b[0m\r           working: collect2: error: ld returned 1 exit status                 'b'\x1b[0m\r           working: failure.                                                   'b'\x1b[0m\r           working: removing: _configtest.c _configtest.o                      'b'\x1b[0m\r           working: Traceback (most recent call last):                         'b'\x1b[0m\r           working:   File "setup.py", line 251, in <module>                   'b'\x1b[0m\r           working:     setup_package()                                        'b'\x1b[0m\r           working:   File "setup.py", line 243, in setup_package              'b'\x1b[0m\r           working:     setup(**metadata)                                      'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 133 more) 'b'\x1b[0m\r           working:     return old_setup(**new_attr)                           'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 129 more) 'b'\x1b[0m\r           working:     dist.run_commands()                                    'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 136 more) 'b'\x1b[0m\r           working:     self.run_command(cmd)                                  'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 135 more) 'b'\x1b[0m\r           working:     cmd_obj.run()                                          'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 143 more) 'b"\x1b[0m\r           working:     self.run_command('build_src')                          "b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 134 more) 'b'\x1b[0m\r           working:     self.distribution.run_command(command)                 'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 135 more) 'b'\x1b[0m\r           working:     cmd_obj.run()                                          'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 144 more) 'b'\x1b[0m\r           working:     self.build_sources()                                   'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 154 more) 'b'\x1b[0m\r           working:     self.build_library_sources(*libname_info)              'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 162 more) 'b'\x1b[0m\r           working:     sources = self.generate_sources(source...(and 26 more) 'b'\x1b[0m\r           working:   File "/home/roopa/Downloads/NumPyCNNAnd...(and 157 more) 'b'\x1b[0m\r           working:     source = func(extension, build_dir)                    'b'\x1b[0m\r           working:   File "numpy/core/setup.py", line 686, in get_mathlib_info'b'\x1b[0m\r           working:     raise RuntimeError("Broken toolchain: ...(and 32 more) 'b'\x1b[0m\r           working: RuntimeError: Broken toolchain: cannot lin...(and 20 more) 'b'\x1b[0m\r                                                                               \r'# Command failed: /usr/bin/python3.5 -m pythonforandroid.toolchain create --dist_name=numpycnn --bootstrap=sdl2 --requirements=kivy,numpy,pil,android,request --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/roopa/Downloads/NumPyCNNAndroid-master/.buildozer/android/platform/build


--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.

For more options, visit https://groups.google.com/d/optout.



--
Ganesh J
Project Associate,
College of Engineering, Guindy.

st...@btp.nl

unread,
Sep 5, 2018, 1:18:32 AM9/5/18
to Kivy users support
Not an answer to your question but we use this library for a couple of our games:
https://github.com/kpiorno/kivy3dgui
It works very well even on older hardware

me2 beats

unread,
Sep 5, 2018, 7:22:41 PM9/5/18
to Kivy users support
Working!)
Quaternions are really useful

The mistake was that I accumulated mouse dx and dy.




       
self.store_quat = None
       
self.Dx = 0
       
self.Dy = 0



       
self.last = (0,0)

       
self.canvas = RenderContext(compute_normal_mat=True)
       
self.canvas.shader.source = resource_find('simple.glsl')
       
self.scene = ObjFile(resource_find("monkey.obj"))
       
super(Renderer, self).__init__(**kwargs)
       
with self.canvas:
           
self.cb = Callback(self.setup_gl_context)
           
PushMatrix()
           
self.setup_scene()
           
PopMatrix()
           
self.cb = Callback(self.reset_gl_context)
       
Clock.schedule_interval(self.update_glsl, 1 / 60.)

   
def setup_gl_context(self, *args):
        glEnable
(GL_DEPTH_TEST)

   
def reset_gl_context(self, *args):
        glDisable
(GL_DEPTH_TEST)




   
def on_touch_down(self, touch):
       
super(Renderer, self).on_touch_down(touch)

       
self.Dx, self.Dy = 0, 0
       
self.store_quat = self.quat
#        self.on_touch_move(touch)




   
def on_touch_move(self, touch):
       
self.Dx += touch.dx
       
self.Dy += touch.dy

        new_quat
= e2q([0.01 * self.Dx, 0.01 * self.Dy, 0])
       
self.quat = mult(self.store_quat,new_quat)


        euler_radians
= q2e(self.quat)
       
self.roll.angle, self.pitch.angle, self.yaw.angle = list2deg(euler_radians)



        euler_radians
= q2e(self.quat)

       
self.roll.angle, self.pitch.angle, self.yaw.angle = list2deg(euler_radians)


       
print self.roll.angle, self.pitch.angle, self.yaw.angle





   
def update_glsl(self, delta):
Reply all
Reply to author
Forward
0 new messages