[systemd-devel] systemd-shutdown static linking (was: Please proof-read: ...)
Ross Lagerwall
rosslagerwall at gmail.com
Sun Jun 9 09:09:55 PDT 2013
On Sun, Jun 09, 2013 at 05:11:19PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
> On Sun, Jun 09, 2013 at 08:52:01AM +0100, Ross Lagerwall wrote:
> > On Sat, Jun 08, 2013 at 05:06:50PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
> > > Maybe mention that systemd-shutdown is statically linked (I know it
> > > can be inferred from the text, but being explicit might be better).
> >
> > At least on Arch, it is still statically linked to libc and udev:
> > $ ldd /usr/lib/systemd/systemd-shutdown
> > linux-vdso.so.1 (0x00007fff80bff000)
> > libudev.so.1 => /usr/lib/libudev.so.1 (0x00007f9a43582000)
> > librt.so.1 => /usr/lib/librt.so.1 (0x00007f9a4337a000)
> > libc.so.6 => /usr/lib/libc.so.6 (0x00007f9a42fcd000)
> > /lib64/ld-linux-x86-64.so.2 (0x00007f9a43794000)
> > libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f9a42dc9000)
> > libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f9a42bad000)
> Stupid me, I typed 'ldd build/systemd-shutdown', saw
> 'not a dynamic executable' and didn't think that ldd
> is looking at a shell script.
>
> > And if I run "pacman -S glibc" and then shutdown:
> > -.mount mount process exited, code=exited status=32
> > -.mount changed unmounting -> mounted
> > Job -.mount/stop finished, result=failed
> > Failed unmounting /.
> >
> > Should it be completely statically linked?
> systemd-shutdown should be using the updated libraries, so this
> shouldn't be an issue. Don't you see this message otherwise?
>
I have just tried it several times in an Arch vm with systemd 204
and it seems fairly reproducible. If I reinstall glibc, it fails
to unmount, if I do not, it unmounts successfully.
It is just a plain single partition root filesystem with ext4.
Any tips for debugging this?
--
Ross Lagerwall
More information about the systemd-devel
mailing list