Skip to content

Can't build the image on a raspberry pi #33

@lb803

Description

@lb803

Hi!

I am trying to build this image on a raspberry pi 3 (rasbian), but the process gets stuck at the Dockerfile instruction:

RUN set -ex \
 && pipenv install --system --deploy --python=$(which python3)

This tosses a generic error which is not very interesting. However, if I open a bash shell into the container and I try to install manually the first package that fails with $ pip install cffi==1.14.1 I get this:

root@1f49095b4292:/# pip install cffi==1.14.1
WARNING: The directory '/var/lib/mopidy/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting cffi==1.14.1
  Downloading cffi-1.14.1.tar.gz (468 kB)
     |████████████████████████████████| 468 kB 1.2 MB/s 
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |████████████████████████████████| 112 kB 1.6 MB/s 
Building wheels for collected packages: cffi
  Building wheel for cffi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-qwlnbq_k
       cwd: /tmp/pip-install-_amf63jg/cffi/
  Complete output (48 lines):
  unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
  unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
  
      No working compiler found, or bogus compiler options passed to
      the compiler from Python's standard "distutils" module.  See
      the error messages above.  Likely, the problem is not related
      to CFFI but generic to the setup.py of any Python package that
      tries to compile C code.  (Hints: on OS/X 10.8, for errors about
      -mno-fused-madd see http://stackoverflow.com/questions/22313407/
      Otherwise, see https://wiki.python.org/moin/CompLangPython or
      the IRC channel #python on irc.freenode.net.)
  
      Trying to continue anyway.  If you are trying to install CFFI from
      a build done in a different context, you can ignore this warning.
  
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.7
  creating build/lib.linux-armv7l-3.7/cffi
  copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
  running build_ext
  building '_cffi_backend' extension
  creating build/temp.linux-armv7l-3.7
  creating build/temp.linux-armv7l-3.7/c
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
  unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
  error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for cffi
  Running setup.py clean for cffi
Failed to build cffi
DEPRECATION: Could not build wheels for cffi which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: pycparser, cffi
    Running setup.py install for cffi ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-69bt8n_3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/cffi
         cwd: /tmp/pip-install-_amf63jg/cffi/
    Complete output (48 lines):
    unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
    unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
    
        No working compiler found, or bogus compiler options passed to
        the compiler from Python's standard "distutils" module.  See
        the error messages above.  Likely, the problem is not related
        to CFFI but generic to the setup.py of any Python package that
        tries to compile C code.  (Hints: on OS/X 10.8, for errors about
        -mno-fused-madd see http://stackoverflow.com/questions/22313407/
        Otherwise, see https://wiki.python.org/moin/CompLangPython or
        the IRC channel #python on irc.freenode.net.)
    
        Trying to continue anyway.  If you are trying to install CFFI from
        a build done in a different context, you can ignore this warning.
    
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.7
    creating build/lib.linux-armv7l-3.7/cffi
    copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.linux-armv7l-3.7
    creating build/temp.linux-armv7l-3.7/c
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
    unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-69bt8n_3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/cffi Check the logs for full command output.

Any thoughts?
Thanks!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions