-
Notifications
You must be signed in to change notification settings - Fork 14
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
Wrong architecture for binaries downloaded on ARM Macs #129
Comments
We're getting occasional segfaults with task. Reported by colleagues at Webspec:
|
@deviantintegral to retest this. |
I'm not getting segfaults, but I am getting odd hangs in task. It will just completely halt until I kill it. This totally fits in with "not quite reliable emulation", so while it may not be the root cause getting this known issue fixed will at least rule it out. |
Noting here that we think this issue will be resolved, when #172 is completed. |
The problem
On ARM Macs, running
vendor/bin/task test:static
gives the following error under Docker Desktop:Under colima we get a different error:
We can see from the first message that the
x64
version of task is being used, but replacing task didn't fix it. But the colima clarifies something - there's another binary that's the wrong format. Let's identify them:Woah - local-php-security-checker is coming in as a 32-bit executable. This makes a lot more sense. 64-bit x86 is mostly an extension of the 32-bit instruction set, so it makes some sense that one of the environments is able to execute it somewhat. I'm guessing the kernel shipped with Docker Desktop has some level of 32-bit support, while colima has none.
Architecture is determined at https://github.com/Lullabot/drainpipe/blob/main/src/BinaryInstaller.php#L65
On Docker Desktop, there's no architecture:
On colima no architecture is shown at all, causing us to fall to the default case of
386
:Proposed Fix
php_uname('m');
aarch64
being emitted by that in both Docker Desktop and Colima. We need to change or add the architecture check from the currentarm64
.elseif
the check for386
instead of making it a default case.'m'
we can avoid the\PHP_INT_SIZE
check.The text was updated successfully, but these errors were encountered: