Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run skopeo on Fedora 30 - libdevmapper.so.1.02.1 dependency #1336

Closed
davidhay1969 opened this issue Jun 25, 2021 · 5 comments
Closed

Comments

@davidhay1969
Copy link
Contributor

This is similar to #333 which related to Fedora 25 and may well be a self-inflicted problem 🤣

Having built skopeo on an Ubuntu 20.04 box, I've shipped the binary to a VM based upon Fedora 30.

However, when I run, say, skopeo --version I see: -

skopeo: error while loading shared libraries: libdevmapper.so.1.02.1: cannot open shared object file: No such file or directory

I do have libdevmapper.so albeit an older version: -

ls -al /usr/lib64/libdev*

lrwxrwxrwx 1 root root     20 Feb 17  2019 /usr/lib64/libdevmapper.so -> libdevmapper.so.1.02
-r-xr-xr-x 1 root root 401232 Feb 17  2019 /usr/lib64/libdevmapper.so.1.02

As per #333 I found that setting DISABLE_CGO=1 made the difference e.g.

DISABLE_CGO=1 make bin/skopeo

resulting in a slightly larger binary: -

ls -al bin/skopeo

-rwxr-xr-x 1 root root 36607904 Jun 25 02:45 bin/skopeo

Having pushed the new, larger version of the binary to the Fedora box, things appear to be A-OK : -

skopeo --version

skopeo version 1.3.1-dev commit: af550fda48c4f0829dc722e937206abf5fddcccb

Background of Fedora box

cat /etc/redhat-release

Fedora release 30 (Thirty)

uname -a

Linux nginx-kata 5.10.25 #1 SMP Fri Jun 11 20:36:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

which skopeo

/usr/local/bin/skopeo
ls -al `which skopeo`
-rwxr-xr-x 1 root root 37580456 Jun 25 09:33 /usr/local/bin/skopeo
@vrothberg
Copy link
Member

Thanks for reaching out!

Copying dynamic binaries across different (versions of different) distributions may not always. Yet I am equally surprised about the error given the library seems to be present. Could you strace to see which path skopeo is looking up?

A word of caution: Fedora 30 ran out of support in 2020-05-26 and is not getting any updates anymore.

@davidhay1969
Copy link
Contributor Author

Thanks @vrothberg very valid point re Fedora 30 - purely for info, we're using that version as part of Kata Containers - it's one of the options for the guest Virtual Machine, aka Pod Sandbox, that Kata spins up when one deploys a K8s pod.

Will get a strace back here shortly ....

@mtrmac
Copy link
Collaborator

mtrmac commented Jun 25, 2021

It seems the soname (shared library dependency) is the full libdevmapper.so.1.02.1 (check with ldd /path/to/skopeo); the soname values are compared as strings, with no major/minor/patch semantics, so just sharing 1.02 isn’t enough.

@davidhay1969
Copy link
Contributor Author

For the record, whilst Kata does "default" to Fedora 30 which, as you rightly say, is EOL: -

image

one can choose a later release e.g. 33 or 34 both of which are stilll in support.

Will test both and report back

Meantime, have raised an issue over in Kata Containers asking whether we should up the default to something supported 😁

@vrothberg
Copy link
Member

It seems the soname (shared library dependency) is the full libdevmapper.so.1.02.1 (check with ldd /path/to/skopeo); the soname values are compared as strings, with no major/minor/patch semantics, so just sharing 1.02 isn’t enough.

Good catch, @mtrmac. Closing the issue.

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

No branches or pull requests

3 participants