awslabs / awslabs/aws-lambda-cpp

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

Ouverte
#128 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C++
Étoiles
465
Forks
98
Merge moyen
12 h 47 min
PR mergées (30 j)
3

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par l’article de blog lié sur AWS C++ Lambda runtime et reproduisez l’échec avec la configuration cmake3 et la commande make indiquées. Utilisez la sortie de l’éditeur de liens pour examiner le plugin LTO et les erreurs de symboles manquants ; le travail est terminé lorsque l’exécutable hello est lié avec succès.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
aws, cmake, cpp
Domaine
build-system, cloud
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.