[systemd-devel] Build only libsystemd as a shared library

Mike Gilbert floppym at gentoo.org
Tue Apr 23 17:20:42 UTC 2019

On Tue, Apr 23, 2019 at 11:51 AM Stanislav Angelovič
<angelovic.s at gmail.com> wrote:
> Hi systemd-ers,
> Having recent systemd sources, how can I build libsystemd.so only?
> I was able to build the static version with this:
> meson build/
> ninja -C build version.h
> ninja -C build libsystemd.a
> But how can I build the shared one? Is there a configuration flag? (I'm not familiar with meson.)

You first need to determine the full soname of the library. You can
figure that out like so:

meson build
readlink build/libsystemd.so.0 # this is a symlink created by meson

Then, pass the full soname to ninja.

ninja -C build libsystemd.so.0.26.0

More information about the systemd-devel mailing list