Release 8.5.0 - Failed building wheel for cffi
See original GitHub issueContribution guidelines
- I’ve read the contribution guidelines and wholeheartedly agree
I’ve found a bug and checked that …
- … the problem doesn’t occur with the
mkdocsorreadthedocsthemes - … the problem persists when all overrides are removed, i.e.
custom_dir,extra_javascriptandextra_css - … the documentation does not mention anything about my problem
- … there are no open or closed issues that are related to my problem
Description
Our GH Action started to fail when using version 8.5.0 of mkdocs-material. The error appears to be with the package cffi, specifically this is what we are seeing:
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DFFI_BUILDING=1 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
15 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
[end of output]
Expected behaviour
Release 8.5.0 should work
Actual behaviour
Release 8.5.0 is failing when used
Steps to reproduce
Build from a Dockerfile:
ARG PYTHON_VERSION=3.8.1-alpine3.11
FROM python:${PYTHON_VERSION} as builder
ENV PYTHONUNBUFFERED 1
# Set build directory
WORKDIR /wheels
# Copy files necessary
COPY ./requirements.txt .
# Perform build and cleanup artifacts
RUN \
apk add --no-cache \
git \
git-fast-import \
&& apk add --no-cache --virtual .build gcc musl-dev \
&& python -m pip install --upgrade pip \
&& pip install -r requirements.txt \
&& apk del .build gcc musl-dev \
&& rm -rf /usr/local/lib/python3.8/site-packages/mkdocs/themes/*/* \
&& rm -rf /tmp/*
# Set final MkDocs working directory
WORKDIR /docs
# Expose MkDocs development server port
EXPOSE 8000
# Start development server by default
ENTRYPOINT ["mkdocs"]
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
requirements.txt is:
# Direct dependencies
mkdocs>=1.2
Pygments>=2.4
markdown>=3.2
pymdown-extensions>=7.0
mkdocs-material-extensions>=1.0
mkdocs-git-revision-date-localized-plugin>=0.7.3
mkdocs-material>=7.1.8
Package versions
- Python:
3.9 - MkDocs:
mkdocs-1.3.1 - Material:
8.5.0
Configuration
https://docs.k8slens.dev
System information
- Operating system: N/A
- Browser: N/A
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Building wheel for cffi (setup.py) ... error while installing the ...
I am trying to install a new Django project from git, I created a new virtual envt using python3(version ...
Read more >tcod · PyPI
This is a Python cffi port of libtcod. This library is hosted on GitHub. Any issues you have with this module can be...
Read more >error: could not build wheels for pyzmq - You.com | The AI ...
I am running macOS 12.5.1 on a MacBook M1 Pro. Visual Studio Code version 1.71.0. My virtual environment is on Python 3.8.9. What...
Read more >Unable to install packages dependant on cffi on Intel based iMac
Not sure if I'm at the right place but I'm trying to install conan package (C++ dependency manager) which depends on cryptography and...
Read more >EasyBuild v4.6.2 documentation (release 20221021.0)
0 build dependency for bamtofastq, since build fails with Rust 1.52.1 (#15636); avoid that pygmo v2.18.0 installs stuff in Python installation directory +...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Fixed in 5afacad66c0e983535cd51cc5f75a3897162d0d8. I’ve removed
pillowandcairosvgfrom the requirements of Material for MkDocs. If the social plugin is added toplugins, it will check if those libraries are installed, and terminate with an error if they aren’t:It is now the obligation of the user to install the required libraries. This is now also mentioned in the documentation: https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#dependencies
Released as part of 8.5.1.