patchelf missing snap libdir rpath

Bug #2045895 reported by Michał Sawicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

Building a Flutter app into a classic snap, I found the patchelf machinery isn't consistent:

```
Executing action
Patch ELF file: 'bin/lib/libflutter_linux_gtk.so'
  Current rpath=['$ORIGIN']
  Proposed rpath=['$ORIGIN', '/snap/core22/current/lib/x86_64-linux-gnu']
Patch ELF file: 'bin/lib/libxdg_icons_plugin.so'
  Current rpath=['/root/parts/launcher/build/linux/flutter/ephemeral']
  Proposed rpath=['$ORIGIN', '/snap/core22/current/lib/x86_64-linux-gnu']

Lint warnings:
- classic: bin/lib/libflutter_linux_gtk.so: ELF rpath should be set to '$ORIGIN:$ORIGIN/../../usr/lib/x86_64-linux-gnu:/snap/core22/current/lib/x86_64-linux-gnu'. (https://snapcraft.io/docs/linters-classic)
- classic: bin/lib/libxdg_icons_plugin.so: ELF rpath should be set to '$ORIGIN/../../usr/lib/x86_64-linux-gnu:$ORIGIN:/snap/core22/current/lib/x86_64-linux-gnu'. (https://snapcraft.io/docs/linters-classic)
```

You can see that the "Proposed rpath" is inconsistent with what the linter wants (missing the snap libdir).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.