Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install pyheif on docker container with Ubuntu 18.04 on M1 Mac #47

Open
linaran opened this issue Aug 16, 2021 · 2 comments
Open

Comments

@linaran
Copy link

linaran commented Aug 16, 2021

Hi,

I'm trying to install pyheif over pip on a docker container running Ubuntu 18.04. The docker is hosted on M1 Mac which means the CPU architecture is aarch64/armv8 which apparently isn't compatible with the armv7l or at least pip won't let me use that wheel.

This is effectively Ubuntu 18.04 on armv8. pip probably attempts to build a wheel for my platform but this fails with the following error, indicating incompatible libraries:
Screenshot 2021-08-10 at 09 02 56

I also tried your instructions to build the package from the source but it produced the same error. In the end, I managed to get the thing installed by running your dockerfile steps that manually build the correct versions of the dependencies.

Could we have a wheel for aarch64/armv8?

@linaran
Copy link
Author

linaran commented Aug 16, 2021

I found a workaround using the dockerfile in your repo to build the incompatible libraries inside my container but it's a bit clumsy.

For reference these are the lines I used:

# libde265
RUN set -ex \
    && cd /build-deps \
    && LIBDE265_VERSION="1.0.5" \
    && wget https://github.com/strukturag/libde265/releases/download/v${LIBDE265_VERSION}/libde265-${LIBDE265_VERSION}.tar.gz \
    && tar xvf libde265-${LIBDE265_VERSION}.tar.gz \
    && cd libde265-${LIBDE265_VERSION} \
    && ./autogen.sh \
    && ./configure --prefix /usr \
    && make -j4 \
    && make install \
    && ldconfig

# libheif
RUN set -ex \
    && cd /build-deps \
    && LIBHEIF_VERSION="1.7.0" \
    && wget https://github.com/strukturag/libheif/releases/download/v${LIBHEIF_VERSION}/libheif-${LIBHEIF_VERSION}.tar.gz \
    && tar xvf libheif-${LIBHEIF_VERSION}.tar.gz \
    && cd libheif-${LIBHEIF_VERSION} \
    && ./configure --prefix /usr \
    && make -j4 \
    && make install \
    && ldconfig

# libffi
RUN set -ex \
    && cd /build-deps \
    && LIBFFI_VERSION="3.3" \
    && wget ftp://sourceware.org/pub/libffi/libffi-${LIBFFI_VERSION}.tar.gz \
    && tar xvf libffi-${LIBFFI_VERSION}.tar.gz \
    && cd libffi-${LIBFFI_VERSION} \
    && ./configure --prefix /usr \
    && make -j4 \
    && make install \
    && ldconfig

@ComradeAERGO
Copy link

I found a workaround using the dockerfile in your repo to build the incompatible libraries inside my container but it's a bit clumsy.

For reference these are the lines I used:

# libde265
RUN set -ex \
    && cd /build-deps \
    && LIBDE265_VERSION="1.0.5" \
    && wget https://github.com/strukturag/libde265/releases/download/v${LIBDE265_VERSION}/libde265-${LIBDE265_VERSION}.tar.gz \
    && tar xvf libde265-${LIBDE265_VERSION}.tar.gz \
    && cd libde265-${LIBDE265_VERSION} \
    && ./autogen.sh \
    && ./configure --prefix /usr \
    && make -j4 \
    && make install \
    && ldconfig

# libheif
RUN set -ex \
    && cd /build-deps \
    && LIBHEIF_VERSION="1.7.0" \
    && wget https://github.com/strukturag/libheif/releases/download/v${LIBHEIF_VERSION}/libheif-${LIBHEIF_VERSION}.tar.gz \
    && tar xvf libheif-${LIBHEIF_VERSION}.tar.gz \
    && cd libheif-${LIBHEIF_VERSION} \
    && ./configure --prefix /usr \
    && make -j4 \
    && make install \
    && ldconfig

# libffi
RUN set -ex \
    && cd /build-deps \
    && LIBFFI_VERSION="3.3" \
    && wget ftp://sourceware.org/pub/libffi/libffi-${LIBFFI_VERSION}.tar.gz \
    && tar xvf libffi-${LIBFFI_VERSION}.tar.gz \
    && cd libffi-${LIBFFI_VERSION} \
    && ./configure --prefix /usr \
    && make -j4 \
    && make install \
    && ldconfig

Ran into the same issue. The workaround was effective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants