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

Offen
#128 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
aws, cmake, cpp
Bereich
build-system, cloud

Rechercherichtung

Beginne mit dem verlinkten AWS C++ Lambda runtime-Blogbeitrag und reproduziere den Fehler mit der gemeldeten cmake3-Konfiguration und dem make-Befehl. Verwende die Linker-Ausgabe, um das LTO-Plugin und die Fehler aufgrund fehlender Symbole zu untersuchen; fertig ist die Aufgabe, wenn die hello-Executable erfolgreich gelinkt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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<aws::lambda_runtime::invocation_response (aws::lambda_runtime::invocation_request const&)> 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

Vorherrschende Sprache
C++
Sterne
465
Forks
98
Ø Merge
1 Std. 16 Min.
Gemergte PRs (30 T.)
2

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus awslabs/aws-lambda-cpp

Alle Issues in awslabs/aws-lambda-cpp

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.