<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi all,<div>I’m trying to get a python library (mitmproxy/libmproxy) running on OpenWRT (<a href="https://openwrt.org/">https://openwrt.org/</a>) on a router with a MIPS CPU. mitmproxy depends on cryptography, and I’m getting stuck trying to cross-compile cryptography for MIPS using the OpenWRT SDK.</div><div><br></div><div>I have the cross compiler set up and have cross compiled a few python libraries with c code so I know that works (following <a href="http://whatschrisdoing.com/blog/2009/10/16/cross-compiling-python-extensions/">http://whatschrisdoing.com/blog/2009/10/16/cross-compiling-python-extensions/</a>). The issue I’m having seems to be with cffi— it’s cross-compiling the c code from cryptography, but then it tries to load that and execute it on the build machine which throws a cffi.ffiplatform.VerificationError complaining “wrong ELF class: ELFCLASS32” Of course it can’t run the code that was compiled for another architecture, but is there any way around this? There is no native compiler available for OpenWRT, so cross-compiling seems necessary.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Sam</div></body></html>