//需求: 交叉编译RISC架构python环境第三方库gevent库的依赖greenlet

vi greenlet-2.0.2/src/greenlet/platform/switch_xxx_unix.h(该头文件涉及汇编栈帧切换slp_switch函数实现),最新的greenlet还不支持RISC架构

//主要的报错信息有:

src/greenlet/greenlet_slp_switch.hpp:87:6: error: #error "greenlet needs to be ported to this platform, or taught how to detect your compiler properly."

//使用crossenv交叉编译python第三方库方法:

pip3 install crossenv
使用crossenv代表虚拟环境:python3 -m crossenv --without-pip /home/book/arm-python/bin/python3 cross_venv
cd cross_venv/cross/bin
激活虚拟环境:source activate
./pip3 install Cython
参考文献:https://blog.csdn.net/m0_43443861/article/details/128526455

  

 

 //其他:

python setup.py install --prefix=/path/to/install # 等号后面写安装路径

 

//arc常见的几类交叉编译工具链

交叉编译时采用的是glibc库 ”archs-linux-glibc“