[systemd-devel] Can apps ship their own copy of libudev?
Jan Engelhardt
jengelh at inai.de
Thu Oct 24 21:07:53 CEST 2013
On Thursday 2013-10-24 14:15, Koehne Kai wrote:
>
>I'm a developer working on Qt.[...]
>https://bugreports.qt-project.org/browse/QTBUG-34176 [is] one of the
>problems we still have[,] to fix is our libudev.so.0 dependency ...
>That is, we're building the packages on Ubuntu 11.10 and link
>against system libudev.so.0 , while some modern distributions are
>(solely) providing libudev.so.1.
#34176 is an old hat: in general, you must ship all the dependent
libraries with your program package, because your program has been built
against exactly those and there is no guarantee the target system has
any of them, or a particular version. Symlinking does not fix that and
is an error, because symlinks do not make the potentially changed ABI
(which is reflected in the number switch) magically available.
In case of udev, as has already been said in this thread, just
providing it is not enough, which brings us to:
>So, to overcome this we've been thinking about building & shipping
>our own copy of libudev (renamed , or statically linked, to avoid
>clashes) ... Would you expect such a pristine version of libudev,
>compiled on distribution A , to work flawlessly on distribution B?
>What problems would you anticipate?
On the total contrary. To overcome this, you ought to build one
package per distro-version, with Open Build Service being one
possible way to get there. This actually has multiple benefits: you
would no longer need to ship libraries, because you can rely on what
the base system already, as such, you would not even need to worry
about udev any longer either, and third you also make the users happy
because they get a native archive instead of {some unmanaged .run or a
foreign .deb/.rpm that might or might not work}.
More information about the systemd-devel
mailing list