Building wheel for cffi failed

322 views
Skip to first unread message

Shary

unread,
Nov 1, 2022, 10:53:16 AM11/1/22
to python-cffi
Hello , 

for some issue I need to install the cffi package on an linux system (It is a special linux distribution DAL- it is a very stripped down linux version). All installations can be done via pip. The python version ist 3.10. At the end I have to install the cryptography package, but there are problems to install the cffi package which is need by the  cryptography package. The wheels and setuptool package are already installed. 


When I execute the following, I get an error  :

(VENV_OPC) # python3 -m pip install cffi
Collecting cffi
Downloading cffi-1.15.1.tar.gz (508 kB)
|████████████████████████████████| 508 kB 1.1 MB/s
Requirement already satisfied: pycparser in ./lib/python3.10/site-packages (from cffi) (2.21)
Building wheels for collected packages: cffi
WARNING: Building wheel for cffi failed: [Errno 30] Read-only file system: '/.cache'
Failed to build cffi
Installing collected packages: cffi
Running setup.py install for cffi ... error
ERROR: Command errored out with exit status 1:
command: /dev/VENV_OPC/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-e4h391of/c
ffi_c80163fa74614519b8e312989864e226/setup.py'"'"'; __file__='"'"'/tmp/pip-install-e4h391of/cffi_c80163fa74614519b8e312989864e226/setup
.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import
setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' in
stall --record /tmp/pip-record-vz8inbc7/install-record.txt --single-version-externally-managed --compile --install-headers /dev/VENV_OP
C/include/site/python3.10/cffi
cwd: /tmp/pip-install-e4h391of/cffi_c80163fa74614519b8e312989864e226/
Complete output (45 lines):
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.libera.chat.)
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-mips-3.10
creating build/lib.linux-mips-3.10/cffi
copying cffi/verifier.py -> build/lib.linux-mips-3.10/cffi
copying cffi/vengine_gen.py -> build/lib.linux-mips-3.10/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-mips-3.10/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-mips-3.10/cffi
copying cffi/recompiler.py -> build/lib.linux-mips-3.10/cffi
copying cffi/pkgconfig.py -> build/lib.linux-mips-3.10/cffi
copying cffi/model.py -> build/lib.linux-mips-3.10/cffi
copying cffi/lock.py -> build/lib.linux-mips-3.10/cffi
copying cffi/ffiplatform.py -> build/lib.linux-mips-3.10/cffi
copying cffi/error.py -> build/lib.linux-mips-3.10/cffi
copying cffi/cparser.py -> build/lib.linux-mips-3.10/cffi
copying cffi/commontypes.py -> build/lib.linux-mips-3.10/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-mips-3.10/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-mips-3.10/cffi
copying cffi/api.py -> build/lib.linux-mips-3.10/cffi
copying cffi/__init__.py -> build/lib.linux-mips-3.10/cffi
copying cffi/_cffi_include.h -> build/lib.linux-mips-3.10/cffi
copying cffi/parse_c_type.h -> build/lib.linux-mips-3.10/cffi
copying cffi/_embedding.h -> build/lib.linux-mips-3.10/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-mips-3.10/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-mips-3.10
creating build/temp.linux-mips-3.10/c
ucfront-gcc mips-linux-musl-20220202-gcc -EL -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -O2 -fstack-protector-strong -
Wl,-z,relro,-z,now -Wl,-z,noexecstack -pipe -fno-common -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DCONFIG_ACCELECON -DEMBED -fPIC
-O2 -fstack-protector-strong -Wl,-z,relro,-z,now -Wl,-z,noexecstack -pipe -fno-common -fno-builtin -Wall -Dlinux -D__linux__ -Dunix -DC
ONFIG_ACCELECON -DEMBED -fPIC -EL -fPIC -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -I/dev/VENV_OPC/include -I/usr/includ
e/python3.10 -c c/_cffi_backend.c -o build/temp.linux-mips-3.10/c/_cffi_backend.o
error: command 'ucfront-gcc' failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: /dev/VENV_OPC/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-e4h391of/cffi_c80163fa74614519b8e312989864e226/setup.py'"'"'; __file__='"'"'/tmp/pip-install-e4h391of/cffi_c8016
3fa74614519b8e312989864e226/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.Str
ingIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(cod
e, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vz8inbc7/install-record.txt --single-version-externally-managed --compi
le --install-headers /dev/VENV_OPC/include/site/python3.10/cffi Check the logs for full command output.
(V

I already use an venv and I think  the main problem is the following line:
"WARNING: Building wheel for cffi failed: [Errno 30] Read-only file system: '/.cache'"
It seems that the other error lines are following errors . 

Also when installing gcc I get " ERROR: Could not find a version that satisfies the requirement gcc7 (from versions: none)
ERROR: No matching distribution found for gcc7")

Do somebody know why the setup wants to create an directory "cache" in the root folder, and how i can solve the problem?

Thanks for responsing on this issue

Armin Rigo

unread,
Nov 2, 2022, 5:24:10 AM11/2/22
to pytho...@googlegroups.com
Hi,

Sorry, no idea. Unless you get a more constructive answer here, I
would recommend posting your question more widely on
https://stackoverflow.com/ .

Armin
Reply all
Reply to author
Forward
0 new messages