Re:The bad side of systemd: two recent systemd failures
by vezzy-fnord on Friday December 12, 2014 @10:04AM
(#8740334)
systemd does not support static linking due to its use of NSS. See: http://lists.freedesktop.org/archives/systemd-devel/2014-Mar...
[ Parent
| on HN ]
Re:The bad side of systemd: two recent systemd failures
by ultramancool on Friday December 12, 2014 @10:23AM
(#8740467)
> Only the most trivial libraries actually support it.
... what kind of nonsense is that? Almost every library supports static linking to a basic degree at least. Heck, I statically link giant things like Qt and Boost every day at work.
Re:The bad side of systemd: two recent systemd failures
by vodik on Friday December 12, 2014 @12:45PM
(#8741524)
Well the core of the issue here is you can't really staticly link against a library that depends on dlopen/dlsym (nss system is built around this).
I mean, you could, but now your staticly linked binary still depends on other dlsym'd code. So whats the point?
(Not trying to make an argument that this is good or bad behaviour)
Re:The bad side of systemd: two recent systemd failures
by ultramancool on Friday December 12, 2014 @04:02PM
(#8742665)
I understand, but the question then becomes why your library depends on dlopen and why you don't offer an alternative static method as Qt's "plugins" do. Doesn't seem like good design on the part of the NSS devs to me, and probably a poor choice of library on the part of the systemd devs to me. But maybe I'm missing something.
Re:The bad side of systemd: two recent systemd failures
by the_why_of_y on Saturday December 13, 2014 @05:33AM
(#8744828)
The library that depends on dlopen is glibc.
Re:The bad side of systemd: two recent systemd failures
by ultramancool on Monday December 15, 2014 @09:52AM
(#8752215)
You can statically link glibc, so I'm pretty sure that's not right...
Re:The bad side of systemd: two recent systemd failures
by Mister_Snuggles on Friday December 12, 2014 @11:28AM
(#8740953)
I can see systemd as a whole not supporting static linking. But systemd is a collection of many different binaries that each do their thing, so would it be possible for systemd (the pid 1 executable) to be statically linked while the other supporting executables are dynamically linked?
Re:The bad side of systemd: two recent systemd failures
by cesarb on Friday December 12, 2014 @11:46AM
(#8741086)
The systemd developers try to avoid using NSS on PID 1 (for very good reasons), so NSS wouldn't be a problem for static linking PID 1.
* See for instance https://bugzilla.redhat.com/show_bug.cgi?id=915912#c18
Re:The bad side of systemd: two recent systemd failures
by Mister_Snuggles on Friday December 12, 2014 @04:29PM
(#8742808)
Sounds like it would just need some changes to their build setup to allow the PID 1 piece to be compiled statically, which doesn't seem too bad.
Of course, this may not even solve the root cause of the problem this article talks about. It would make PID 1 a little more resillient though.