Skip to content
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

Build lambda layer for ARM64 architecture #11

Open
alex-vladut opened this issue Jul 30, 2022 · 1 comment
Open

Build lambda layer for ARM64 architecture #11

alex-vladut opened this issue Jul 30, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@alex-vladut
Copy link

Do you have any suggestion on how the Makefile could be updated to build the Lambda Layer for Amazon's ARM64 architecture? I tried changing these lines (as advised on sharp's docs):

- LD_LIBRARY_PATH=$(PREFIX_PATH)/lib npm --prefix "$(ARTIFACTS_DIR)/nodejs/" install sharp@$(SHARP_VERSION)
+ SHARP_IGNORE_GLOBAL_LIBVIPS=1 LD_LIBRARY_PATH=$(PREFIX_PATH)/lib npm --prefix "$(ARTIFACTS_DIR)/nodejs/" install --arch=arm64 --platform=linux sharp@$(SHARP_VERSION)
- ldd $(ARTIFACTS_DIR)/nodejs/node_modules/sharp/build/Release/sharp-linux-x64.node | sed -nE "s/^[^\/\n]*(\/[^ ]+)(.*)/\1/p" | xargs cp -t $(ARTIFACTS_DIR)/lib
+ ldd $(ARTIFACTS_DIR)/nodejs/node_modules/sharp/build/Release/sharp-linux-arm64v8.node | sed -nE "s/^[^\/\n]*(\/[^ ]+)(.*)/\1/p" | xargs cp -t $(ARTIFACTS_DIR)/lib

The ldd command is now returning an error that sharp-linux-arm64v8.node is not a dynamic executable, which I suspect is due to the fact it was build for a different architecture than the one it is currently running on. I would be curious if anyone tried this and if you have any suggestion on how that could be solved. Thanks!

@zoellner
Copy link
Owner

zoellner commented Aug 1, 2022

I'm not using arm64 architecture myself yet, so can't comment on this

@zoellner zoellner added the help wanted Extra attention is needed label Aug 1, 2022
@zoellner zoellner removed the help wanted Extra attention is needed label Oct 29, 2023
@zoellner zoellner self-assigned this Oct 29, 2023
@zoellner zoellner removed their assignment Oct 30, 2023
@zoellner zoellner added the help wanted Extra attention is needed label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants