-
Notifications
You must be signed in to change notification settings - Fork 867
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 static binary and deploy to AWS Lambda (using serverless) #636
Comments
I got the same error as #615 when I tried to build on Windows 10. Then I tried to build on Ubuntu, and I got the same error.. @kahlil29 Do you know if there is any way to get gocv to run on AWS Lambda? |
After trying for a bit, I kind of gave up. Am not allowed (it's not
feasible) to spend more time on this for now (officially, at atleast). But
I'm going to try if and when I have some spare time.
if I can get it to work, I will let you know. Please let me know if you get
it to work or find the solution!
…On Thu, 19 Mar, 2020, 12:12 am EeFey, ***@***.***> wrote:
I got the same error as #615
<#615> when I tried to build on
Windows 10.
Then I tried to build on Ubuntu, and I got the same error..
/var/task/main: error while loading shared libraries:
libopencv_highgui.so.4.2: cannot open shared object file: No such file or
directory
@kahlil29 <https://github.com/kahlil29> Do you know if there is any way
to get gocv to run on AWS Lambda?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#636 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB6CJ3KQ64ODX3RVOSLBSCLRIDXFRANCNFSM4LG46WMQ>
.
|
@EeFey Any luck with this? I'm probably going to have to revisit this problem sometime soon and try to crack it. |
@kahlil29 sadly no, and I have moved on to alternatives... |
|
@deadprogram Do you have any insights/thoughts on this? |
Not entirely sure if this will fix your specific problem but you could try:
|
did anybody try to copy the dynamic libraries (listed by ldd) to the lambda package in the lib/ directory ? |
This is a new PR to address the static build issue on Linux: #802 Windows will be worked on in a subsequent PR. |
Description
I'm trying to compile a static binary and deploy it to an AWS Lambda (using serverless).
Earlier I faced a cross-compile issue because I was trying to build on Mac and run it on Linux (I think the default is Amazon Linux for Lambdas).
So due to that I'm now building it on an EC2 instance (same OS that will be used to run it).
When I run
make
to build/compile, it gives the following warning (which does not seem to be related or relevant to the isssue) :The build command is :
I then run
sls deploy
or run it locally usingsls invoke local -f hello
(hello is currently the name of the function/program)It errors out (in runtime) with the following error :
I encounter the same error in the logs of the deployed Lambda.
Is there anything I need to do in order to properly package the
gocv
dependency? Or is this something to do with shared libs? I took a look at #601 and tried re-building opencv from source by using cmake with the following options:but it does not affect the error(error is still the same).
Your Environment
/tmp
directory ? )env.sh
orenv.cmd
script before trying togo run
orgo build
? NoThe text was updated successfully, but these errors were encountered: