Arduino Yun

601 views
Skip to first unread message

Andy Clark

unread,
Apr 23, 2015, 5:40:14 AM4/23/15
to pytho...@googlegroups.com
I'm trying to install cffi on the Linux/OpenWRT side of an Arduino Yun so that I can get requests[security] working.

My install log is as follows:

Collecting cffi>=0.8 (from cryptography>=0.7->pyOpenSSL->requests[security])
  Using cached cffi-0.9.2.tar.gz
    Complete output from command python setup.py egg_info:
    mips-openwrt-linux-uclibc-gcc: error trying to exec 'as': execvp: No such file or directory
    cc1: error: unrecognized command line option '-fhonour-copts'
    cc1: error: unrecognized command line option '-fhonour-copts'
    mips-openwrt-linux-uclibc-gcc: error trying to exec 'as': execvp: No such file or directory
    cc1: error: unrecognized command line option '-fhonour-copts'
    cc1: error: unrecognized command line option '-fhonour-copts'

        No working compiler found, or bogus compiler options
        passed to the compiler from Python's distutils module.
        See the error messages above.
        (If they are about -mno-fused-madd and you are on OS/X 10.8,
        see http://stackoverflow.com/questions/22313407/ .)

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ZTXAdi/cffi


I'm trying to workout what's missing / incorrectly configured. Any suggestions as to what I need to install/build/configure?

I think I've actually got two different errors here.

Am I correct in thinking the reference to "as" is the GCC assembler?

Where is the -fhonour-copts likely to be hiding, as it does not seem to be in the cffi source? Any ideas what that does and if it's needed for cffi?

Andy Clark

unread,
Apr 23, 2015, 4:37:12 PM4/23/15
to pytho...@googlegroups.com
I installed binutils and that got rid of my AS error. Just need to resolve the -fhonour-copts issue now.

Andy Clark

unread,
Apr 23, 2015, 7:30:50 PM4/23/15
to pytho...@googlegroups.com
I could not work out where that -fhonour-opts setting was being passed in, I'm guessing it's somewhere deep in distutils. However I managed to find a newer GCC version (4.8.3) on the OpenWRT site http://downloads.openwrt.org/ which has got me a bit further

  Running setup.py install for cffi
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-dMiOI8/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-owC8bO-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-mips-2.7
    creating build/lib.linux-mips-2.7/cffi
    copying cffi/commontypes.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/__init__.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/model.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/vengine_gen.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/lock.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/vengine_cpy.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/cparser.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/ffiplatform.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/api.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/backend_ctypes.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/verifier.py -> build/lib.linux-mips-2.7/cffi
    copying cffi/gc_weakref.py -> build/lib.linux-mips-2.7/cffi
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.linux-mips-2.7
    creating build/temp.linux-mips-2.7/c
    mips-openwrt-linux-uclibc-gcc -fno-strict-aliasing -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -DNDEBUG -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-mips-2.7/c/_cffi_backend.o
    c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
    compilation terminated.
    error: command 'mips-openwrt-linux-uclibc-gcc' failed with exit status 1
    ----------------------------------------
    Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-dMiOI8/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-owC8bO-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-dMiOI8/cffi
 

Armin Rigo

unread,
Apr 23, 2015, 7:58:57 PM4/23/15
to pytho...@googlegroups.com
Hi Andy,

On 24 April 2015 at 01:30, Andy Clark <worksh...@gmail.com> wrote:
> c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
> #include <Python.h>

Install "python-dev", which you need for any Python module that
contains bits written in C.

Armin

matthew venn

unread,
May 31, 2015, 12:39:01 PM5/31/15
to pytho...@googlegroups.com
Andy, did you ever get cffi installed?
How did you install python-dev stuff?
Thanks,
Matt

Armin Rigo

unread,
May 31, 2015, 2:38:29 PM5/31/15
to pytho...@googlegroups.com
Hi Matthew,

On 31 May 2015 at 18:39, matthew venn <matth...@gmail.com> wrote:
> How did you install python-dev stuff?

This is a problem best discussed on the general python-list mailing
list (https://mail.python.org/mailman/listinfo/python-list), or
googling around for "how do I install a Python package that uses C
extension modules". The answer depends on the platform you are on,
but on Linux (Debian family) it is "sudo apt-get install python-dev".


A bientôt,

Armin.

Sanjee Singla

unread,
Jan 29, 2017, 8:23:09 PM1/29/17
to python-cffi
Hi Andy,

I've been on this for a couple of days. Did you make any progress on this?

Regards,
Sanjee
Reply all
Reply to author
Forward
0 new messages