Bug 80642

Summary: recent file descriptor passing changes broke FreeBSD
Product: PulseAudio Reporter: Allison Lortie (desrt) <desrt>
Component: coreAssignee: David Henningsson <diwic>
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: major    
Priority: medium CC: lantw44, lennart
Version: unspecified   
Hardware: Other   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 75721    
Attachments: creds: define structs even if unsupported
Another Build fix

Description Allison Lortie (desrt) 2014-06-28 17:58:50 UTC
pulse is no longer compiling on FreeBSD because of this commit:

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=cb484805c1343e4cef78e3f83931e71ffa9cb588

In short, we don't HAVE_CREDS on FreeBSD, so 'struct pa_creds' never gets defined (see src/pulsecore/creds.h), but the new code uses it unconditionally.

The fix is either to add support for FreeBSD to creds.h or to guard the newly-added code with #ifdef HAVE_CREDS.
Comment 1 Allison Lortie (desrt) 2014-06-28 18:00:35 UTC
The error is with 'struct pa_ancil' in fact, but it's in the same place...
Comment 2 Allison Lortie (desrt) 2014-06-28 19:34:18 UTC
Created attachment 101933 [details]
creds: define structs even if unsupported

The credentials structures are defined based on basic types with no
special support needed from the OS, so it's possible to define them
even if HAVE_CREDS is not defined.



This patch lets it build, at least, but I'm not sure that it's the best solution.  It seems like most cases where this is used from are accessors which will just return NULL/empty because the structures are not actually filled in.
Comment 3 David Henningsson 2014-07-04 12:57:00 UTC
Thanks for your bug report. As we already have a lot of HAVE_CREDS in the code, I think the more consistent way was to add more of them. :-)

I hope this patch unbreaks your build:

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=2bfedb9f7340ae49e6d83aa2b0fb0529e1a1a462
Comment 4 Allison Lortie (desrt) 2014-07-07 19:09:39 UTC
Hi.  Thanks for the fix.

Unfortunately the build still breaks.  We now fail the build with:

./.libs/libprotocol-native.so: undefined reference to `pa_pstream_send_tagstruct_with_fds'

See the full log here: http://jhbuild.pkgdemon.com/tinderbox/pulseaudio.html  (which is building pulseaudio daily on FreeBSD, btw).
Comment 5 Tanu Kaskinen 2014-07-09 09:07:29 UTC
6.0 blocker.

David is on vacation this and next week, but I hope he'll fix this when he comes back.
Comment 6 David Henningsson 2014-08-29 12:58:28 UTC
Created attachment 105431 [details] [review]
Another Build fix

Sorry for the long delay. Does the attached patch help you resolve the build problem?
Comment 7 Koop Mast 2014-10-21 16:05:14 UTC
I just did a new checkout of pulseaudio with hash 4971dc9ed695256cfb179c5ef4d7bf43d3826ba2 and I can confirm pulseaudio builds out of the box on FreeBSD 11. So no additional patches are required.
Comment 8 Arun Raghavan 2014-10-21 16:06:30 UTC
Thanks for testing. Closing this now.
Comment 9 Ting-Wei Lan 2014-10-26 07:06:51 UTC
(In reply to Koop Mast from comment #7)
> I just did a new checkout of pulseaudio with hash
> 4971dc9ed695256cfb179c5ef4d7bf43d3826ba2 and I can confirm pulseaudio builds
> out of the box on FreeBSD 11. So no additional patches are required.

Although I still cannot get pulseaudio work on FreeBSD 10.1, I find attachment 105431 [details] [review] is still needed to get rid of the following message at run time:

E: [(null)] ltdl-bind-now.c: Failed to open module /home/lantw44/gnome/devinstall/lib/pulse-5.0/modules/module-device-restore.so: /home/lantw44/gnome/devinstall/lib/pulse-5.0/modules/libprotocol-native.so: Undefined symbol "pa_pstream_send_tagstruct_with_fds"
Comment 10 David Henningsson 2014-10-26 07:25:40 UTC
Ok, so I took the liberty of pushing my "another build fix" now.

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=356e13335702508f50b81990c2847742e1a0caae

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.