Open ashu0992sharma opened 4 years ago
Are you trying to set up a lambda function that can build C++ code?
It seems like with g++ -L/opt/gpp3/usr/lib64 -lc_nonshared
it should find /opt/gpp3/usr/lib64/libc_nonshared.a
, because it's -L<dir> -l<namespec>
to find lib<namespec>.a
in <dir>
.
I am trying to add
g++
insideAWS 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
, andlib64
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 thelambda
function, I am trying to run.Using the above
g++
is able to findshared libraries
as well asheader files
but it is not able to find the static library.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.