TipsAndTricks/PackagingNonversionedLibrary

From Yocto Project
Jump to navigationJump to search

How to Package an Unversioned Library

First some background: in general libraries in Linux systems are versioned so that it's possible to have multiple versions of the same library installed, to ease upgrades or support older software. In versioned libraries the actual library binary is for example called libfoo.so.1.2, and then there will be a libfoo.so.1 symbolic link to libfoo.so.1.2, and finally a libfoo.so symbolic link to libfoo.so.1.2. When linking a binary against a library then you typically just tell it the unversioned file name (for example, -lfoo to the linker) but the linker will follow the symbolic links and actually link against the fully-versioned filename. The unversioned symbolic link is only used at development time, so in OpenEmbedded (as with all other Linux distros) gets packaged along with the headers in development package ${PN}-dev.


tl;dr:

SOLIBS = ".so"
FILES_SOLIBSDEV = ""

(TODO: write more)