[systemd-devel] How to build systemd with statically linking

Lennart Poettering lennart at poettering.net
Sat Mar 1 12:07:35 PST 2014


On Sat, 01.03.14 20:36, Samuli Suominen (ssuominen at gentoo.org) wrote:

> 
> On 01/03/14 20:11, Lennart Poettering wrote:
> > On Sat, 01.03.14 17:46, Ȳ�翵 (j-zero.hwang at samsung.com) wrote:
> >
> >> Hello,
> >>
> >> I've tried to build systemd(v43) with statically linking.
> >>
> >> I revised Makefile.am and spec file but it was not built statically.
> > We do not support static linking. We probably should turn this off
> > entirely in the build system if there is a way, to make sure people get
> > a clean error.
> 
> configure.ac already has:
> 
> AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static
> is not supported by systemd])])
> 
> as the user was trying to build version 43, that'd explain why he didn't
> see it, as that snippet wasn't added
> at that time yet.
> in any case, please don't make the building of libudev.a any more harder
> than it is now, i know it has it's
> pitfalls, and it shouldn't be officially supported in any way, but if
> you know what you are doing, you can,
> by removing this snippet from configure.ac, get a semi-working libudev.a
> which is a prerequisite for
> building static lvm2/cryptsetup binaries

Why would you do something like that? That's just broken.

Also the API between udevd and libudev is not stable, you should never
mix different implementations.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list