kivy cython 编译so 错误:[WARNING] stderr: ImportError: dlopen failed: library “libc.so.6” not found

 使用 arm-linux-gnueabihf-gcc 交叉编译出来cython 的 的so文件 调用的时候提示:[WARNING] stderr: ImportError: dlopen failed: library "libc.so.6" not found

解决办法:

from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

import os
#复制arm-linux-gnueabi目录到 /home/kivydev/andr/android-ndk-r10e/platforms/android-19/arch-arm/usr/include/
os.environ[‘CC’] = ‘/home/kivydev/andr/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc’
os.environ[‘LDSHARED’] = ‘/home/kivydev/andr/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -shared’

compile_args=[‘–sysroot=/home/kivydev/andr/android-ndk-r10e/platforms/android-19/arch-arm/’]
link_args=[‘–sysroot=/home/kivydev/andr/android-ndk-r10e/platforms/android-19/arch-arm/’]

setup(cmdclass = {‘build_ext’: build_ext},
ext_modules= [ Extension("core", ["core.py"],
extra_compile_args=compile_args,
extra_link_args=link_args) ])

 

新错误:[WARNING] stderr: ImportError: dlopen failed: cannot locate symbol "_Py_NoneStruct" referenced by "core.so"…

接着跳坑 

发表评论

您的电子邮箱地址不会被公开。