serverlesspub / imagemagick-aws-lambda-2

ImageMagick for AWS Lambda 2 runtimes
https://serverless.pub
Other
259 stars 162 forks source link

Getting shared libs for Wand Python #4

Closed DannyAziz closed 5 years ago

DannyAziz commented 5 years ago

I'm trying to get Wand to use this version of ImageMagick instead of the built-in one that comes with Lambda.

Running make all none of the .so files are anywhere to be found

As well as running ldd convert within the docker container doesn't return the same libs as when running it on my local machine

gojko commented 5 years ago

this script compiles a static version of imagemagick, it does not create shared libs; you probably want to recompile by switching compilation flags here: https://github.com/serverlesspub/imagemagick-aws-lambda-2/blob/master/Makefile_ImageMagick#L20

DannyAziz commented 5 years ago

Doing that, I get this error:

/usr/bin/ld: final link failed: Nonrepresentable section on output

Everything else builds apart from ImageMagick

jkar32 commented 3 years ago

Im leaving this here for the next person as this was a big gotcha.

These binaries do not work for the python wand libraries as it looks for .so files instead of the static .a files

Attaches is how i built the layer, there are a few changes

create-wand-layer.zip

It would be good to note this in the README