On Thu, 2013-01-31 at 13:09 -0500, Dave Reisner wrote:

> http://pkgbuild.com/~dreisner/build.log

So I distilled a few relevant linker lines to compare, but basically the
only difference is -O0 vs -O2, and the gnome-ostree linker lines have
-L/usr/lib before -lgpg-error -ldl -lrt.  Nothing that should matter.

So after your build, can you run this:

readelf -a .libs/libsystemd-journal.so  | grep NEED

Does it show a DT_NEEDED on libsystemd-daemon.so ?   So I just checked
on Fedora 18, and I do indeed see it.  But I don't in gnome-ostree.
This could very well be something going wrong with --as-needed in the
toolchain.

Note that systemd is doing a very weird thing - the dynamic
libsystemd-journal.so links to the noinst libtool library
libsystemd-shared.la which in turn depends on the dynamic
libsystemd-daemon.so.

It's quite possible my libtool version isn't understanding how to
propagate this...I'll debug this a bit more.

You know though, honestly systemd is generating so many executables and
libraries that at this point it'd probably be sane to make
libsystemd-shared...well, shared.

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.  

[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.


>From 33fdd8c52748208d34da8cb0b5db2dbcfc940fc0 Mon Sep 17 00:00:00 2001
From: Colin Walters <walt...@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 <walt...@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

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

Reply via email to