Bug 86113 - Can't build PulseAudio with systemd enabled [PATCH]
Summary: Can't build PulseAudio with systemd enabled [PATCH]
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: build-system (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-10 14:34 UTC by Mauro Guerrera
Modified: 2014-11-10 18:20 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch file (550 bytes, text/plain)
2014-11-10 14:34 UTC, Mauro Guerrera
Details

Description Mauro Guerrera 2014-11-10 14:34:03 UTC
Created attachment 109222 [details]
patch file

Seems that after commit [1] systemd usage has been added into src/daemon/main.c but there is no link for the corresponding library in the final pulseaudio binary.

The attached patch solves the issue.

Snip of the build problem:
/usr/bin/ld: daemon/pulseaudio-main.o: undefined reference to symbol 'sd_listen_fds@@LIBSYSTEMD_209'
//lib/x86_64-linux-gnu/libsystemd.so.0: error adding symbols: DSO missing from command line

[1] http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/daemon/main.c?id=467b4b9bee66257da7ce51c1158f9fe2178daac1


Patch:

diff --git a/src/Makefile.am b/src/Makefile.am
index a4a66c5..3cab31f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -171,6 +171,11 @@ else
 pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
 endif

+if HAVE_SYSTEMD_DAEMON
+pulseaudio_CFLAGS += $(SYSTEMD_FLAGS) $(SYSTEMDDAEMON_FLAGS)
+pulseaudio_LDFLAGS += $(SYSTEMD_LIBS) $(SYSTEMDDAEMON_LIBS)
+endif
+
 ###################################
 #       Utility programs          #
 ###################################
Comment 1 Mauro Guerrera 2014-11-10 14:49:55 UTC
I added Mr. Colin Guthrie to CC list
Comment 2 Colin Guthrie 2014-11-10 15:11:47 UTC
Indeed, I was fooled by the fact that we still have to overlink PA here due to our build env, so this didn't show up for me.

Looks like a valid fix to me. Are you OK if I use your email address for proper commit attribution, if you don't want your email "leaking" in the commit, I'll just refer to you by name :)
Comment 3 Mauro Guerrera 2014-11-10 15:19:08 UTC
Of course, that's ok to add my email. Thank you :)
Comment 4 Colin Guthrie 2014-11-10 18:20:24 UTC
Should be fixed in 5445d17c3697334c6ad73bc80bc5eb7ec1364445. Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.