I want to contribute to Kivy 1.9.1-dev.
Trying to debug on android, using buildozer, from ~/ I've tried:
git clone git://github.com/kivy/kivy.git
cd kivy
python setup.py build_ext --inplace -f
then from ~/ I did:
git clone https://github.com/kivy/buildozer.git
cd buildozer
sudo python2.7 setup.py install
finally from ~/kivy-test/
buildozer init
buildozer android debug deploy run
eventually I get the following error:
Detected compiler is unix
building 'kivy.graphics.vertex_instructions' extension
ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/navatm/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/navatm/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -fPIC -I/home/navatm/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm/usr/include -I/home/navatm/code/kivy-test/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c kivy/graphics/vertex_instructions.c -o build/temp.linux-x86_64-2.7/kivy/graphics/vertex_instructions.o
kivy/graphics/vertex_instructions.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
Any suggestions?
Related
I am trying to compile a driver as a loadable module but whenever I adb shell into my phone and do an insmod test.ko I get the error message insmod: failed to load /data/local/tmp/test.ko: Exec format error. Grep'ing dmesg I find the following log: test: no symbol version for module_layout.
I've done quite a bit of googling [Ref] [Ref] [Ref] [Ref] [Ref] and reading the linux kbuild documentation txt files [Ref] [Ref] to no avail, so if someone knows the answer it'd be fab :) (I've only referenced the most helpful links I found).
What I've done so far is this:
I have an Qualcomm Aurora checkout and in the kernel directory I type the following
cp arch/arm64/configs/gemini_user_defconfig .config [B]# Has CONFIG_MODVERSIONS enabled and MODULE_SIG*=n[/B]
yes "" | make oldconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- V=1
make prepare ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- V=1
make scripts ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- V=1
make modules ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- V=1
I have my PATH set to point to /MyAOSBDir/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin so I pick up the correct toolchain.
At this point appears to be well. In my kernel directory I have Module.symvers, so I appear to be set.
Now to the directory I have set up outside of this build tree with a dummy test... The Makefile looks like this:
KERNEL_DIR:=/solomon-build/MiNote2AOSB/kernel/
obj-m += test.o
PWD := $(shell pwd)
.PHONY: all
all:
$(MAKE) M=$(PWD) ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -C $(KERNEL_DIR) modules V=1
clean:
$(MAKE) M=$(PWD) -C $(KERNEL_DIR) clean
The driver is just a dummy:
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h> /* Needed for the macros */
static int __init hello_start(void)
{
printk(KERN_INFO "Hello world\n");
return 0;
}
static void __exit hello_end(void)
{
printk(KERN_INFO "Goodbye world\n");
}
module_init(hello_start);
module_exit(hello_end);
I do make make all at the comment line and get this output:
make M=/solomon-build/build_mxt_kmod ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -C /solomon-build/MiNote2AOSB/kernel/ modules V=1
make[1]: Entering directory `/solomon-build/MiNote2AOSB/kernel'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
mkdir -p /solomon-build/build_mxt_kmod/.tmp_versions ; rm -f /solomon-build/build_mxt_kmod/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/solomon-build/build_mxt_kmod
./scripts/gcc-wrapper.py aarch64-linux-android-gcc -Wp,-MD,/solomon-build/build_mxt_kmod/.test.o.d -nostdinc -isystem /solomon-build/MiNote2AOSB/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/4.9.x-google/include -I./arch/arm64/include -Iarch/arm64/include/generated -Iinclude -I./arch/arm64/include/uapi -Iarch/arm64/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mgeneral-regs-only -fno-pic -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test)" -D"KBUILD_MODNAME=KBUILD_STR(test)" -c -o /solomon-build/build_mxt_kmod/.tmp_test.o /solomon-build/build_mxt_kmod/test.c
(cat /dev/null; echo kernel//solomon-build/build_mxt_kmod/test.ko;) > /solomon-build/build_mxt_kmod/modules.order
make -f ./scripts/Makefile.modpost
find /solomon-build/build_mxt_kmod/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -m -i ./Module.symvers -I /solomon-build/build_mxt_kmod/Module.symvers -o /solomon-build/build_mxt_kmod/Module.symvers -S -E -w -s -T -
./scripts/gcc-wrapper.py aarch64-linux-android-gcc -Wp,-MD,/solomon-build/build_mxt_kmod/.test.mod.o.d -nostdinc -isystem /solomon-build/MiNote2AOSB/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/4.9.x-google/include -I./arch/arm64/include -Iarch/arm64/include/generated -Iinclude -I./arch/arm64/include/uapi -Iarch/arm64/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mgeneral-regs-only -fno-pic -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test.mod)" -D"KBUILD_MODNAME=KBUILD_STR(test)" -DMODULE -c -o /solomon-build/build_mxt_kmod/test.mod.o /solomon-build/build_mxt_kmod/test.mod.c
aarch64-linux-android-ld -EL -r -T ./scripts/module-common.lds --build-id --fix-cortex-a53-843419 -o /solomon-build/build_mxt_kmod/test.ko /solomon-build/build_mxt_kmod/test.o /solomon-build/build_mxt_kmod/test.mod.o
make[1]: Leaving directory `/solomon-build/MiNote2AOSB/kernel'
So, there are no messages saying there is a missing Module.symvers, so that's good, and I do get a built .ko file.
What I don't understand is the message ERROR: Kernel configuration is invalid. The files it is talking about exist, so I know they have been created in my kernel build.
Anyway, trying to insmod this onto the phone gives the message I mentioned previously. If I cat Module.symvers I see:
0xff924338 backlight_force_update drivers/video/backlight/backlight EXPORT_SYMBOL
0x30254daf test_iosched_register block/test-iosched EXPORT_SYMBOL
<snip>
0xdd502540 backlight_device_unregister drivers/video/backlight/backlight EXPORT_SYMBOL
0x9939eba0 backlight_unregister_notifier drivers/video/backlight/backlight EXPORT_SYMBOL
So no symbol module_layout in the file, and thus no CRC, which is what I presume is creating the error message?
Any clues would be much appreciated, thank you.
Oh I should also mention that the module and kernel vermagic match:
# modinfo /data/local/tmp/test.ko
filename: /data/local/tmp/test.ko
depends:
vermagic: 3.18.20-mytestkernel-perf-g671c431-dirty SMP preempt mod_unload modversions aarch64
# uname -a
Linux localhost 3.18.20-mytestkernel-perf-g671c431-dirty #1 SMP PREEMPT Mon Jun 5 15:46:13 BST 2017 aarch64
*EDIT - FOUND SOLUTION - NEW QUESTON *:
I've gotten much further since posting. What I realised was, was that the compilation of the kernel using the Android build system is producing a radically different Module.symvers one from my method above (for some reason it took a while for the penny to drop and for me to check the Andoird build output - duh!). In fact, I've realised I always had the Module.symvers file, it was just located in ../out/target/product/msm8996/obj/KERNEL_OBJ/Module.symvers relative to the kernel dir. Copying this file into kernel and re-running my module build now produces a module that loads correctly :)
So, I guess the question becomes, why do the two files differ? What is Android doing differently? I assume it is setting up some more detailed config, but how/what/why?
So, the answer was relatively simple in the end...
I just use the normal Android build process of sourcing envsetup.sh, running lunch and then building the kernel:
. build/envsetup.sh
lunch msm8996-userdebug
make kernel -j16
(Remember to make sure in your .config file to set CONFIG_MODULES=y and set any kernel drivers to =m if you want them as modules).
In the separate directory, not in the Android build tree I now have my new module and the following Makefile, which now looks like this:
MY_ANDROID_ROOT_DIR :=/path/to/my/android/checkout
KERNEL_DIR:=$(MY_ANDROID_ROOT_DIR)/kernel
obj-m += my_driver.o
PWD := $(shell pwd)
.PHONY: all
all:
$(MAKE) \
M=$(PWD) \
ARCH=arm64 \
CROSS_COMPILE=aarch64-linux-android- \
-C $(KERNEL_DIR) \
modules \
V=1 \
O=$(MY_ANDROID_ROOT_DIR)/out/target/product/msm8996/obj/KERNEL_OBJ
clean:
$(MAKE) M=$(PWD) -C $(KERNEL_DIR) clean
The make all output will still be in your modules directory (not the Android output dir).
This is basically identical to all of the examples relating to pure Linux builds. The only extra bit of information I needed to provide was where the Android build system output its build files, which is O=$(MY_ANDROID_ROOT_DIR)/out/target/product/<your-product>/obj/KERNEL_OBJ.
The O= define tells Make where to find the output of the kernel build.
The 'V=1` define tells Make to output verbose build information.
modules is a kernel target that will build you module defined in the Makefile variable obj-m. This variable "specifies the object files which are built as loadable kernel modules".
Now my modules build fine and I don't need to worry about independently compiling the kernel or anything like that to fix missing file messages (although it will still output about autoconf.h, which I don't understand because it exists in my tree and doesn't seem to stop my modules working).
PS If you module includes more than one file define obj-m += my_driver.o and then my_driver-m:= <extra objects>.
I am trying to build my kivy application, but having run buildozer android debug --verbose the only I get is following:
[...]
Run prebuild
Call prebuild_hostpython
Call prebuild_python
Call prebuild_sdl
Call prebuild_pygame
Call prebuild_pyjnius
Call prebuild_android
Call prebuild_kivy
Run build
Skipped build_hostpython
Skipped build_python
Skipped build_sdl
Skipped build_pygame
Call build_pyjnius
Entering in ARM environment
Compiler found at /home/michal/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
/home/michal/Dokumenty/Projekty/Labirynt/.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)
running build_ext
building 'jnius' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/michal/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/michal/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -fPIC -I/home/michal/Dokumenty/Projekty/Labirynt/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
jnius/jnius.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 'arm-linux-androideabi-gcc' failed with exit status 1
Error compiling Cython file:
------------------------------------------------------------
...
if py_arg is None:
j_args[index].l = NULL
elif isinstance(py_arg, basestring) and \
argtype in ('Ljava/lang/String;', 'Ljava/lang/Object;'):
j_args[index].l = j_env[0].NewStringUTF(
j_env, <char *><bytes>py_arg.encode('utf-8'))
^
------------------------------------------------------------
jnius/jnius_conversion.pxi:54:31: Casting temporary Python object to non-numeric non-Python type
/home/michal/Dokumenty/Projekty/Labirynt/.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)
running build_ext
building 'jnius' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/michal/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/michal/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -fPIC -I/home/michal/Dokumenty/Projekty/Labirynt/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
jnius/jnius.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 'arm-linux-androideabi-gcc' failed with exit status 1
# Command failed: ./distribute.sh -m "kivy" -d "testapp"
I'm using Archlinux, 64bit, python2 2.7.8-2, with aur/python2-kivy-git.
When i'm trying to install aur/python2-kivy I get
Found GLES 2.0 headers at /usr/include/GLES2/gl2.h
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'dependency_links'
warnings.warn(msg)
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running build
running build_py
running build_ext
Build configuration is:
* use_rpi = False
* use_opengl_es2 = True
* use_opengl_debug = False
* use_glew = False
* use_sdl = False
* use_ios = False
* use_mesagl = False
* use_x11 = False
* use_gstreamer = True
* use_avfoundation = False
Generate config.h
Generate config.pxi
Detected compiler is unix
skipping 'kivy/graphics/texture.c' Cython extension (up-to-date)
skipping 'kivy/graphics/vertex.c' Cython extension (up-to-date)
skipping 'kivy/graphics/fbo.c' Cython extension (up-to-date)
skipping 'kivy/graphics/context.c' Cython extension (up-to-date)
skipping 'kivy/properties.c' Cython extension (up-to-date)
skipping 'kivy/graphics/context_instructions.c' Cython extension (up-to-date)
skipping 'kivy/graphics/instructions.c' Cython extension (up-to-date)
skipping 'kivy/graphics/stencil_instructions.c' Cython extension (up-to-date)
skipping 'kivy/graphics/opengl.c' Cython extension (up-to-date)
skipping 'kivy/graphics/transformation.c' Cython extension (up-to-date)
skipping 'kivy/graphics/vbo.c' Cython extension (up-to-date)
skipping 'kivy/graphics/opengl_utils.c' Cython extension (up-to-date)
skipping 'kivy/graphics/c_opengl_debug.c' Cython extension (up-to-date)
skipping 'kivy/graphics/gl_instructions.c' Cython extension (up-to-date)
cythoning kivy/lib/gstplayer/_gstplayer.pyx to kivy/lib/gstplayer/_gstplayer.c
Error compiling Cython file:
------------------------------------------------------------
...
g_object_set_void(self.playbin, 'video-sink', self.fakesink)
# configure playbin
g_object_set_int(self.pipeline, 'async-handling', 1)
c_uri = <bytes>self.uri.encode('utf-8')
^
------------------------------------------------------------
kivy/lib/gstplayer/_gstplayer.pyx:259:16: Storing unsafe C derivative of temporary Python reference
building 'kivy.lib.gstplayer._gstplayer' extension
gcc -pthread -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.7 -c kivy/lib/gstplayer/_gstplayer.c -o build/temp.linux-x86_64-2.7/kivy/lib/gstplayer/_gstplayer.o
kivy/lib/gstplayer/_gstplayer.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 'gcc' failed with exit status 1
How can I make it work?
This is an issue with the Cython version 0.21 and old code. The easiest solution is to downgrade Cython to 0.20, which works.
To use the newer Cython, delete the downloaded pyjnius and let buildozer download the most recent version:
rm ~/.buildozer/android/packages/pyjnius-master.zip
But the newer Cython also needs newer Kivy code. In your buildozer.spec, change kivy in the requirements to kivy==master to get the most recent Kivy code.
I'm not able to make APK of my simple kivy module with buildozer.
Following is the error dump:
Entering in ARM enviromnent
Compiler found at /home/roshan/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin//arm-linux-androideabi-gcc
/home/roshan/AndroidApp/.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)
running build_ext
building 'jnius' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/roshan/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/roshan/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -fPIC -I/home/roshan/AndroidApp/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c jnius/jnius.c -o build/temp.linux-i686-2.7/jnius/jnius.o
jnius/jnius.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 'arm-linux-androideabi-gcc' failed with exit status 1
Compiling /home/roshan/AndroidApp/.buildozer/android/platform/python-for-android/build/pyjnius/pyjnius-master/jnius/jnius.pyx
Error compiling Cython file:
------------------------------------------------------------
...
cdef class ByteArray:
cdef LocalRef _jobject
cdef long _size
cdef jbyte *_buf
cdef jbyte[:] _arr
^
------------------------------------------------------------
jnius/jnius_nativetypes.pxi:19:15: Expected an identifier or literal
/home/roshan/AndroidApp/.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)
running build_ext
building 'jnius' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/roshan/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/roshan/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -fPIC -I/home/roshan/AndroidApp/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c jnius/jnius.c -o build/temp.linux-i686-2.7/jnius/jnius.o
jnius/jnius.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 'arm-linux-androideabi-gcc' failed with exit status 1
# Command failed: ./distribute.sh -m "kivy" -d "Playstring"
How to resolve it. I tried installing cython again but it did not helped.
It looks like your Cython is too old. I had similar issues when I started Kivy development on 12.04. Try installing a newer version from PPA or using PIP.
From PPA:
sudo apt-add-repository ppa:cython-dev/master-ppa
sudo apt-get update
sudo apt-get install cython
Using PIP:
sudo apt-get install python-pip
sudo pip install --upgrade cython
I'm on Fedora Linux 19, using the latest Android SDK, latest java SDK, and NDK=R9. Using the instructions here, I'm trying to create a python/kivy installation specialized for android, by running the command, ./distribute.sh -m "kivy". It produces the output below. Can anyone tell me what's going wrong here, and what I can do to fix it? Thank you.
./dist*sh -m "kivy"
Check build dependencies for Fedora
Avoid check build dependencies, unknow platform Fedora
Check enviromnent
SDK located at /home/ljm/Developer/android-sdks
NDK located at /home/ljm/Developer/android-ndk-r9
NDK version is r9
API level set to 18
Check mandatory tools
Distribution will be located at /home/ljm/Developer/workspace/python-for-android/dist/default
The distribution /home/ljm/Developer/workspace/python-for-android/dist/default already exist
Press a key to remove it, or Control + C to abort.
Entering in ARM enviromnent
Compiler found at /home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
PATH is /home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:/home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86_64/bin/:/home/ljm/Developer/android-ndk-r9:/home/ljm/Developer/android-sdks/tools:/home/ljm/Developer/android-ndk-r9:/home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/:/home/ljm/Developer/android-sdks:/home/ljm/Developer/android-sdks/platform-tools:/home/ljm/Developer/android-sdks/tools:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/sbin:/usr/sbin:/homeljm.local/bin:/homeljmbin
Leaving ARM enviromnent
Read kivy recipe
Module kivy depend on pygame pyjnius android
Read pygame recipe
Module pygame depend on python sdl
Read pyjnius recipe
Module pyjnius depend on python sdl
Read android recipe
Module android depend on pygame
Read python recipe
Module python depend on hostpython
Read sdl recipe
Module sdl depend on python
Ignored python, already processed
Ignored sdl, already processed
Ignored pygame, already processed
Read hostpython recipe
Ignored python, already processed
Modules changed to hostpython python sdl pygame pyjnius android kivy
Run get packages
Download package for hostpython
Module hostpython already downloaded
Download package for python
Module python already downloaded
Download package for sdl
No package for sdl
Download package for pygame
Module pygame already downloaded
Download package for pyjnius
Module pyjnius already downloaded
Download package for android
No package for android
Download package for kivy
Module kivy already downloaded
Run prebuild
Call prebuild_hostpython
Call prebuild_python
Call prebuild_sdl
Call prebuild_pygame
Call prebuild_pyjnius
Call prebuild_android
Call prebuild_kivy
Run build
Call build_hostpython
Call build_python
Call build_sdl
Entering in ARM enviromnent
Compiler found at /home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
Android NDK: WARNING:/home/ljm/Developer/workspace/python-for-android/src/jni/../jni/application/Android.mk:application: non-system libraries in linker flags: -lpython2.7
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:/home/ljm/Developer/workspace/python-for-android/src/jni/../jni/png/Android.mk:png: LOCAL_LDLIBS is always ignored for static libraries
rm -f /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/lib*.so /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi-v7a/lib*.so /home/ljm/Developer/workspace/python-for-android/src/libs/mips/lib*.so /home/ljm/Developer/workspace/python-for-android/src/libs/x86/lib*.so
rm -f /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/gdbserver /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi-v7a/gdbserver /home/ljm/Developer/workspace/python-for-android/src/libs/mips/gdbserver /home/ljm/Developer/workspace/python-for-android/src/libs/x86/gdbserver
rm -f /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/gdb.setup /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi-v7a/gdb.setup /home/ljm/Developer/workspace/python-for-android/src/libs/mips/gdb.setup /home/ljm/Developer/workspace/python-for-android/src/libs/x86/gdb.setup
Install : libapplication.so => libs/armeabi/libapplication.so
install -p /home/ljm/Developer/workspace/python-for-android/src/obj/local/armeabi/libapplication.so /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libapplication.so
/home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-unneeded /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libapplication.so
Install : libsdl.so => libs/armeabi/libsdl.so
install -p /home/ljm/Developer/workspace/python-for-android/src/obj/local/armeabi/libsdl.so /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl.so
/home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-unneeded /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl.so
Install : libsdl_main.so => libs/armeabi/libsdl_main.so
install -p /home/ljm/Developer/workspace/python-for-android/src/obj/local/armeabi/libsdl_main.so /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl_main.so
/home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-unneeded /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl_main.so
Install : libsdl_ttf.so => libs/armeabi/libsdl_ttf.so
install -p /home/ljm/Developer/workspace/python-for-android/src/obj/local/armeabi/libsdl_ttf.so /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl_ttf.so
/home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-unneeded /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl_ttf.so
Install : libsdl_image.so => libs/armeabi/libsdl_image.so
install -p /home/ljm/Developer/workspace/python-for-android/src/obj/local/armeabi/libsdl_image.so /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl_image.so
/home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-unneeded /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl_image.so
Install : libsqlite3.so => libs/armeabi/libsqlite3.so
install -p /home/ljm/Developer/workspace/python-for-android/src/obj/local/armeabi/libsqlite3.so /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsqlite3.so
/home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-unneeded /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsqlite3.so
Install : libsdl_mixer.so => libs/armeabi/libsdl_mixer.so
install -p /home/ljm/Developer/workspace/python-for-android/src/obj/local/armeabi/libsdl_mixer.so /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl_mixer.so
/home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-unneeded /home/ljm/Developer/workspace/python-for-android/src/libs/armeabi/libsdl_mixer.so
Leaving ARM enviromnent
Call build_pygame
Entering in ARM enviromnent
Compiler found at /home/ljm/Developer/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
running install
running build
running build_py
running build_ext
building 'pygame.surface' extension
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ljm/Developer/android-ndk-r9/platforms/android-18/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ljm/Developer/android-ndk-r9/platforms/android-18/arch-arm -I/home/ljm/Developer/workspace/python-for-android/src/jni/png -I/home/ljm/Developer/workspace/python-for-android/src/jni/jpeg -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl/include -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_mixer -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_ttf -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_image -fPIC -D_REENTRANT -I/home/ljm/Developer/workspace/python-for-android/build/python-install/include/python2.7 -c src/surface.c -o build/temp.linux-i686-2.7/src/surface.o
In file included from /home/ljm/Developer/workspace/python-for-android/build/python-install/include/python2.7/Python.h:126:0,
from src/pygame.h:75,
from src/surface.h:28,
from src/surface.c:26:
/home/ljm/Developer/workspace/python-for-android/build/python-install/include/python2.7/modsupport.h:27:1: warning: 'PyArg_ParseTuple' is an unrecognized format function type [-Wformat=]
PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
^
src/surface.c: In function 'surf_get_locked':
src/surface.c:755:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
Py_RETURN_TRUE;
^
src/surface.c:756:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
Py_RETURN_FALSE;
^
src/surface.c: In function 'surf_convert_alpha':
src/surface.c:1279:28: warning: variable 'src' set but not used [-Wunused-but-set-variable]
SDL_Surface *newsurf, *src;
^
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ljm/Developer/android-ndk-r9/platforms/android-18/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ljm/Developer/android-ndk-r9/platforms/android-18/arch-arm -I/home/ljm/Developer/workspace/python-for-android/src/jni/png -I/home/ljm/Developer/workspace/python-for-android/src/jni/jpeg -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl/include -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_mixer -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_ttf -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_image -fPIC -D_REENTRANT -I/home/ljm/Developer/workspace/python-for-android/build/python-install/include/python2.7 -c src/alphablit.c -o build/temp.linux-i686-2.7/src/alphablit.o
In file included from /home/ljm/Developer/workspace/python-for-android/build/python-install/include/python2.7/Python.h:126:0,
from src/pygame.h:75,
from src/surface.h:28,
from src/alphablit.c:25:
/home/ljm/Developer/workspace/python-for-android/build/python-install/include/python2.7/modsupport.h:27:1: warning: 'PyArg_ParseTuple' is an unrecognized format function type [-Wformat=]
PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
^
In file included from src/surface.h:28:0,
from src/alphablit.c:25:
src/pygame.h:678:14: warning: 'PyGAME_C_API' defined but not used [-Wunused-variable]
static void* PyGAME_C_API[PYGAMEAPI_TOTALSLOTS] = { NULL };
^
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ljm/Developer/android-ndk-r9/platforms/android-18/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ljm/Developer/android-ndk-r9/platforms/android-18/arch-arm -I/home/ljm/Developer/workspace/python-for-android/src/jni/png -I/home/ljm/Developer/workspace/python-for-android/src/jni/jpeg -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl/include -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_mixer -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_ttf -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_image -fPIC -D_REENTRANT -I/home/ljm/Developer/workspace/python-for-android/build/python-install/include/python2.7 -c src/surface_fill.c -o build/temp.linux-i686-2.7/src/surface_fill.o
In file included from /home/ljm/Developer/workspace/python-for-android/build/python-install/include/python2.7/Python.h:126:0,
from src/pygame.h:75,
from src/surface.h:28,
from src/surface_fill.c:20:
/home/ljm/Developer/workspace/python-for-android/build/python-install/include/python2.7/modsupport.h:27:1: warning: 'PyArg_ParseTuple' is an unrecognized format function type [-Wformat=]
PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
^
In file included from src/surface.h:28:0,
from src/surface_fill.c:20:
src/pygame.h:678:14: warning: 'PyGAME_C_API' defined but not used [-Wunused-variable]
static void* PyGAME_C_API[PYGAMEAPI_TOTALSLOTS] = { NULL };
^
/home/ljm/Developer/workspace/python-for-android/src/tools/liblink -lm -L/home/ljm/Developer/workspace/python-for-android/build/libs -L/home/ljm/Developer/workspace/python-for-android/src/obj/local/armeabi/ -lm -lz -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/ljm/Developer/android-ndk-r9/platforms/android-18/arch-arm -I/home/ljm/Developer/workspace/python-for-android/src/jni/png -I/home/ljm/Developer/workspace/python-for-android/src/jni/jpeg -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl/include -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_mixer -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_ttf -I/home/ljm/Developer/workspace/python-for-android/src/jni/sdl_image build/temp.linux-i686-2.7/src/surface.o build/temp.linux-i686-2.7/src/alphablit.o build/temp.linux-i686-2.7/src/surface_fill.o -L/home/ljm/Developer/workspace/python-for-android/build/python-install/lib -lsdl -lm -lpython2.7 -o build/lib.linux-i686-2.7/pygame/surface.so
arm-linux-androideabi-ld: -arch: unknown option
arm-linux-androideabi-ld: use the --help option for usage information
error: command '/home/ljm/Developer/workspace/python-for-android/src/tools/liblink' failed with exit status 1
In accordance with the above suggestion of downgrading the API and NDK (to 14 and r8c, respectively), I've downgraded the android tools, and the problem seems to have been resolved. Thanks!
I am trying to build some small test programs for running on a mips board.
While trying to compile I am getting this error.
EXTRALDFLAGS=-Wall -g3 -static -pthread -Dpthread_yield=sched_yield
TOOL_PREFIX=/crux/shared/mips-android/bin/mipsel-linux-android- make -f gcc-makefile
clean all
echo "Cleaning...."
Cleaning....
rm -f dining.o
rm -f test
/crux/shared/mips-android/bin/mipsel-linux-android-gcc -g -c dining.c -o dining.o
In file included from /crux/mips-android/bin/../sysroot/usr/include/stdint.h:32:0,
from /crux/mips-android/bin/../lib/gcc/mipsel-linux-android/4.6.x
google/include/stdint.h:3,
from /crux/mips-android/bin/../lib/gcc/mipsel-linux-android/4.6.x
google/include-fixed/sys/types.h:43,
from /crux/mips-android/bin/../sysroot/usr/include/sys/time.h:32,
enter code herefrom /crux/mips-android/bin/../sysroot/usr/include/time.h:32,
from /crux/mips-android/bin/../sysroot/usr/include/pthread.h:31,
from dining.c:1:
/crux/mips-android/bin/../sysroot/usr/include/sys/_types.h:40:28: fatal error:
machine/_types.h: No such file or directory
compilation terminated.
make: *** [dining.o] Error 1
Sorry for the bad formatting, first time on here