2013-10-02 76 views
0

我在Fedora Linux系統19,採用了最新的Android SDK,最新的Java SDK,並NDK = R9。使用here指令,我試圖通過運行命令./distribute.sh -m "kivy"來創建專門用於android的python/kivy安裝。它產生下面的輸出。誰能告訴我這裏出了什麼問題,我能做些什麼來解決它?謝謝。的Android SDK/NDK錯誤與Python換的Android/kivy

./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 
+2

構建鏈已成功通過api14,ndk r8d測試,所以任何ndk應該可以工作,請嘗試使用ndk r8d,api級別14. –

+0

謝謝,不適用。經過一些無果而終的嘗試,讓它能夠與最新的NDK以及最近的8個NDK之一一起工作之後,我切換到了預製的Ubuntu安裝。正如你所建議的那樣,可能會給我自己的Linux安裝一個更老的NDK之一。 –

+1

r9,API18的修復進入py4a,buildozer,所以你現在應該可以使用r9了。 –

回答

1

按照降級API和NDK(14和R8C,分別)的上述建議,我已經降級了Android工具,以及這個問題似乎已經解決。謝謝!