Composer fails to run on linux-arm64 os
boboldehampsink opened this issue · comments
When running composer on ubuntu 22 with arm64 architecture, I see the following error:
composer install --prefer-dist --no-scripts --no-progress --no-interaction --no-autoloader: #0 0.140 qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
I know that arm64 isn't officially supported, but it would be nice for me to know if anything in this buildpack is arch-specific (and why it is trying to use qemu) - or that it is my OS that is failing me
What Composer? Heroku's builds? That's not a binary; it's run using php
due to the shebang. So you're also using Heroku's PHP, I assume?
Is this in Docker?
You have to use FROM --platform=linux/amd64 …
or Docker will select an ARM64 image.
That could've been clearer, sorry. It has to do with heroku/base-images#227 - I'm trying to create an arm64 version of heroku stack docker images, and so far so good. This error occurs when running php/composer from this buildpack in a docker based on that arm64 heroku file. Any idea why that is? Should PHP be compiled specifically for arm64 perhaps?
Yeah it's all compiled for only x86_64 at the moment.
Yeah thought so, no problem! Just trying to think of a way to make the Docker images perform on M1 macs. Its terrible atm.
Do you maybe have a build script that compiles php the way you do? I could try and run that for ARM to mimic the builds you do.
Dohh, ofcourse you have, and very well documented as well. Apologies.