awslabs / awslabs/aws-lambda-cpp

Error "plugin needed to handle lto object" while building CPP runtime for Lambda

未关闭
#128 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
465
派生
98
平均合并
12 小时 47 分钟
30 天内合并 PR
3

描述

Following the blog post "https://aws.amazon.com/blogs/compute/introducing-the-c-lambda-runtime/" to create a custom CPP Lambda function, received an error "/usr/bin/ld: runtime.cpp.o: plugin needed to handle lto object"

Complete error -
[ 50%] Building CXX object CMakeFiles/hello.dir/main.cpp.o
[100%] Linking CXX executable hello
/usr/bin/ld: runtime.cpp.o: plugin needed to handle lto object
CMakeFiles/hello.dir/main.cpp.o: In function `my_handler(aws::lambda_runtime::invocation_request const&)':
main.cpp:(.text+0x3f): undefined reference to `aws::lambda_runtime::invocation_response::success(std::string const&, std::string const&)'
CMakeFiles/hello.dir/main.cpp.o: In function `main':
main.cpp:(.text.startup+0x23): undefined reference to `aws::lambda_runtime::run_handler(std::function const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [hello] Error 1
make[1]: *** [CMakeFiles/hello.dir/all] Error 2
make: *** [all] Error 2

command executed
$ cmake3 .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/out ----> Successful
$ make 3 -----> Errors as above

贡献指南

打开贡献指南

调研方向

Start with the linked AWS C++ Lambda runtime blog post and reproduce the failure using the reported cmake3 configuration and make command. Use the linker output to investigate the LTO plugin and missing-symbol errors; done means the hello executable links successfully.

由索引模型根据 Issue 内容生成。

评估

技术栈
aws, cmake, cpp
领域
build-system, cloud
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。