Cross-compiling Kivy to ARM i.MX6DL

362 views
Skip to first unread message

Cleiton Bueno

unread,
May 28, 2016, 4:50:07 PM5/28/16
to Kivy users support
Build a Linux Embedded and installed all dependencies for Kivy and performed successfully cross-compiling.


** Cross-compiling:

Using distutils
Detected Cython version 0.23
NOTE: Found GLES 2.0 headers at /usr/include/GLES2/gl2.h
Using this graphics system: OpenGL ES 2
SDL2: found SDL header at /usr/include/SDL2/SDL.h
SDL2: found SDL_mixer header at /usr/include/SDL2/SDL_mixer.h
SDL2: found SDL_ttf header at /usr/include/SDL2/SDL_ttf.h
SDL2: found SDL_image header at /usr/include/SDL2/SDL_image.h
running build
running build_py
running build_ext
Build configuration is:
 * use_rpi = 0
 * use_mali = 0
 * use_egl = 0
 * use_opengl_es2 = 1
 * use_opengl_debug = 0
 * use_glew = 0
 * use_sdl2 = 1
 * use_ios = 0
 * use_mesagl = 0
 * use_x11 = 0
 * use_gstreamer = 1
 * use_avfoundation = 0
 * use_osx_frameworks = 0
 * debug_gl = 0
 * debug = False
Detected compiler is unix
cythoning kivy/core/text/_text_sdl2.pyx to kivy/core/text/_text_sdl2.c
building 'kivy.core.text._text_sdl2' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/kivy
creating build/temp.linux-armv7l-2.7/kivy/core
creating build/temp.linux-armv7l-2.7/kivy/core/text
...
creating /usr/share/kivy-examples/3Drendering
copying examples/3Drendering/objloader.py -> /usr/share/kivy-examples/3Drendering
copying examples/3Drendering/main.py -> /usr/share/kivy-examples/3Drendering
copying examples/3Drendering/monkey.obj -> /usr/share/kivy-examples/3Drendering
copying examples/3Drendering/simple.glsl -> /usr/share/kivy-examples/3Drendering
copying examples/kv/app_camera.kv -> /usr/share/kivy-examples/kv
copying examples/kv/app_fbo.kv -> /usr/share/kivy-examples/kv
copying examples/kv/app_button.kv -> /usr/share/kivy-examples/kv
copying examples/kv/app_stencil.kv -> /usr/share/kivy-examples/kv
copying examples/kv/app_layout.kv -> /usr/share/kivy-examples/kv
copying examples/kv/app_video.kv -> /usr/share/kivy-examples/kv
copying examples/kv/builder_template.py -> /usr/share/kivy-examples/kv
copying examples/kv/app_scatter.kv -> /usr/share/kivy-examples/kv
copying examples/kv/app_logo.kv -> /usr/share/kivy-examples/kv
copying examples/kv/kvrun.py -> /usr/share/kivy-examples/kv
copying examples/kv/kivy.jpg -> /usr/share/kivy-examples/kv
running install_egg_info
Writing /usr/lib/python2.7/site-packages/Kivy-1.9.1-py2.7.egg-info



** Running regular Kivy:

root@colibri-imx6:~# python -c "import kivy"
[INFO              ] [Logger      ] Record log in /home/root/.kivy/logs/kivy_16-05-27_6.txt
[INFO              ] [Kivy        ] v1.9.2-dev0
[INFO              ] [Python      ] v2.7.11 (default, May 21 2016, 16:26:47)
[GCC 5.3.0]
root@colibri-imx6:~#



** But when performing a simple project I get the following error:

root@colibri-imx6:# python /opt/kivy/examples/tutorials/pong/main.py
[INFO   ] [Logger      ] Record log in /home/root/.kivy/logs/kivy_16-05-28_1.txt
[INFO   ] [Kivy        ] v1.9.1
[INFO   ] [Python      ] v2.7.11 (default, May 21 2016, 16:26:47)
[GCC 5.3.0]
[INFO   ] [Factory     ] 179 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored)
[INFO   ] [OSC         ] using <multiprocessing> for socket
[INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
[CRITICAL] [Window      ] Unable to find any valuable Window provider at all!
egl_rpi - ImportError: cannot import name bcm
  File "/usr/lib/python2.7/site-packages/kivy/core/__init__.py", line 59, in core_select_lib
    fromlist=[modulename], level=0)
  File "/usr/lib/python2.7/site-packages/kivy/core/window/window_egl_rpi.py", line 12, in <module>
    from kivy.lib.vidcore_lite import bcm, egl

