Core22 and patchelf - Wrong Linter warnings

Related resources:

I am trying to build a snap with core22. The linter seems to complain no matter the result.

hurricane@ubuntudev:~/neovim$ snapcraft --use-lxd
Launching instance...
Executed: update sources for nvim (source changed)
Executed: update sources for nvim-wrapper (source changed)
Executed: skip pull patchelf (already ran)
Executed: update overlay for nvim ('PULL' step changed)
Executed: update overlay for nvim-wrapper ('PULL' step changed)
Executed: skip overlay patchelf (already ran)
Executed: update build for nvim ('PULL' step changed)
Executed: skip pull nvim (already ran)
Executed: skip overlay nvim (already ran)
Executed: skip build nvim (already ran)
Executed: restage nvim (required to build 'nvim-wrapper')
Executed: rebuild nvim-wrapper (stage for part 'nvim' changed)
Executed: rebuild patchelf (stage for part 'nvim' changed)
Executed: skip stage nvim (already ran)
Executed: stage nvim-wrapper
Executed: stage patchelf
Executed: prime nvim
Executed: prime nvim-wrapper
Executed: prime patchelf
Executed parts lifecycle
Generated snap metadata
Lint OK:
- classic: Snap confinement is set to classic.
Lint warnings:
- classic: usr/bin/nvim: ELF interpreter should be set to '/snap/core22/current/lib/ld-linux-aarch64.so.1'.
- library: usr/bin/nvim: missing dependency 'ld-linux-aarch64.so.1'.
Created snap package nvim_v0.9.0-nightly-4-g5e33fec93_arm64.snap
hurricane@ubuntudev:~/neovim$ sudo snap install nvim
nvim                                         nvim_v0.9.0-nightly-4-g5e33fec93_arm64.snap
hurricane@ubuntudev:~/neovim$ sudo snap install nvim_v0.9.0-nightly-4-g5e33fec93_arm64.snap --classic --dangerous
[sudo] password for hurricane:
nvim v0.9.0-nightly-4-g5e33fec93 installed
hurricane@ubuntudev:~/neovim$ readelf -p .interp /snap/nvim/current/usr/bin/nvim

String dump of section '.interp':
  [     0]  /snap/core22/current/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1

Not sure what to check next, any insights would be helpful

I updated my patching function, which did point to the right linker

hurricane@ubuntudev:~/neovim$ readelf -p .interp /snap/nvim/current/usr/bin/nvim

String dump of section '.interp':
  [     0]  /snap/core22/current/lib/ld-linux-aarch64.so.1

But again the linter complains

Generated snap metadata
Lint OK:
- classic: Snap confinement is set to classic.
Lint warnings:
- library: usr/bin/nvim: missing dependency 'ld-linux-aarch64.so.1'.
Created snap package nvim_v0.9.0-nightly-5-ge13dadabb_arm64.snap

The linter shouldn’t be complaining about the dynamic linker and the warning can be safely ignored. This is a bug that has already been addressed and the fix is available in snapcraft in the edge channel (along with auto ELF file patching when build attribute enable-patchelf is specified). I’ll add a hotfix for the stable 7.2 series too.

2 Likes