aws-samples / aws-lambda-elixir-runtime

Example implementation of a custom runtime for running Elixir on AWS Lambda.
MIT No Attribution
127 stars 32 forks source link

Unusable Erlang runtime system error on sample app #3

Closed kyleaa closed 5 years ago

kyleaa commented 5 years ago

Attempting to deploy the sample app results in an Unusable Erlang runtime system error. Is there a specific version of erlang that this needs to compiled with?

START RequestId: f6d966d2-4ccc-4335-8346-31b29c1cb4b4 Version: $LATEST
++ dirname /var/task/bootstrap
+ BASE=/var/task
+ EXE=/var/task/bin/hello_world
+ HOME=/tmp
+ export HOME
+ export RELEASE_READ_ONLY=true
+ RELEASE_READ_ONLY=true
+ export LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv
+ LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv
+ /var/task/bin/hello_world foreground
/var/task/erts-10.2.1/bin/erl: line 13: /var/task/erts-10.2.1/bin/erlexec: cannot execute binary file
/var/task/erts-10.2.1/bin/erl: line 13: /var/task/erts-10.2.1/bin/erlexec: Success
Unusable Erlang runtime system! This is likely due to being compiled for another system than the host is running
END RequestId: f6d966d2-4ccc-4335-8346-31b29c1cb4b4
REPORT RequestId: f6d966d2-4ccc-4335-8346-31b29c1cb4b4  Duration: 666.95 ms Billed Duration: 700 ms     Memory Size: 128 MB Max Memory Used: 15 MB  
RequestId: f6d966d2-4ccc-4335-8346-31b29c1cb4b4 Error: Runtime exited with error: exit status 1
Runtime.ExitError
kyleaa commented 5 years ago

Got it working by compiling on Amazon Linux.

chrisortman commented 5 years ago

@kyleaa Do you have to setup an ec2 instance to compile for amazon linux or is there a flag of some sorts you can pass?

kyleaa commented 5 years ago

I compiled it on an EC2 running amazon linux and it worked.