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

2014-03-02 Thread Samuli Suominen

On 01/03/14 22:07, Lennart Poettering wrote:
 On Sat, 01.03.14 20:36, Samuli Suominen (ssuomi...@gentoo.org) wrote:

 On 01/03/14 20:11, Lennart Poettering wrote:
 On Sat, 01.03.14 17:46, Ȳ�翵 (j-zero.hw...@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


Well, believe it or not, there are people using udev with alternate
service managers
like runit or openrc with a crypted / and a sep. /usr, without initramfs
And such an setup takes quite a knowledge to setup, so the same people
capable
of doing that, are well aware of the pitfall of mandatory recompile of
the static
binaries in case of an upgrade
I've talked about this with cryptsetup upstream ever since the
configure.ac snippet
was added to systemd, and even cryptsetup upstream *wants* to support such
configuration and sees no reason to remove the support for it
As in, their configure.ac is specifically designed to support building
--enable-static-binaries,
or similar
Same goes for LVM2
Ie. their configure.ac's have calls to `pkg-config --static --libs
libudev $any other package required`
and result ends up in vars like CRYPTSETUP_STATIC_LIBS= or LVM2_STATIC_LIBS=

So, if it's possible, even with some hackery, someone will for sure do it :)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-02 Thread Lennart Poettering
On Sun, 02.03.14 12:05, Samuli Suominen (ssuomi...@gentoo.org) wrote:

  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
 
 
 Well, believe it or not, there are people using udev with alternate
 service managers
 like runit or openrc with a crypted / and a sep. /usr, without initramfs
 And such an setup takes quite a knowledge to setup, so the same people
 capable
 of doing that, are well aware of the pitfall of mandatory recompile of
 the static
 binaries in case of an upgrade
 I've talked about this with cryptsetup upstream ever since the
 configure.ac snippet
 was added to systemd, and even cryptsetup upstream *wants* to support such
 configuration and sees no reason to remove the support for it
 As in, their configure.ac is specifically designed to support building
 --enable-static-binaries,
 or similar
 Same goes for LVM2
 Ie. their configure.ac's have calls to `pkg-config --static --libs
 libudev $any other package required`
 and result ends up in vars like CRYPTSETUP_STATIC_LIBS= or LVM2_STATIC_LIBS=
 
 So, if it's possible, even with some hackery, someone will for sure do it :)

Well, if the answer to why would you do that is simply because we
can, then I really don't see why we should bother supporting something
like that. It's so pointless...

But anyway, this is Free Software, so you are welcome to do with it
whatever you want, just know that we think this is really non-sensical
and don't expect us to support this upstream.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-01 Thread David Timothy Strauss
On Sat, Mar 1, 2014 at 12:46 AM, 황재영 j-zero.hw...@samsung.com wrote:
 I've tried to build systemd(v43) with statically linking.

That version is ancient. I'm afraid you won't find much help with it
here. Have you tried a newer release?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-01 Thread Cristian Rodríguez

El 01/03/14 05:46, 황재영 escribió:

Hello,

I've tried to build systemd(v43) with statically linking.

I revised Makefile.am and spec file but it was not built statically.


Do not use static linking, it won't work. also systemd 43 is an ancient 
relic.



___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-01 Thread Lennart Poettering
On Sat, 01.03.14 17:46, Ȳ�翵 (j-zero.hw...@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.

The systemd tree makes use of NSS and even includes an NSS module. That
kind of stuff is inherently dynamic in nature, and can never be done
statically. Hence we simply do not support that. Only the most trivial
libraries actually support it.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-01 Thread Samuli Suominen

On 01/03/14 20:11, Lennart Poettering wrote:
 On Sat, 01.03.14 17:46, Ȳ�翵 (j-zero.hw...@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

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-01 Thread Lennart Poettering
On Sat, 01.03.14 20:36, Samuli Suominen (ssuomi...@gentoo.org) wrote:

 
 On 01/03/14 20:11, Lennart Poettering wrote:
  On Sat, 01.03.14 17:46, Ȳ�翵 (j-zero.hw...@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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2014-03-01 Thread Cristian Rodríguez

El 01/03/14 15:36, Samuli Suominen escribió:


which is a prerequisite for
building static lvm2/cryptsetup binaries


Just wondering.. why would want to do that ?

It is going to break sooner or later.. maybe even worst, it may only 
appear to work..


Any program remotely useful needs a shared libc around, most components 
in the boot sequence do, systemd included. this also applies to the old 
sysvinit stuff. (sed, grep, bash, coreutils too..)




___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel