从源代码交叉编译用于ARM的python

从源代码交叉编译用于ARM的python,python,cross-compiling,embedded-linux,Python,Cross Compiling,Embedded Linux,我正在使用TI-SDK为ARM交叉编译python 3.7 我已经在ubuntu上下载了源代码,并按照下面的说明进行了操作 设置SDK导出路径的路径=$path: /图 制作 当我运行make时,我会得到下面的错误。您能告诉我如何解决链接器错误吗 *ar rc libpython3.5m.a Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o ar rc libpython3.5m.a Modules/_th

我正在使用TI-SDK为ARM交叉编译python 3.7

我已经在ubuntu上下载了源代码,并按照下面的说明进行了操作

设置SDK导出路径的路径=$path: /图 制作 当我运行make时,我会得到下面的错误。您能告诉我如何解决链接器错误吗

*ar rc libpython3.5m.a Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o 
ar rc libpython3.5m.a Modules/_threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/_functoolsmodule.o  Modules/_operator.o  Modules/_collectionsmodule.o  Modules/itertoolsmodule.o  Modules/atexitmodule.o  Modules/_stat.o  Modules/timemodule.o  Modules/_localemodule.o  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o  Modules/zipimport.o  Modules/faulthandler.o  Modules/_tracemalloc.o Modules/hashtable.o  Modules/symtablemodule.o  Modules/xxsubtype.o
ranlib libpython3.5m.a
gcc -pthread   -Xlinker -export-dynamic -o python Programs/python.o libpython3.5m.a -lpthread -ldl  -lutil   -lm  
libpython3.5m.a(fileutils.o): In function `set_inheritable':
/home/pcadmin/work/OTIS/Python-3.5.9/Python/fileutils.c:892: undefined reference to `fcntl64'
/home/pcadmin/work/OTIS/Python-3.5.9/Python/fileutils.c:903: undefined reference to `fcntl64'
libpython3.5m.a(fileutils.o): In function `get_inheritable':
/home/pcadmin/work/OTIS/Python-3.5.9/Python/fileutils.c:777: undefined reference to `fcntl64'
/home/pcadmin/work/OTIS/Python-3.5.9/Python/fileutils.c:777: undefined reference to `fcntl64'
libpython3.5m.a(fileutils.o): In function `set_inheritable':
/home/pcadmin/work/OTIS/Python-3.5.9/Python/fileutils.c:892: undefined reference to `fcntl64'
libpython3.5m.a(fileutils.o):/home/pcadmin/work/OTIS/Python-3.5.9/Python/fileutils.c:903: more undefined references to `fcntl64' follow
collect2: error: ld returned 1 exit status
Makefile:555: recipe for target 'python' failed
make: *** [python] Error 1*

如果需要更多信息来帮助我解决此问题,请发表意见。

我找到了解决方案。我想如果我发布它可能会帮助别人

链接器错误是由于对libxml2的依赖关系造成的。我交叉编译了libxml2,并链接到python,它成功了

配置脚本包括libxml的路径以及其他选项

 ./configure CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar LD=arm-linux-gnueabihf-ld RANLIB=arm-linux-gnueabihf-ranlib --host=arm-linux-gnueabihf --target=arm -prefix=/home/sagar/otis/python3_install --without-sqlite3 --without-pdo-sqlite --without-pear --enable-simplexml --disable-mbregex --enable-sockets --enable-fpm --disable-opcache --enable-libxml --without-zlib --with-libxml-dir=/home/sagar/otis/libxml/_install/ --build=x86_64-linux-gnu  --disable-all --disable-ipv6 ac_cv_have_long_long_format=yes ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no

我找到了解决办法。我想如果我发布它可能会帮助别人

链接器错误是由于对libxml2的依赖关系造成的。我交叉编译了libxml2,并链接到python,它成功了

配置脚本包括libxml的路径以及其他选项

 ./configure CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar LD=arm-linux-gnueabihf-ld RANLIB=arm-linux-gnueabihf-ranlib --host=arm-linux-gnueabihf --target=arm -prefix=/home/sagar/otis/python3_install --without-sqlite3 --without-pdo-sqlite --without-pear --enable-simplexml --disable-mbregex --enable-sockets --enable-fpm --disable-opcache --enable-libxml --without-zlib --with-libxml-dir=/home/sagar/otis/libxml/_install/ --build=x86_64-linux-gnu  --disable-all --disable-ipv6 ac_cv_have_long_long_format=yes ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no

那么,为什么不简单地使用Buildroot分布呢?那么,为什么不简单地使用Buildroot分布呢?