Libicuuc.so.66 missing from libicu66

I have a classic snap that stages the package libicu66. But it turns out that the library libicuuc.so.66 of this package is not properly staged.

This then causes an issue when running the snap on different Ubuntu versions. The concrete snap in question is qtcreator-ros which uses the core20 base and amongst others includes libicu66 as a staged package. However, the library libicuuc.so.66 is nowhere to be found in this snap; running find /snap/qtcreator-ros/current/ -name libicuuc.so.66 does not return anything.

The snap happens to work on Ubuntu 20.04 because a local version at /usr/lib/x86_64-linux-gnu/libicuuc.so.66 is used. But this file does not exist on Ubuntu 18.04, since there is only package libicu60 with libicuuc.so.60.

How do I make sure that the package libicu66 is properly stages, such that all of its files are included in the snap?

See also original issue: https://github.com/christianrauch/qtcreator-ros-snap/issues/1

Your “cleanup” part (which is set to run after the part that stages libicu66) overrides the prime stage and runs:

  rm -f -r usr

So that’s probably going to delete the libraries you staged earlier.

Thanks, this was indeed the problem. I thought I copied the libraries from usr to lib but it turns out that I removed all the libraries before copying them.

It would still be useful if snapcraft could tell me at the end that a linked library is not inside the snap :slight_smile: