Hello!
I’m trying to build a snap for a Python2-based project I’m working on.
The snapcraft.yaml file is available on Launchpad.
The build works fine for amd64 architecture (both on my computer using snapcraft cleanbuild
and on Launchpad), but it fails when I try to build for arm architecture:
In both cases, I see errors like:
Running setup.py bdist_wheel for cryptography: started
Running setup.py bdist_wheel for cryptography: finished with status 'error'
Complete output from command /build/qabro/parts/qabro/install/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-wheel-FksYhb/cryptography/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-smvXGn:
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
[…]
distutils.errors.DistutilsError: Setup script exited with error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
[…]
Running setup.py bdist_wheel for cffi: started
Running setup.py bdist_wheel for cffi: finished with status 'error'
Complete output from command /build/qabro/parts/qabro/install/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-wheel-FksYhb/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-XUhgJC:
[…]
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/python2.7 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-aarch64-2.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
[…]
Failed to build cryptography cffi
ERROR: Failed to build one or more wheels
Sorry, Snapcraft ran into an error when trying to running through its
lifecycle that generated the following traceback:
[…]
CalledProcessError: Command '['lxc', 'exec', 'lp-xenial-arm64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build_url": "https://snap-proxy.launchpad.net:3128', '--env', 'https_proxy=http://snap-proxy.launchpad.net:3128', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy', '--', '/bin/sh', '-c', 'cd /build/qabro && linux64 snapcraft']' returned non-zero exit status 1
Does anyone know how this could be fixed?
Thanks!