aws-lambda-cpp icon indicating copy to clipboard operation
aws-lambda-cpp copied to clipboard

Incorrect location for packager

Open adamb924 opened this issue 3 years ago • 3 comments

I was just doing the demo project described in the README. When executing make aws-lambda-package-demo I got this error.

adam@DESKTOP-UNU2UQJ:~/aws-lambda/build$ sudo make aws-lambda-package-demo
Consolidate compiler generated dependencies of target demo
[100%] Built target demo
make[3]: /home/adam/aws-lambda-cpp/build/packager: No such file or directory
make[3]: *** [CMakeFiles/aws-lambda-package-demo.dir/build.make:70: CMakeFiles/aws-lambda-package-demo] Error 127
make[2]: *** [CMakeFiles/Makefile2:110: CMakeFiles/aws-lambda-package-demo.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:117: CMakeFiles/aws-lambda-package-demo.dir/rule] Error 2
make: *** [Makefile:137: aws-lambda-package-demo] Error 2

I modified line 70 of \home\adam\aws-lambda\build\CMakeFiles\aws-lambda-package-demo.dir\build.make so that it referred to /home/adam/aws-lambda-cpp/packaging/packager rather than /home/adam/aws-lambda-cpp/build/packager. Then it worked.

adamb924 avatar Dec 07 '22 17:12 adamb924

I am also facing build failures after updating to v0.2.8. The problem is in similar location, although the logs on my build server do not show the "No such file or directory" message.

I did a binary chop and it seems the offending commit is https://github.com/awslabs/aws-lambda-cpp/commit/5fb60b9d93c685e15d036889eb992dabe296d0bc, although I do not see how it could affect the path to packager.

kkarbowiak avatar Jan 19 '23 10:01 kkarbowiak

I am also facing build failures after updating to v0.2.8. The problem is in similar location, although the logs on my build server do not show the "No such file or directory" message.

The above can be observed in this actions run.

kkarbowiak avatar Jan 19 '23 12:01 kkarbowiak

@kkarbowiak It turns out GitHub's ubuntu-latest has an rpm package installed (weird!), causing packager to try and run rpm --query --list glibc.$(uname -m), which obviously isn't gonna have any results in an Ubuntu container.

https://github.com/awslabs/aws-lambda-cpp/commit/5fb60b9d93c685e15d036889eb992dabe296d0bc removed what appeared to be a redundant check if [[ $(rpm --query --list glibc.$arch | wc -l) -gt 1 ]];. The reason this broke is because packager contains set -euo pipefail, and the removed check acted as a guard before evaluating the failed command.

bmoffatt avatar Feb 27 '23 04:02 bmoffatt