Merge ~baconyao/checkbox-iiotg/+git/checkbox-iiotg-classic:fix-shared-library-path into ~baconyao/checkbox-iiotg/+git/checkbox-iiotg-classic:master

Proposed by PeiYao Chang
Status: Superseded
Proposed branch: ~baconyao/checkbox-iiotg/+git/checkbox-iiotg-classic:fix-shared-library-path
Merge into: ~baconyao/checkbox-iiotg/+git/checkbox-iiotg-classic:master
Diff against target: 12 lines (+1/-0)
1 file modified
launchers/wrapper_local (+1/-0)
Reviewer Review Type Date Requested Status
Vic Liu (community) Approve
Doug Jacobs Pending
Review via email: mp+434413@code.launchpad.net

This proposal has been superseded by a proposal from 2022-12-13.

Commit message

Add: Append needed path to LD_LIBRARY_PATH

Some cases are failed because their shared libraries are not found in
the snap shell with classic image. For instance, the command "vainfo"
and "edac-util" encounter this problem.

The proper way to solve this issue is appending the path to the
LDILIBRARY_PATH environment variable.

Description of the change

The test result of va-api and edac test cases on aaeon-tgl 22.04 Desktop (Beta):
https://certification.canonical.com/hardware/202110-29509/submission/292417/test-results/

We won't encounter the following issues in this fix
- edac/detect
  - "edac-util: error while loading shared libraries: libedac.so.1: cannot open shared object file: No such file or directory"

- va-api/va-initialize
  - "vainfo: error while loading shared libraries: libva-x11.so.2: cannot open shared object file: No such file or directory"

To post a comment you must log in.
Revision history for this message
Vic Liu (zongminl) wrote :

@Patrick,
Please also validate on 20.04 desktop image, send an MR to branch series_classic20 if this change is also required, thank you.

Revision history for this message
Vic Liu (zongminl) wrote :

+1, thank you for the fix

review: Approve
Revision history for this message
PeiYao Chang (baconyao) wrote :

The paths of shared library are allocated properly in Focal Desktop image. Therefore, no need to do this patch on series_classic20 branch.

Unmerged commits

3503e9e... by PeiYao Chang

Add: Append needed path to LD_LIBRARY_PATH

Some cases are failed because their shared libraries are not found in
the snap shell with classic image. For instance, the command "vainfo"
and "edac-util" encounter this problem.

The proper way to solve this issue is appending the path to the
LDILIBRARY_PATH environment variable.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/launchers/wrapper_local b/launchers/wrapper_local
2index f34a112..5bfa765 100755
3--- a/launchers/wrapper_local
4+++ b/launchers/wrapper_local
5@@ -34,6 +34,7 @@ export GI_TYPELIB_PATH=$SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/$ARCH/girepo
6 export PATH="$SNAP/usr/sbin:$SNAP/sbin:$SNAP/usr/bin:$SNAP/bin:/snap/bin:$PATH"
7 export ALSA_CONFIG_PATH=$SNAP/usr/share/alsa/alsa.conf:$SNAP/usr/share/alsa/pcm/default.conf
8 export PYTHONPATH="$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH"
9+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/bin:$SNAP/usr/lib:$SNAP/usr/lib/$ARCH"
10
11 if [ -e $RUNTIME/wrapper_common_classic ]; then
12 . $RUNTIME/wrapper_common_classic

Subscribers

People subscribed via source and target branches

to all changes: