[systemd-devel] build failures in latest master from d848b9cbfa0ba72381363accce481600169df2eb

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Feb 4 21:40:25 PST 2013


On Thu, Jan 31, 2013 at 07:21:27PM -0500, Colin Walters wrote:
> Using -Wl,--gc-sections helps a lot, but still.  We could just put it in
> a private path like /usr/lib/systemd/libsystemd-shared.so.  
I have been wanting to do something like that for a long while.
I thought it would be much more complicated though, so I left it for later :)

> [a few minutes pass] Something like the attached patch.  But doing it
> against master I'm still running into apparent build race conditions
> where 'make' works, but 'make -j 8' falls over.
Hm, maybe some build-over automatic dependency? I tried a few different
build parallelization settings and it seems to work fine. Looking at the
rules, it should too.

Benchmark (./configure --sysconfdir=/etc --localstatedir=/var --with-sysvinit-path= --with-sysvrcnd-path= CFLAGS='-g -O0 -Wp,-U_FORTIFY_SOURCE' --enable-gtk-doc && make && make install DESTDIR=/var/tmp/inst...):

$ du /var/tmp/inst? -cs
28084		    /var/tmp/inst
16760		    /var/tmp/inst-shared

Biggest changes:
/usr/lib: 19448 -> 11868
/usr/bin: 5968 -> 2224

So this seems like a big win. What are the downsides?

(One I see immediately: libudev links against libsystemd-shared,
people who only compile udev might not like that.)

Zbyszek

> From 33fdd8c52748208d34da8cb0b5db2dbcfc940fc0 Mon Sep 17 00:00:00 2001
> From: Colin Walters <walters at verbum.org>
> Date: Thu, 31 Jan 2013 19:11:46 -0500
> Subject: [PATCH] build-sys: Make libsystemd-shared.so
> 
> Previously it was a noinst libtool library, but the library has grown
> enough that it probably makes sense to share the copies in memory.
> Also, linking this way avoids the case of the dynamic -> static ->
> dynamic dependency chain of:
> libsystemd-journal.so -> libsystemd-shared.la -> libsystemd-daemon.so.
> 
> Signed-off-by: Colin Walters <walters at verbum.org>
> ---
>  Makefile.am |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 88662c0..f3e1d4c 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -107,6 +107,8 @@ UNINSTALL_DATA_HOOKS =
>  DISTCLEAN_LOCAL_HOOKS =
>  pkginclude_HEADERS =
>  noinst_LTLIBRARIES =
> +privlibdir = $(pkglibdir)
> +privlib_LTLIBRARIES =
>  lib_LTLIBRARIES =
>  include_HEADERS =
>  pkgconfiglib_DATA =
> @@ -766,7 +768,7 @@ EXTRA_DIST += \
>  	make-directive-index.py
>  
>  # ------------------------------------------------------------------------------
> -noinst_LTLIBRARIES += \
> +privlib_LTLIBRARIES += \
>  	libsystemd-shared.la
>  
>  libsystemd_shared_la_SOURCES = \
> @@ -844,7 +846,9 @@ libsystemd_shared_la_SOURCES = \
>  	src/shared/calendarspec.h \
>  	src/shared/output-mode.h
>  
> -libsystemd_shared_la_LIBADD = libsystemd-daemon.la
> +libsystemd_shared_la_CFLAGS = $(AM_CFLAGS) -fvisibility=default
> +
> +libsystemd_shared_la_LIBADD = libsystemd-daemon.la libsystemd-id128-internal.la
>  
>  #-------------------------------------------------------------------------------
>  noinst_LTLIBRARIES += \
> -- 
> 1.7.1
> 



More information about the systemd-devel mailing list