Application SDK bash: sdk-deploy-rpm: command not found

I see two issues reported by the validator:

  1. Cannot link to a shared library
  2. Cannot require a shared library

First of all you need to fix issue no. 1. You have two options I think:

1A. Bundle all the disallowed dependencies (libfreetype.so.6, libjpeg.so.62, libopenjp2.so.7, …) with your app and ensure that the libraries that link them have RPATH set so that they can locate them under your app data directory (you do that already). The validator will notice this and stop complaining.

1B. Rebuild the python PIL library in a way that it does not contain these dependencies (assuming that what you wrote before “the python library works fine without the linked libs” applies also in the sense that your app works fine without PIL being able to use those libs).

I would choose 1A. I don’t know how do you build PIL, so depending on that there may be a more clever option, but simply adding BuildRequires for the required libraries and then copying them from system directories in your %install section should work well:

# >> install post
install -t %{buildroot}/%{_datadir}/%{name}/lib/ \
    /usr/lib/libjpeg.so.62 \
    /usr/lib/libopenjp2.so.7 \
    /usr/lib/libtiff.so.5 \
    /usr/lib/libfreetype.so.6 \
    /usr/lib/libwebpdemux.so.2 \
    /usr/lib/libwebpmux.so.3 \
    /usr/lib/libwebp.so.7
# << install post

After that, you can get rid of the – now false – package dependencies by adding this line to your .yaml:

- '__provides_exclude_from;^%{_datadir}/%{name}/lib/.*\\.so\\>'
- '__requires_exclude_from;^%{_datadir}/%{name}/lib/.*\\.so\\>'

PS: sdk-deploy-rpm is not the only package deployed when a device is being added under the IDE. Check that the patterns-sailfish-sdk-client-tools package is installed to be sure that the device works well with the SDK.

1 Like