<div dir="ltr"><div><div><div>Hello John<br><br></div><div>May bee this is of interest to you:<br></div><div><br>I build for ARM 32-bit and started working on the new module python-smbus-cffi a few weeks ago. After running into problems I could not finish my investigations because of other more urgent work.<br></div></div>Here are the notes I made:<br><br>On a 64-bit host: the build/install of python-smbus-cffi fails as follows:<br>
------------<br>Traceback (most recent call last):<br> File "setup.py", line 7, in <module><br> import smbus<br> File "/home/MPSRV01/home/micropoint/projects/linux-sys/buildroot/buildroot.oli/output/build/python-smbus-cffi-0.2/smbus/__init__.py", line 1, in <module><br>
from .smbus import ffi<br> File "/home/MPSRV01/home/micropoint/projects/linux-sys/buildroot/buildroot.oli/output/build/python-smbus-cffi-0.2/smbus/smbus.py", line 36, in <module><br> ffi = FFI()<br>
File "/home/MPSRV01/home/micropoint/projects/linux-sys/buildroot/buildroot.oli/output/target/usr/lib/python2.7/site-packages/cffi/api.py", line 56, in __init__<br> import _cffi_backend as backend<br>ImportError: /home/MPSRV01/home/micropoint/projects/linux-sys/buildroot/buildroot.oli/output/target/usr/lib/python2.7/site-packages/_cffi_backend.so: wrong ELF class: ELFCLASS32<br>
make: *** [/home/MPSRV01/home/micropoint/projects/linux-sys/buildroot/buildroot.oli/output/build/python-smbus-cffi-0.2/.stamp_built] Error 1<br>------------<br><br>The
problem is that on one hand we have a 64-bit host-python and on the
other hand a 32-bit dll for the target system and 'api.py:56' does not
like different word sizes:<br>
------------<br>output/host/usr/bin$ file python2.7<br>python2.7: ELF
64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked
(uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=99a8a60d10f743693f46f8a69468385638d2ff79, not stripped<br>
------------<br>------------<br>output/target/usr/lib/python2.7/site-packages$ file _cffi_backend.so<br>_cffi_backend.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped<br>------------<br><br></div><div>On the other hand I'm happy with compiling existing modules for python 2.7 under 64bit Ubuntu 14.04.<br></div><div>I must say that I have installed a fair bit of 32-bit libraries and applications on my system. <br></div><div><br></div>Regards, oli<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 September 2014 16:05, John Tobias <span dir="ltr"><<a href="mailto:john.tobias.ph@gmail.com" target="_blank">john.tobias.ph@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Does anyone here have successfully compiled python (32bit) on<br>
buildroot using a 64bit ubuntu machine?.<br>
<br>
Regards,<br>
<br>
john<br>
_______________________________________________<br>
buildroot mailing list<br>
<a href="mailto:buildroot@busybox.net">buildroot@busybox.net</a><br>
<a href="http://lists.busybox.net/mailman/listinfo/buildroot" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br>
</blockquote></div><br></div>