<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Can't build PulseAudio with systemd enabled [PATCH]"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=86113">86113</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Can't build PulseAudio with systemd enabled [PATCH]
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>build-system
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mauroguerrera92@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=109222" name="attach_109222" title="patch file">attachment 109222</a> <a href="attachment.cgi?id=109222&action=edit" title="patch file">[details]</a></span>
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]
<a href="http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/daemon/main.c?id=467b4b9bee66257da7ce51c1158f9fe2178daac1">http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/daemon/main.c?id=467b4b9bee66257da7ce51c1158f9fe2178daac1</a>


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          #
 ###################################</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>