[MacPorts] #42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support ---------------------+------------------------------------ Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: openal-soft pulseaudio ---------------------+------------------------------------ I am working on a program that makes some calls to OpenAL, and I am having it `dlopen()` the `libopenal.dylib` that the openal-soft port provides. When debugging and it hits a function that tries to open a sound device via OpenAL, it prints a message like this: {{{ W: [] caps.c: [1mNormally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.[0m AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse" }}} I cannot find any such message in the code of the program that I am working on, so I must assume that the message is coming from OpenAL. I am not sure why OpenAL is trying to use PulseAudio, as I found no mention of it in the Portfile for openal-soft, and `otool -L` reports no linkages against it... maybe it is being `dlopen()`-ed as well? There was a configure check for pulseaudio in openal-soft's `CMakeLists.txt`, at least... Anyways, back to the error message... I checked pulseaudio's `configure` script for any flags that might be relevant, and noticed that the pulseaudio Portfile added the following to its `configure.args`: {{{ --without-caps }}} Why is this flag necessary? Could it be removed? If so, would that be the right approach to enabling capabilities support in PulseAudio? -- Ticket URL: <https://trac.macports.org/ticket/42986> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by ryandesign@…): Replying to [ticket:42986 egall@…]:
I am not sure why OpenAL is trying to use PulseAudio, as I found no mention of it in the Portfile for openal-soft, and `otool -L` reports no linkages against it... maybe it is being `dlopen()`-ed as well? There was a configure check for pulseaudio in openal-soft's `CMakeLists.txt`, at least...
Yes, I see dlopen() is used in openal-soft-1.15.1/Alc/helpers.c. Apparently I should add a pulseaudio dependency to openal-soft, and one for portaudio as well. Done in r118122.
Anyways, back to the error message... I checked pulseaudio's `configure` script for any flags that might be relevant, and noticed that the pulseaudio Portfile added the following to its `configure.args`: {{{ --without-caps }}} Why is this flag necessary? Could it be removed? If so, would that be the right approach to enabling capabilities support in PulseAudio?
Sounds reasonable. Please try rebuilding pulseaudio without the --without- caps flag and see if that resolves the issue; if so, we can make that change in the portfile. -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by lubodiakov@…): Replying to [comment:1 ryandesign@…]:
Replying to [ticket:42986 egall@…]:
I am not sure why OpenAL is trying to use PulseAudio, as I found no mention of it in the Portfile for openal-soft, and `otool -L` reports no linkages against it... maybe it is being `dlopen()`-ed as well? There was a configure check for pulseaudio in openal-soft's `CMakeLists.txt`, at least...
Yes, I see dlopen() is used in openal-soft-1.15.1/Alc/helpers.c. Apparently I should add a pulseaudio dependency to openal-soft, and one for portaudio as well. Done in r118122.
Adding dependencies for portaudio and pulseaudio has the nasty side effect that with those, something close to 20 other ports, mostly to do with Xorg get pulled in as well. {{{ udo port install openal-soft +universal -portaudio -pulseaudio ---> Computing dependencies for openal-soft ---> Dependencies to be installed: portaudio pulseaudio dbus fftw-3-single fftw-3 glib2 libffi libxml2 gtk3 at-spi2-atk at-spi2-core dbus-glib gobject-introspection cairo fontconfig freetype libpng libpixman xorg-libXext xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb xorg-libpthread-stubs xorg-xcb-proto xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg- xf86bigfontproto xorg-xtrans xorg-xcb-util xrender xorg-renderproto intltool gnome-common p5.16-getopt-long p5.16-pathtools p5.16-scalar-list- utils p5.16-xml-parser xorg-libXevie xorg-evieproto xorg-libXi xorg- libXfixes xorg-fixesproto xorg-libXtst xorg-recordproto xorg-libice xorg- libsm atk dbus-python27 gdk-pixbuf2 jasper jpeg tiff hicolor-icon-theme pango Xft2 harfbuzz graphite2 shared-mime-info xorg-libXcomposite xorg- compositeproto xorg-libXcursor xorg-libXdamage xorg-damageproto xorg- libXinerama xorg-xineramaproto xorg-libXrandr xorg-randrproto json-c libatomic_ops libsamplerate libsndfile flac libogg libvorbis orc speex ---> Configuring portaudio ---> Building portaudio ^C }}} I was trying to build openal-soft ONLY, for use inside OS X, with no (or as few as possible) dependencies on Xorg! I commented out the lines in the portfile for those two dependencies in my local port file, and it builds. Haven't tested if I can link something to the dylib, but it looks good in otool, lipo, etc. so it should. Might I suggest reverting the change, or at least making it mandatory only on newer versions of Mac OS X? 10.5 here, and it works better for me without portaudio or pulseaudio. -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by ryandesign@…): Replying to [comment:1 ryandesign@…]:
Replying to [ticket:42986 egall@…]:
Why is this flag necessary? Could it be removed? If so, would that be the right approach to enabling capabilities support in PulseAudio?
Sounds reasonable. Please try rebuilding pulseaudio without the --without-caps flag and see if that resolves the issue; if so, we can make that change in the portfile.
Eric: were you able to rebuild the port without this flag? If so, did that fix the problem you were experiencing? Or, can you tell me how to reproduce the problem myself? -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by ryandesign@…): Replying to [comment:2 lubodiakov@…]:
Adding dependencies for portaudio and pulseaudio has the nasty side effect that with those, something close to 20 other ports, mostly to do with Xorg get pulled in as well. [[br]] [snip][[br]] I was trying to build openal-soft ONLY, for use inside OS X, with no (or as few as possible) dependencies on Xorg! I commented out the lines in the portfile for those two dependencies in my local port file, and it builds. Haven't tested if I can link something to the dylib, but it looks good in otool, lipo, etc. so it should. Might I suggest reverting the change, or at least making it mandatory only on newer versions of Mac OS X? 10.5 here, and it works better for me without portaudio or pulseaudio.
Lubo: usually we try to make ports as full-featured as possible. We would rather some users install some ports they don't need at the moment, than have other users who need a capability not have it and wonder how to get it. portaudio has no dependencies, so that's not a problem. pulseaudio does depend on gtk3, which depends on lots of ports including several xorg ports. If pulseaudio support is not thought to be essential to openal-soft, it could be made a variant. I would still tend to err on the side of caution and enable it by default, but you could disable it if you wanted to avoid those dependencies and you don't need the functionality they provide. -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by lubodiakov@…): Replying to [comment:4 ryandesign@…]:
Replying to [comment:2 lubodiakov@…]:
Adding dependencies for portaudio and pulseaudio has the nasty side ...cut for the sake of brevity If pulseaudio support is not thought to be essential to openal-soft, it could be made a variant. I would still tend to err on the side of caution and enable it by default, but you could disable it if you wanted to avoid those dependencies and you don't need the functionality they provide.
Again thanks for the response. I do in general agree with the idea that it's better to include some component that might not be absolutely necessary, rather than leaving out something useful, especially if there are variants with and without said dependency. I'll have to look into how to create a variant without pulseaudio since it is what depends on Xorg and submit it so it is available later straight from the repo. Short of making a variant which does not yet exist, is there a way to build openal-soft with no pulseaudio now other than commenting out the local portfile crudely like I did? -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by ryandesign@…): Right now, pulseaudio is an unconditional dependency in the port. -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by egall@…): Replying to [comment:3 ryandesign@…]:
Replying to [comment:1 ryandesign@…]:
Replying to [ticket:42986 egall@…]:
Why is this flag necessary? Could it be removed? If so, would that be the right approach to enabling capabilities support in PulseAudio?
Sounds reasonable. Please try rebuilding pulseaudio without the --without-caps flag and see if that resolves the issue; if so, we can make that change in the portfile.
Eric: were you able to rebuild the port without this flag? If so, did that fix the problem you were experiencing? Or, can you tell me how to reproduce the problem myself?
Right, kind of forgot about this, although coincidentally it actually came up again for me today in a different context; apparently VLC-devel also uses pulseaudio, so it was printing similar warnings in its log messages: {{{ 9/25/14 9:15:04 AM [0x0-0xa76a76].org.videolan.vlc[66585] W: [] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support. }}} Anyways, copying the pulseaudio Portfile over to my local Portfile repo now, and at least making the `s/--without-caps/--with-caps/g` change for testing next... Replying to [comment:4 ryandesign@…]:
If pulseaudio support is not thought to be essential to openal-soft, it could be made a variant.
I think I'd kind of actually prefer this, too. I'd still enable it, but it would be nice to be able to disable it just in case. -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by egall@…): Well, building pulseaudio with the `--with-caps` flag seems to work, and it passes its testsuite with it (after adding a testsuite to the Portfile), but the log message continues to show up... here it is with some more context: {{{ 9/25/14 10:48:32 PM [0x0-0xb5bb5b].org.videolan.vlc[40727] W: [] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support. 9/25/14 10:48:35 PM pulseaudio[40915] [] module.c: module-detect is deprecated: Please use module-udev-detect instead of module-detect! 9/25/14 10:48:35 PM pulseaudio[40915] [] module-detect.c: failed to detect any sound hardware. 9/25/14 10:48:35 PM pulseaudio[40915] [] module.c: Failed to load module "module-detect" (argument: ""): initialization failed. 9/25/14 10:48:35 PM pulseaudio[40915] [] main.c: Module load failed. 9/25/14 10:48:35 PM pulseaudio[40915] [] main.c: Failed to initialize daemon. 9/25/14 10:48:35 PM pulseaudio[40912] [] main.c: Daemon startup failed. 9/25/14 10:48:35 PM [0x0-0xb5bb5b].org.videolan.vlc[40727] [0x101846c60] pulse audio output error: PulseAudio server connection failure: Connection refused }}} I suppose this is kind of an upstream issue for pulseaudio though... -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by lubodiakov@…): Attaching proposed diff from current Portfile, to new one which adds a new variant "no_pulseaudio". Tested locally by me, works. No other changes. -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by ryandesign@…): We don't use variants whose names begin with negative words like "no" anymore. Instead we would have a "pulseaudio" variant and enable it by default, allowing the user to disable it if desired. Simply removing a dependency is also insufficient. You need to ensure that if the user ''does not request'' pulseaudio support in openal-soft (or rather, requests that pulseaudio support not be provided), that pulseaudio support ''is not provided'', ''even if'' the pulseaudio port is already installed. This is typically accomplished via a configure argument, though it can vary by build system. -- Ticket URL: <https://trac.macports.org/ticket/42986#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#42986: openal-soft @1.15.1: complains about pulseaudio (@5.0) not being built with capabilities support -------------------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: openal-soft pulseaudio | -------------------------------------+-------------------------------- Comment (by lubodiakov@…): Replying to [comment:11 ryandesign@…]:
We don't use variants whose names begin with negative words like "no" anymore. Instead we would have a "pulseaudio" variant and enable it by default, allowing the user to disable it if desired. OK, I can make the changes for this to the Portfile. I was just trying to keep the changes minimal, this way changes more of it, but no problem.
Simply removing a dependency is also insufficient. You need to ensure that if the user ''does not request'' pulseaudio support in openal-soft (or rather, requests that pulseaudio support not be provided), that pulseaudio support ''is not provided'', ''even if'' the pulseaudio port is already installed. This is typically accomplished via a configure argument, though it can vary by build system. This will be more difficult, I'm not familiar with the build system, so I have to find what to configure so it leaves pulseaudio out of the build.
-- Ticket URL: <https://trac.macports.org/ticket/42986#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts