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

Samuli Suominen ssuominen at gentoo.org
Sat Mar 1 10:36:59 PST 2014


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



More information about the systemd-devel mailing list