-
Notifications
You must be signed in to change notification settings - Fork 316
[PHP-wasm] Imagick extension #2383
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
base: trunk
Are you sure you want to change the base?
Conversation
Here's a copy of our previous conversations about compiling Imagick, it looks mostly irrelevant, but I would at least like to preserve the history. from @bgrgicak When I run the imagick.spec.ts test it fails with:
As a next step, I need to better understand how dymanic linking in #60 works. from @mho22 from @bgrgicak Next step, figure out how to compile the .so file so it's valid wasm file. (Could not load dynamic lib: /extensions/imagick.so from @mho22
And maybe /root/emsdk/emsdk_env.sh && \ should be sourced before emconfigure ? Oh ! Maybe imagick should be built in php/Dockerfile using phpize from the main module ? from @bgrgicak I started getting build issue now, so I have something to research. Oh ! Maybe imagick should be built in php/Dockerfile using phpize from the main module ? I'm curious if there's a difference between phpize that we build manually inside the php/Dockerfile from phpize that I install from apt. from @adamziel I'd assume they target different php versions. from @brandonpayton from @bgrgicak When I try to run the test it returns this error:
from @bgrgicak But after changing the approach to building, I'm not getting an imagick.so file as the build result. from @bgrgicak I will continue tomorrow. from @adamziel from @bgrgicak I need to understand why Image Magick isn't able to produce a shared library. from @bgrgicak
from @adamziel from @bgrgicak I could have shared more context. From this line it looks like libm is available#6 34.45 checking for sqrt in -lm... yes. This is the issue I need to address.
from @bgrgicak from @bgrgicak This Emscripte comment suggests that there's a link flag that I need to remove. I will continue working on this tomorrow.
from @bgrgicak from @bgrgicak from @bgrgicak from @bgrgicak
from @mho22 But based on the issue you shared from emscripten, this is maybe related to the --host. from @bgrgicak Yes, I removed the --host and now I have a new error. from @bgrgicak Error
Command that fails
|
@mho22 @adamziel @brandonpayton I moved my work on Imagick over from the private repo and made a few changes to make the build process similar to Xdebug. All of this is experimental, and the code isn't something we should merge, but I wanted to hand over my progress as I won't be able to work on it for a while. The issue description includes the current issue with library loading and a list of TODOs and development instructions. @adamziel I'm reassigning the task and PR to you as you have the best idea about priorities and who could take over the work. |
This is probably related to
|
@bgrgicak Thank you for your amazing work! I'd be happy to contribute to this PR, if it's a priority. |
🚧 WIP
Motivation for the change, related issues
Playground currently doesn't support the Imagick PHP extension.
Implementation details
This PR creates a shared Imagick library, and loads the extension if
withImagick
is set totrue
inPHPLoaderOptions
.TODO
png
andjpeg
Testing Instructions for development
npx nx run php-wasm-compile:imagick:jspi:8.3
npx nx run php-wasm-node:test-jspi-imagick