Aws Lambda: C++ custom runtime - /usr/bin/ld: cannot find /usr/lib64/libc_nonshared.a
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- aws, cpp, linux
- 領域
- build-system, cloud
調査の方向性
報告されている execl 呼び出しと /opt/gpp3 配下の AWS Lambda layer のパスから始め、次に linker が layer ディレクトリではなく /usr/lib64 を検索する理由を調査してください。g++48 コマンドを再現し、libc_nonshared.a が /opt/gpp3/usr/lib64 から解決されることを確認してください。Lambda 環境でサンプルのコンパイルが成功すれば、issue は完了です。
索引モデルが issue の本文から書いたものです。
説明
I am trying to add g++ inside AWS Lambda C++ custom runtime.
Now g++ requires .so (shared libraries) files as well as .a (static libraries).
For this, I installed g++ inside chroot directory (directory gpp) on the Amazon Linux machine.
Now, I created another directory that has bin, usr, lib, and lib64 directories (taken from chroot directory). I created a zip of this directory, uploaded to s3 (as it is more than 50MB), and created a Lambda layer using this zip directory.
Now, after adding this layer in the lambda function, I am trying to run.
execl("/opt/usr/bin/g++48", "/opt/usr/bin/g++48", "-Wall", "/tmp/hello.cpp","-o", "/tmp/hello.o",
"-I/opt/gpp3/usr/include/", (char *) 0)
Using the above g++ is able to find shared libraries as well as header files but it is not able to find the static library.
/usr/bin/ld: cannot find /usr/lib64/libc_nonshared.a
collect2: error: ld returned 1 exit status
libc_nonshared.a exists inside /opt/gpp3/usr/lib64/ but it is searching in /usr/lib64/.
I tried providing full path in g++ command as -L/opt/gpp3/usr/lib64/libc_nonshared.a and
-L/opt/gpp3/usr/lib64/libc_nonshared and -L/opt/gpp3/usr/lib64/
But none of them works. Any help is deeply appreciated.
- 主要言語
- C++
- スター
- 465
- フォーク
- 98
- 平均マージ
- 1時間 16分
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
awslabs/aws-lambda-cpp のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
awslabs/aws-lambda-cpp#205 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
awslabs/aws-lambda-cpp#196 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
awslabs/aws-lambda-cpp#195 · コメント 11 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
awslabs/aws-lambda-cpp#194 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
awslabs/aws-lambda-cpp#188 ·
awslabs/aws-lambda-cpp の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
AXERA-TECH/ax-llm#77 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
games-on-whales/wolf#509 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
bug-unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NVIDIA/cuda-samples#453 ·