This work is now done.
The rest of this page is kept only for reference and historical purposes.
ProteanOS currently dynamically links the
opkg executable against a
libopkg.so.1 shared object and provides the latter in a separate
binary package for use by any other applications that might also use libopkg.
In ProteanOS, only the
opkg package depends on
there don't seem to be any other actively maintained applications, at least none
released publicly, that use libopkg.
With only one dependent executable, a library is more space efficient when statically linked into that executable than when built as a shared object and dynamically linked into the executable. The reason is that the library's symbols can be stripped if statically linked into the executable. The symbols in a shared object, on the other hand, are needed at run time to resolve uses of those symbols in the executable to their addresses in the shared object.
Therefore, on a ProteanOS system that uses opkg but doesn't need libopkg for any
other applications, some space can be saved by statically linking libopkg into
opkg executable. There are a couple of ways this can be done.
One option is to simply statically link libopkg into the
opkg executable in
opkg binary package and drop the
packages. This is the simplest option and saves the most space overall in the
package archive, however it doesn't allow any future libopkg-using applications
to be added to ProteanOS.
Another option is to leave the
packages as they are and introduce a new
opkg-static package with an
executable statically linked with
opkg binary package
would continue to depend on
opkg-static would not. This
allows platforms without other libopkg-using applications to use opkg without
libopkg's symbols and allows platforms with other libopkg-using applications
to share libopkg between multiple executables. This however comes at the
expense of slightly increased package archive size (and, more importantly,
slight increases in the sizes of package feed index files cached on ProteanOS
An alternative to the naming of the
opkg-static binary package
names is to use
A compromise between options 1 and 2 is to leave the
libopkg.1-dev binary packages as they are and statically link the
executable in the
opkg package with libopkg, without building an additional
package with an
opkg executable that dynamically links against libopkg. This
means duplicated code and some increase in file system usage on any platforms
that may someday include some other libopkg-using application in the future.
But it also minimizes file system usage on platforms where opkg is the only user
of libopkg, like option 1, and balances package archive size between options 1
and 2 (and has the same package feed index file sizes as option 1).
We'll probably go with option 1 at first. If we add any other libopkg-using
applications in the future, we can switch to option 2 with the
opkg binary package naming scheme, for backwards compatibility.