-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
Can't install gd extension #896
Comments
I can't replicate this issue |
I just tried again and now I am getting this error:
Is this caused by some sort of issue with my environment? I am on the latest version of Docker as well (Docker Desktop v4.28.0) |
I can reproduce. Started getting something similar with bcmath when i switched from an intel mac to my new M3. Tried your Dockerfile and I get your same error. Maybe and issue in the extensions themselves. |
Hi there, same, im stuck too. It was working some time ago. I managed to find out why, it was due the php8.1.27 version, when reverting back to php8.1.26 it started working again I've got the same issue on Apple silicon and using install-php-extensions ctype intl redis pdo pdo_mysql gd imagick exif mbstring json xml tokenizer xdebug opcache zip Tried to lower the version of install-php-extension and no help :) Version v2.1.84
Version v2.2.3 different error
If i removed gd, not success ;) Using php-8.1.27-cli-alpine image If I remove intl, it crashes on redis... :) |
Same error here. As soon as I add 'gd' some other extension fails. A part of my Dockerfile as example where you can (hopefully) reproduce it too. It worked fine last week so something must have broken latest days.
Removing 'gd' makes everything work again. Error is usually something like this:
|
Update: Probably same as previous mentions, there has been a new php 8.3 release since my last successful build. Will try to lock it to 8.3.3 instead of 8.3.4. Update 2: Yes, pinning it to 8.3.3 makes GD work fine to install again. So we'll have to wait for a fix in either php or gd before updating php version. |
Unfortunately, I need to use php 8.2 for now, otherwise I'd have tried 8.3+. Also worth noting, but this works for me just fine with |
I've been trying to cross compile php images with extensions without the use of this project to wildly inconsistent results. Different extensions giving different errors. I think we may just not be understanding how multiplatform building works. Here is a workaround from this post:
It seems strange to have to explicitly tell docker that I want to use the base image for my target architecture, but i guess we do. EDIT: I think this is less a workaround and more just how we are supposed to do multiplatform builds. |
the issue seems only on arm64 on x64 all seems fine |
So, the issue is not related to FROM --platform=$BUILDPLATFORM php:whatever right? If so, I'd close this issue... |
I will test that when I get home and report back, though I don't believe that will fix the issue (I had tried specifying the |
It works, but I'm unable to build amd64 flavor now and I was unable to seutp buildx that uses the |
I have confirmed that while setting |
What's the error? |
The error I'm getting is:
|
Yeah i get that too. I was definitely wrong about BUILDPLATFORM. It might be TARGETPLATFORM, but i am not convinced of that now either. If we want to demonstrate that this is an issue with install-php-extensions, we need to show:
I can't get 1 working. I think this is a minimal dockerfile: FROM php:8.2-fpm-alpine
RUN apk add --no-cache --virtual \
build-essentials \
zlib-dev \
g++ \
make \
automake \
autoconf \
libpng-dev \
libjpeg-turbo-dev
RUN docker-php-ext-configure gd --enable-gd --with-jpeg
RUN docker-php-ext-install gd @sluther can you build that for amd64? |
Thanks to this comment on a similar issue, I think I have this fixed. It seems that while Rosetta allows us to run amd64 images on our arm64 macs, it is messing up multiplatform building. So turn it off: Dashboard > Settings > General Uncheck Use Rosetta for x86_64/amd64 emulation on Apple Silicon I can now consistently build the amd64 image and run it on my x86 server. |
@mlocati yep. I can confirm the above fix worked for me. I was able to build on my mac and deploy to my amd64 server without any issues. @hcpss-banderson Thanks a ton. Great find! |
@hcpss-banderson wow, I did not expect this, the description makes me think it will work thanks to the option. Thanks for finding this! @mlocati I will test it on Monday, I did not have the time to make it this week. Thanks all! |
My issue is somewhat similar, but the other way around: I am using linux to build an ARM image. I am getting segmentation fault during the installation of libaom. #23 255.6 FAILED: CMakeFiles/aom_av1_encoder_neon_intrinsics.dir/av1/encoder/arm/neon/av1_fwd_txfm2d_neon.c.o
#23 255.6 /usr/bin/cc -I../ -I. -I../apps -I../common -I../examples -I../stats -I../third_party/libyuv/include -O3 -DNDEBUG -std=c99 -Wall -Wdisabled-optimization -Wextra -Wfloat-conversion -Wformat=2 -Wimplicit-function-declaration -Wlogical-op -Wpointer-arith -Wshadow -Wsign-compare -Wtype-limits -Wuninitialized -Wunused -Wvla -Wstack-usage=100000 -Wundef -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -MD -MT CMakeFiles/aom_av1_encoder_neon_intrinsics.dir/av1/encoder/arm/neon/av1_fwd_txfm2d_neon.c.o -MF CMakeFiles/aom_av1_encoder_neon_intrinsics.dir/av1/encoder/arm/neon/av1_fwd_txfm2d_neon.c.o.d -o CMakeFiles/aom_av1_encoder_neon_intrinsics.dir/av1/encoder/arm/neon/av1_fwd_txfm2d_neon.c.o -c ../av1/encoder/arm/neon/av1_fwd_txfm2d_neon.c
#23 255.6 cc: internal compiler error: Segmentation fault signal terminated program cc1 The issue is also reproducible locally: Dockerfile: ARG PHP_EXTENSION_INSTALLER=2.5.2
FROM mlocati/php-extension-installer:${PHP_EXTENSION_INSTALLER} AS php-extensions-installer
FROM php:8.2-apache-bookworm
COPY --from=php-extensions-installer /usr/bin/install-php-extensions /usr/bin/
RUN set -eux; install-php-extensions gd Then build for ARM: docker buildx create --driver=docker-container --name=emu --platform linux/arm64
docker buildx use emu
docker buildx build --pull --platform linux/arm64 . I also tried temporarily updating libaom to version 3.10.0 (also for the ARM environment), as the mentioned bug has already been fixed. That hasn't helped either. |
@debreczeniandras could you check if the changes made by #996 fix your problem? |
@mlocati No, unfortunately the issue still persists in a multi-arch build (with QEMU). I am still investigating and will report back once I found a solution. |
I ended up spinning up an ARM (Gitlab) runner instance next to the AMD and build my images natively. It is the fastest and cleanest solution. Unfortunately the emulation doesn't work for some extensions as expected. |
Version of install-php-extensions
v2.2.2
Error description
I get the following error when trying to build:
This only seems to happen when I build for the linux/amd64 platform (which I need to do, as I'm running docker on an ARM Mac):
docker buildx build --progress=plain --no-cache --platform=linux/amd64 .
Docker image
php:8.2-fpm-alpine
Minimal Dockerfile
The text was updated successfully, but these errors were encountered: