[SailfishDevel] SQLite linking

Slava Monich slava.monich at jolla.com
Wed Jan 18 13:29:58 UTC 2017


I believe rpm automatically detects the dependencies, even if they are 
not in the spec. Removing the dependency from the spec might not help. 
There may be some hackish ways of removing a dependency from the rpm 
headers but I don't think that it would be a good idea. Better to spend 
time on hacking something more useful than that.

Another approach is to load the library with dlopen, e.g.

https://github.com/monich/harbour-books/blob/master/app/stubs/libmagic.c

This allows you to get around the harbour limitations and yet in every 
other respect it's as good as linking with the system library. Of course 
by doing so you assume the risk of using the unsupported api. Obviously, 
this kind of trick should only be done to very stable libraries that are 
extremely unlikely to disappear from the system and have a proven track 
record of evolving in a backward compatible manner.

I think the best solution is to add sqlite3 to allowed_libraries.conf 
and submit a pull request:

https://github.com/sailfish-sdk/sdk-harbour-rpmvalidator/blob/master/allowed_libraries.conf

Cheers,

-Slava


>
>     Is the automatic checker not allowing it through with sqlite3 as a
>     requirement? Are you sure that you used the packagename used on
>     jolla systems for the requirement?
>
>
> During deployment as RPM, the specific error is
>
> Requires
>
> ========
>
> ERROR[libsqlite3.so.0] Cannot require shared library: 'libsqlite3.so.0'
>
> INFO[harbour-osmscout-server] Please see our FAQ here: 
> https://harbour.jolla.com/faq#2.6.0 how to use 
> '__provides_exclude_from' and '__requires_exclude' .spec file to avoid 
> that
>
> FAILED
>
>
> earlier versions of this app were published in the store without any 
> issues. Its a part of the app evolution to require sqlite3 for its 
> function, at least for a time being.
>
> I agree that static linking of sqlite3 is not necessary and can be 
> considered as a bloat. Hence my question :)
>
> rinigus
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20170118/0857eb20/attachment-0001.html>


More information about the Devel mailing list