wodby/php

Blackfire doesn't work on Apple Silicon (arm64)

Closed this issue · 3 comments

The image has support for arm64, but Blackfire doesn't work on arm64.

The build for the Blackfire extension uses amd64 and ignores the target platform.

How to reproduce:

$ docker run -it --env PHP_BLACKFIRE=1 wodby/php:7.4 bash
wodby@php.container:/var/www/html $ php -v
[30-Jun-2022 07:32:03 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'blackfire.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20190902/blackfire.so (Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20190902/blackfire.so: unsupported relocation type 7), /usr/local/lib/php/extensions/no-debug-non-zts-20190902/blackfire.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20190902/blackfire.so.so: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'blackfire.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20190902/blackfire.so (Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20190902/blackfire.so: unsupported relocation type 7), /usr/local/lib/php/extensions/no-debug-non-zts-20190902/blackfire.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20190902/blackfire.so.so: No such file or directory)) in Unknown on line 0
PHP 7.4.30 (cli) (built: Jun 10 2022 00:35:32) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies

@csandanov
You did a small typo in your code. You added TARGETARCH, but used TARGETPLATFORM in 8/Dockerfile. Please, review

🤦🏻‍♂️ thanks!

There is still 1 TARGETPLATFORM left on Blackfire on line 269 😉