I cross-compile the python3.6 on arm platform, but I have some problem when I try to run it in the arm device. Firstly, I finish the deps zlib, libffi the aarch64 version and open them when I cross-compile the python. Secondly when I run python3 get-pip.py or python code with import some package about network. For example import pycm, import zmq. The packages come from local site-package,
It show the error Bus error (core dumped)
Program received signal SIGBUS, Bus error.
dlmmap_locked (length=length@entry=4096, offset=0, flags=1, prot=3, start=0x7fbf6fa000) at /home/fengmao/cpython/Modules/_ctypes/libffi/src/closures.c:476
476 /home/fengmao/cpython/Modules/_ctypes/libffi/src/closures.c: No such file or directory.
(gdb) bt
#0 dlmmap_locked (length=length@entry=4096, offset=0, flags=1, prot=3, start=0x7fbf6fa000) at /home/fengmao/cpython/Modules/_ctypes/libffi/src/closures.c:476
#1 0x0000007fbe407738 in dlmmap (length=length@entry=4096, offset=0, fd=-1, flags=34, prot=3, start=0x0) at /home/fengmao/cpython/Modules/_ctypes/libffi/src/closures.c:522
#2 0x0000007fbe4083b0 in sys_alloc (m=0x7fbe428b60 <_gm_>, nb=72) at /home/fengmao/cpython/Modules/_ctypes/libffi/src/dlmalloc.c:3520
#3 dlmalloc (bytes=64) at /home/fengmao/cpython/Modules/_ctypes/libffi/src/dlmalloc.c:4250
#4 ffi_closure_alloc (size=size@entry=64, code=code@entry=0x7fbeb02748) at /home/fengmao/cpython/Modules/_ctypes/libffi/src/closures.c:588
#5 0x0000007fbe3fff50 in _ctypes_alloc_callback (callable=0x7fbe37f510, converters=0x7fbf435048, restype=0xd1fc48, flags=257) at /home/fengmao/cpython/Modules/_ctypes/callbacks.c:348
#6 0x0000007fbe3f7edc in PyCFuncPtr_new (type=0xd23c88, args=0x7fbe37c7b8, kwds=0x0) at /home/fengmao/cpython/Modules/_ctypes/_ctypes.c:3541
#7 0x000000000050196c in type_call (type=0xd23c88, args=0x7fbe37c7b8, kwds=0x0) at Objects/typeobject.c:895
#8 0x0000000000460e8c in _PyObject_FastCallDict (func=0xd23c88, args=0x7fbe3851c8, nargs=1, kwargs=0x0) at Objects/abstract.c:2331
#9 0x00000000005bf1d8 in call_function (pp_stack=0x7fffff2378, pp_stack@entry=0x7fffff2448, oparg=oparg@entry=1, kwnames=kwnames@entry=0x0) at Python/ceval.c:4875
#10 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0x757e88 <Del_type>, f@entry=0x7fbe385048, throwflag=throwflag@entry=0) at Python/ceval.c:3335
#11 0x00000000005bd7e0 in PyEval_EvalFrameEx (throwflag=0, f=0x7fbe385048) at Python/ceval.c:754
#12 _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=nargs@entry=0, globals=<optimized out>) at Python/ceval.c:4933
#13 0x00000000005bf744 in fast_function (kwnames=0x0, nargs=0, stack=<optimized out>, func=0x7fbe3e2a60) at Python/ceval.c:4968
#14 call_function (pp_stack=0x7fffff2568, pp_stack@entry=0x7fffff2638, oparg=oparg@entry=0, kwnames=kwnames@entry=0x0) at Python/ceval.c:4872
#15 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0x7fbf460c38, throwflag=<optimized out>) at Python/ceval.c:3335
#16 0x00000000005bee30 in PyEval_EvalFrameEx (throwflag=0, f=0x5bbc40 <builtin_exec>) at Python/ceval.c:754
#17 _PyEval_EvalCodeWithName (_co=_co@entry=0x7fbe3701e0, globals=globals@entry=0x7fbe388168, locals=locals@entry=0x7fbe388168, args=args@entry=0x0, argcount=argcount@entry=0, kwnames=0x7fbe59e088,
kwnames@entry=0x0, kwargs=0x75bc50, kwargs@entry=0x0, kwcount=548669933968, kwcount@entry=0, kwstep=kwstep@entry=2, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0,
closure=closure@entry=0x0, name=name@entry=0x0, qualname=qualname@entry=0x0) at Python/ceval.c:4166
#18 0x00000000005c0190 in PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwcount=0, kws=0x0, argcount=0, args=0x0, locals=locals@entry=0x7fbe388168, globals=globals@entry=0x7fbe388168,
_co=_co@entry=0x7fbe3701e0) at Python/ceval.c:4187
#19 PyEval_EvalCode (co=co@entry=0x7fbe3701e0, globals=globals@entry=0x7fbe388168, locals=locals@entry=0x7fbe388168) at Python/ceval.c:731
#20 0x00000000005bbe08 in builtin_exec_impl (module=<optimized out>, locals=0x7fbe388168, globals=0x7fbe388168, source=0x7fbe3701e0) at Python/bltinmodule.c:983
#21 builtin_exec (module=<optimized out>, args=<optimized out>) at Python/clinic/bltinmodule.c.h:283
#22 0x00000000004e8434 in PyCFunction_Call (func=func@entry=0x7fbf46c990, args=args@entry=0x7fbe59e088, kwds=kwds@entry=0x7fbe388480) at Objects/methodobject.c:114
#23 0x00000000005c87ac in do_call_core (kwdict=0x7fbe388480, callargs=0x7fbe59e088, func=0x7fbf46c990) at Python/ceval.c:5116
#24 _PyEval_EvalFrameDefault (f=0x7fbf3bd698, throwflag=<optimized out>) at Python/ceval.c:3404
#25 0x00000000005bee30 in PyEval_EvalFrameEx (throwflag=0, f=0x83) at Python/ceval.c:754
#26 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=argcount@entry=3, kwnames=0x7fffff2af0, kwargs=0x7fbf423800, kwcount=7700480,
kwstep=kwstep@entry=1, defs=0x0, defcount=0, kwdefs=kwdefs@entry=0x0, closure=0x0, name=0x7fbf408ad0, qualname=0x7fbf408ad0) at Python/ceval.c:4166
#27 0x00000000005bf4fc in fast_function (kwnames=0x0, nargs=3, stack=<optimized out>, func=0x7fbf44bea0) at Python/ceval.c:4992
#28 call_function (pp_stack=0x7fffff2ac8, pp_stack@entry=0x7fffff2b98, oparg=oparg@entry=3, kwnames=kwnames@entry=0x0) at Python/ceval.c:4872
#29 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0x4ed620 <_PyObject_GenericGetAttrWithDict+528>, f@entry=0x7fbe3b1218, throwflag=throwflag@entry=0) at Python/ceval.c:3335
#30 0x00000000005bd7e0 in PyEval_EvalFrameEx (throwflag=0, f=0x7fbe3b1218) at Python/ceval.c:754
#31 _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=nargs@entry=2, globals=<optimized out>) at Python/ceval.c:4933
#32 0x00000000005bf744 in fast_function (kwnames=0x0, nargs=2, stack=<optimized out>, func=0x7fbf3d08c8) at Python/ceval.c:4968
#33 call_function (pp_stack=0x7fffff2cb8, pp_stack@entry=0x7fffff2d88, oparg=oparg@entry=1, kwnames=kwnames@entry=0x0) at Python/ceval.c:4872
#34 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0xfffffffffffffe88, f@entry=0x7fbe369248, throwflag=throwflag@entry=0) at Python/ceval.c:3335
#35 0x00000000005bd7e0 in PyEval_EvalFrameEx (throwflag=0, f=0x7fbe369248) at Python/ceval.c:754
#36 _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=nargs@entry=1, globals=<optimized out>) at Python/ceval.c:4933
#37 0x00000000005bf744 in fast_function (kwnames=0x0, nargs=1, stack=<optimized out>, func=0x7fbf42abf8) at Python/ceval.c:4968
#38 call_function (pp_stack=0x7fffff2ea8, pp_stack@entry=0x7fffff2f78, oparg=oparg@entry=1, kwnames=kwnames@entry=0x0) at Python/ceval.c:4872
#39 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0x4ed620 <_PyObject_GenericGetAttrWithDict+528>, f@entry=0xd04ad8, throwflag=throwflag@entry=0) at Python/ceval.c:3335
#40 0x00000000005bd7e0 in PyEval_EvalFrameEx (throwflag=0, f=0xd04ad8) at Python/ceval.c:754
#41 _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=nargs@entry=2, globals=<optimized out>) at Python/ceval.c:4933
#42 0x00000000005bf744 in fast_function (kwnames=0x0, nargs=2, stack=<optimized out>, func=0x7fbf42bd08) at Python/ceval.c:4968
#43 call_function (pp_stack=0x7fffff3098, pp_stack@entry=0x7fffff3168, oparg=oparg@entry=2, kwnames=kwnames@entry=0x0) at Python/ceval.c:4872
#44 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0x6e8598 <_PyNamespace_Type+280>, f@entry=0xfe01f8, throwflag=throwflag@entry=0) at Python/ceval.c:3335
#45 0x00000000005bd7e0 in PyEval_EvalFrameEx (throwflag=0, f=0xfe01f8) at Python/ceval.c:754
#46 _PyFunction_FastCall (co=co@entry=0x7fbf422300, args=<optimized out>, args@entry=0x0, nargs=nargs@entry=2, globals=globals@entry=0x6fd000 <states_9+144>) at Python/ceval.c:4933
#47 0x00000000005c93a4 in _PyFunction_FastCallDict (func=func@entry=0x7fbf42bd90, args=0x0, args@entry=0x7fffff3288, nargs=nargs@entry=2, kwargs=kwargs@entry=0x0) at Python/ceval.c:5035
--Type <RET> for more, q to quit, c to continue without paging--r
#48 0x000000000046104c in _PyObject_FastCallDict (func=0x7fbf42bd90, args=0x7fffff3288, nargs=2, kwargs=0x0) at Objects/abstract.c:2310
#49 0x0000000000462320 in _PyObject_CallMethodIdObjArgs (callable=0x7fbf42bd90, name=name@entry=0x6fdb00 <PyId__find_and_load.13698>) at Objects/abstract.c:2796
#50 0x00000000005eb4fc in PyImport_ImportModuleLevelObject (name=name@entry=0x7fbeccd998, globals=<optimized out>, locals=<optimized out>, fromlist=fromlist@entry=0x6e8710 <_Py_NoneStruct>, level=0)
at Python/import.c:1578
#51 0x00000000005c7f84 in import_name (level=0x73cdd8 <small_ints+160>, fromlist=0x6e8710 <_Py_NoneStruct>, name=0x7fbeccd998, f=0xd1c818) at Python/ceval.c:5245
#52 _PyEval_EvalFrameDefault (f=0x7fbf417d58, throwflag=<optimized out>) at Python/ceval.c:2899
#53 0x00000000005bee30 in PyEval_EvalFrameEx (throwflag=0, f=0x7fbe3d9cf0) at Python/ceval.c:754
#54 _PyEval_EvalCodeWithName (_co=_co@entry=0x7fbe3a0030, globals=globals@entry=0x7fbe3d9cf0, locals=locals@entry=0x7fbe3d9cf0, args=args@entry=0x0, argcount=argcount@entry=0, kwnames=0x7fbe3d3548,
kwnames@entry=0x0, kwargs=0x658730 <zipimporter_load_module>, kwargs@entry=0x0, kwcount=548652528968, kwcount@entry=0, kwstep=kwstep@entry=2, defs=defs@entry=0x0, defcount=defcount@entry=0,
kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0, name=name@entry=0x0, qualname=qualname@entry=0x0) at Python/ceval.c:4166
#55 0x00000000005c0190 in PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwcount=0, kws=0x0, argcount=0, args=0x0, locals=locals@entry=0x7fbe3d9cf0, globals=globals@entry=0x7fbe3d9cf0,
_co=_co@entry=0x7fbe3a0030) at Python/ceval.c:4187
#56 PyEval_EvalCode (co=co@entry=0x7fbe3a0030, globals=globals@entry=0x7fbe3d9cf0, locals=locals@entry=0x7fbe3d9cf0) at Python/ceval.c:731
#57 0x00000000005ea1ec in exec_code_in_module (code_object=0x7fbe3a0030, module_dict=0x7fbe3d9cf0, name=0x7fbe386b70) at Python/import.c:831
#58 PyImport_ExecCodeModuleObject (name=0x7fbe386b70, co=co@entry=0x7fbe3a0030, pathname=<optimized out>, cpathname=cpathname@entry=0x0) at Python/import.c:875
#59 0x0000000000658958 in zipimporter_load_module (obj=<optimized out>, args=<optimized out>) at ./Modules/zipimport.c:510
#60 0x00000000004e87c4 in _PyCFunction_FastCallDict (kwargs=<optimized out>, nargs=0, args=0xd024e8, func_obj=0x7fbe744090) at Objects/methodobject.c:234
#61 _PyCFunction_FastCallKeywords (func=func@entry=0x7fbe744090, stack=stack@entry=0xd024e8, nargs=nargs@entry=1, kwnames=kwnames@entry=0x0) at Objects/methodobject.c:294
#62 0x00000000005bf5c4 in call_function (pp_stack=0x7fffff38b8, pp_stack@entry=0x7fffff3988, oparg=oparg@entry=1, kwnames=kwnames@entry=0x0) at Python/ceval.c:4851
#63 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0xfffffffffffffef2, f@entry=0xd02358, throwflag=throwflag@entry=0) at Python/ceval.c:3335
#64 0x00000000005bd7e0 in PyEval_EvalFrameEx (throwflag=0, f=0xd02358) at Python/ceval.c:754
#65 _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=nargs@entry=1, globals=<optimized out>) at Python/ceval.c:4933
#66 0x00000000005bf744 in fast_function (kwnames=0x0, nargs=1, stack=<optimized out>, func=0x7fbf42ab70) at Python/ceval.c:4968
#67 call_function (pp_stack=0x7fffff3aa8, pp_stack@entry=0x7fffff3b78, oparg=oparg@entry=1, kwnames=kwnames@entry=0x0) at Python/ceval.c:4872
#68 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0xfffffffffffffe88, f@entry=0x7fbe369048, throwflag=throwflag@entry=0) at Python/ceval.c:3335
#69 0x00000000005bd7e0 in PyEval_EvalFrameEx (throwflag=0, f=0x7fbe369048) at Python/ceval.c:754
#70 _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=nargs@entry=1, globals=<optimized out>) at Python/ceval.c:4933
#71 0x00000000005bf744 in fast_function (kwnames=0x0, nargs=1, stack=<optimized out>, func=0x7fbf42abf8) at Python/ceval.c:4968
#72 call_function (pp_stack=0x7fffff3c98, pp_stack@entry=0x7fffff3d68, oparg=oparg@entry=1, kwnames=kwnames@entry=0x0) at Python/ceval.c:4872
#73 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0x4ed620 <_PyObject_GenericGetAttrWithDict+528>, f@entry=0xed38a8, throwflag=throwflag@entry=0) at Python/ceval.c:3335
#74 0x00000000005bd7e0 in PyEval_EvalFrameEx (throwflag=0, f=0xed38a8) at Python/ceval.c:754
#75 _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=nargs@entry=2, globals=<optimized out>) at Python/ceval.c:4933
#76 0x00000000005bf744 in fast_function (kwnames=0x0, nargs=2, stack=<optimized out>, func=0x7fbf42bd08) at Python/ceval.c:4968
#77 call_function (pp_stack=0x7fffff3e88, pp_stack@entry=0x7fffff3f58, oparg=oparg@entry=2, kwnames=kwnames@entry=0x0) at Python/ceval.c:4872
#78 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0x7fbe3dea40, f@entry=0xfeb298, throwflag=throwflag@entry=0) at Python/ceval.c:3335
#79 0x00000000005bd7e0 in PyEval_EvalFrameEx (throwflag=0, f=0xfeb298) at Python/ceval.c:754
#80 _PyFunction_FastCall (co=co@entry=0x7fbf422300, args=<optimized out>, args@entry=0x0, nargs=nargs@entry=2, globals=globals@entry=0x6fd000 <states_9+144>) at Python/ceval.c:4933
#81 0x00000000005c93a4 in _PyFunction_FastCallDict (func=func@entry=0x7fbf42bd90, args=0x0, args@entry=0x7fffff4078, nargs=nargs@entry=2, kwargs=kwargs@entry=0x0) at Python/ceval.c:5035
#82 0x000000000046104c in _PyObject_FastCallDict (func=0x7fbf42bd90, args=0x7fffff4078, nargs=2, kwargs=0x0) at Objects/abstract.c:2310
#83 0x0000000000462320 in _PyObject_CallMethodIdObjArgs (callable=0x7fbf42bd90, name=name@entry=0x6fdb00 <PyId__find_and_load.13698>) at Objects/abstract.c:2796
#84 0x00000000005eb4fc in PyImport_ImportModuleLevelObject (name=0x7fbe386b70, globals=<optimized out>, locals=<optimized out>, fromlist=0x0, level=0) at Python/import.c:1578
#85 0x00000000005ba7d8 in builtin___import__ (self=<optimized out>, args=<optimized out>, kwds=<optimized out>) at Python/bltinmodule.c:238
#86 0x00000000004e8404 in PyCFunction_Call (func=func@entry=0x7fbf46c5e8, args=args@entry=0x7fbe3decc0, kwds=kwds@entry=0x7fbe3885e8) at Objects/methodobject.c:98
#87 0x00000000005c87ac in do_call_core (kwdict=0x7fbe3885e8, callargs=0x7fbe3decc0, func=0x7fbf46c5e8) at Python/ceval.c:5116
#88 _PyEval_EvalFrameDefault (f=0x7fbf422338, throwflag=<optimized out>) at Python/ceval.c:3404
#89 0x00000000005bee30 in PyEval_EvalFrameEx (throwflag=0, f=0x83) at Python/ceval.c:754
#90 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=argcount@entry=2, kwnames=0x7fffff45f0, kwargs=0x76e480, kwcount=7700480,
kwstep=kwstep@entry=1, defs=0x0, defcount=0, kwdefs=kwdefs@entry=0x0, closure=0x0, name=0x7fbf408ad0, qualname=0x7fbf408ad0) at Python/ceval.c:4166
#91 0x00000000005bf4fc in fast_function (kwnames=0x0, nargs=2, stack=<optimized out>, func=0x7fbf44bea0) at Python/ceval.c:4992
#92 call_function (pp_stack=0x7fffff45c8, pp_stack@entry=0x7fffff4698, oparg=oparg@entry=2, kwnames=kwnames@entry=0x0) at Python/ceval.c:4872
#93 0x00000000005c3ea8 in _PyEval_EvalFrameDefault (f=0x7fbe3c0aa0, throwflag=<optimized out>) at Python/ceval.c:3335
#94 0x00000000005bee30 in PyEval_EvalFrameEx (throwflag=0, f=0x0) at Python/ceval.c:754
I want to run the python with pycom package in arm platform.