sdl2 - RuntimeError: Failed loading fbGetDisplay: /usr/lib/libEGL.so.1: undefined symbol: _fbGetDisplay
  File "/usr/lib/python2.7/site-packages/kivy/core/__init__.py", line 67, in core_select_lib
    cls = cls()
  File "/usr/lib/python2.7/site-packages/kivy/core/window/window_sdl2.py", line 138, in __init__
    super(WindowSDL, self).__init__()
  File "/usr/lib/python2.7/site-packages/kivy/core/window/__init__.py", line 722, in __init__
    self.create_window()
  File "/usr/lib/python2.7/site-packages/kivy/core/window/window_sdl2.py", line 237, in create_window
    self.fullscreen, resizable, state)
  File "kivy/core/window/_window_sdl2.pyx", line 80, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy/core/window/_window_sdl2.c:1976)
    self.die()
  File "kivy/core/window/_window_sdl2.pyx", line 55, in kivy.core.window._window_sdl2._WindowSDL2Storage.die (kivy/core/window/_window_sdl2.c:1568)
    raise RuntimeError(<bytes> SDL_GetError())

x11 - ImportError: No module named window_x11
  File "/usr/lib/python2.7/site-packages/kivy/core/__init__.py", line 59, in core_select_lib
    fromlist=[modulename], level=0)

[CRITICAL] [App         ] Unable to get a Window, abort.


I've tried with git branch stable version and 1.9.2.dev0, I get the same error.





** I want to work with Linux framebuffer, I'm testing with fb-test in fbida and it works!


** I set something variable environment? Or what can I check?


--
Att,
Cleiton Bueno


Blog | Linkedin | B2Open | Portal Embarcados

Alexander Taylor

unread,
May 28, 2016, 6:34:40 PM5/28/16
to Kivy users support
It looks like an EGL related problem. I don't really know anything about this, but maybe kivy is assuming an extension that isn't present (it could be Kivy's fault). There's been a little discussion about this recently, you might have more luck asking about it on the irc channel.

Cleiton Bueno

unread,
May 30, 2016, 10:48:35 AM5/30/16
to Kivy users support
Oh really?
I researched libEGL and some expressions in the historic IRC but found nothing concrete.
I.MX6 see great potential, it would be interesting to explore the VIVANTE.

Cleiton Bueno

unread,
May 31, 2016, 10:29:40 AM5/31/16
to Kivy users support
Resolved parts.
I cross-compiling libs EGL, GLESv2 i.MX6 and copied to the target (libEGL-fb.so, libGLESv2.so, libGAL-fb.so and libVIVANTE.so) and renomiei taking the -fb.

Another error now:

root@colibri-imx6:~# python /usr/share/kivy-examples/canvas/canvas_stress.py
[INFO   ] [Logger      ] Record log in /home/root/.kivy/logs/kivy_16-05-31_8.txt

[INFO   ] [Kivy        ] v1.9.1
[INFO   ] [Python      ] v2.7.11 (default, May 21 2016, 16:26:47)
[GCC 5.3.0]
[INFO   ] [Factory     ] 179 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2

[INFO   ] [OSC         ] using <multiprocessing> for socket
[INFO   ] [Window      ] Provider: sdl2
[CRITICAL] [Window      ] Unable to find any valuable Window provider at all!
sdl2 - RuntimeError: Could not initialize OpenGL / GLES library

  File "/usr/lib/python2.7/site-packages/kivy/core/__init__.py", line 67, in core_select_lib
    cls = cls()
  File "/usr/lib/python2.7/site-packages/kivy/core/window/window_sdl2.py", line 138, in __init__
    super(WindowSDL, self).__init__()
  File "/usr/lib/python2.7/site-packages/kivy/core/window/__init__.py", line 722, in __init__
    self.create_window()
  File "/usr/lib/python2.7/site-packages/kivy/core/window/window_sdl2.py", line 237, in create_window
    self.fullscreen, resizable, state)
  File "kivy/core/window/_window_sdl2.pyx", line 133, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy/core/window/_window_sdl2.c:2367)

  File "kivy/core/window/_window_sdl2.pyx", line 55, in kivy.core.window._window_sdl2._WindowSDL2Storage.die (kivy/core/window/_window_sdl2.c:1568)

[CRITICAL] [App         ] Unable to get a Window, abort.


Reply all
Reply to author
Forward
0 new messages