Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

libraries under /opt are not detected #12

Closed
bciceron opened this issue Jan 25, 2019 · 3 comments
Closed

libraries under /opt are not detected #12

bciceron opened this issue Jan 25, 2019 · 3 comments

Comments

@bciceron
Copy link

under /opt we put libraries our lambda would require to run .
in the lambda envrionment , we'd had to overwrite the default LD_LIBRARY_PATH to search under the newly library path first : $LAMBDA_TASK_ROOT/lib:$LAMBDA_TASK_ROOT/lib64:$LAMBDA_RUNTIME_DIR:$LAMBDA_RUNTIME_DIR/lib:$LAMBDA_TASK_ROOT:/opt/lib:/lib64:/usr/lib64

when the lambda ran it failed with:

/var/task/main: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /opt/lib/libheif.so.1)

but both were included in our newley created layer with img2lambda:

$ unzip -l lambda-img/layer-1.zip
Archive: lambda-img/layer-1.zip
Length Date Time Name


13762736 01-25-2019 10:47 lib/libMagickCore-7.Q16HDRI.so.6
3155944 01-25-2019 10:47 lib/libMagickWand-7.Q16HDRI.so.6
10996664 01-25-2019 10:47 lib/libde265.so.0
6577608 01-25-2019 10:47 lib/libheif.so.1
178376 01-25-2019 10:47 lib64/ld-linux-x86-64.so.2
2066416 01-25-2019 10:47 lib64/libc.so.6
19208 01-25-2019 10:47 lib64/libdl.so.2
92736 01-25-2019 10:47 lib64/libgcc_s.so.1
187576 01-25-2019 10:47 lib64/libgomp.so.1
281096 01-25-2019 10:47 lib64/libjpeg.so.62
1465520 01-25-2019 10:47 lib64/libm.so.6
149272 01-25-2019 10:47 lib64/libpthread.so.0
1590808 01-25-2019 10:47 lib64/libstdc++.so.6

so is adding libraries under /opt supported ?

@asahasrabuddhe
Copy link
Contributor

Hi @bciceron ,

If you are storing libraries under /opt/lib and /opt/lib64, shouldn't
$LAMBDA_TASK_ROOT/lib:$LAMBDA_TASK_ROOT/lib64:$LAMBDA_RUNTIME_DIR:$LAMBDA_RUNTIME_DIR/lib:$LAMBDA_TASK_ROOT:/opt/lib:/lib64:/usr/lib64
be $LAMBDA_TASK_ROOT/lib:$LAMBDA_TASK_ROOT/lib64:$LAMBDA_RUNTIME_DIR:$LAMBDA_RUNTIME_DIR/lib:$LAMBDA_TASK_ROOT:/opt/lib:/opt/lib64:/lib64:/usr/lib64

Regards,
Ajitem

@bciceron
Copy link
Author

ah ok , thanks for clarifying the mapping.

@pavinthan
Copy link

@bciceron same issue to me also I just build https://github.com/jeylabs/aws-lambda-poppler-layer but poppler libs are in /opt/lib64 I cound not execute it without setting LD_LIBRARY_PATH could your please explain how did you fix it?

// cc @asahasrabuddhe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants