PulseAudio 3.0 #18838

Closed
wants to merge 9 commits into
from

3 participants

@albertz

PulseAudio 3.0 compiles fine with minimal patching. This is the updated formular. PulseAudio works then and has CoreAudio support. To try out, edit /usr/local/etc/pulse/default.pa and change module-detect to module-coreaudio-detect.

Note that the HEAD also almost compiles. The script git-version-info fails because it cannot find the .git dir / git info. When trying that manually, something in the autogen fails - install-sh is missing.

@MikeMcQuaid
Homebrew member

What's the use-case for PulseAudio on OSX?

@albertz

The main standard use-case: Other PulseAudio clients can play audio on your Mac. For example, you want to stream the audio from your Linux system over to your Mac.

In my case, I am playing sound over SSH with PulseAudio.

@mistydemeo

What configurations have you tested on? Pulseaudio was removed in #18199 because it couldn't compile reliably.

@albertz

I have MacOSX 10.8 with Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn). The old PulseAudio 2.1 (from #18199) also compiled and ran for me but I think CoreAudio support is missing there, that is why I tried PulseAudio 3.0.

@mistydemeo mistydemeo commented on an outdated diff Mar 30, 2013
Library/Formula/pulseaudio.rb
+ "--disable-avahi",
+ "--with-udev-rules-dir=#{lib}/udev/rules.d",
+ "--with-mac-sysroot=#{MacOS.sdk_path}",
+ "--with-mac-version-min=#{MacOS.version}"]
+
+ args << '--disable-dbus' unless build.include? 'with-dbus'
+ args << "--disable-nls" if build.head? and not Formula.factory('libtool').installed?
+
+ if build.head? then
+ system "./autogen.sh", *args
+ else
+ system "./configure", *args
+ end
+
+ # remove sconv_neon.c because it wont compile and is not needed.
+ system "echo > src/pulsecore/sconv_neon.c"
@mistydemeo
mistydemeo added a line comment Mar 30, 2013

Have you reported this issue to the developers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mistydemeo

Hm, so it's able to build the semaphore-osx code for you? It uses deprecated functions and failed to build on 10.7.4 for me.

@mistydemeo

Here are the build logs from the failed build: https://gist.github.com/mistydemeo/e6497ac3ee4e3e2cdd1e

@albertz

Not sure if that file is compiling. But I just checked and I have that file in both 10.7 and 10.8 SDK:

find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk | grep Multiprocessing.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Multiprocessing.h
az@Albert-Zeyer-MacBook-Pro ~> 
find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk | grep Multiprocessing.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Developer/Headers/FlatCarbon/Multiprocessing.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Multiprocessing.h

I haven't reported it yet. I wasn't sure if there is maybe some setting wrong with the configure script because that file seems ARM (Neon) related.

@albertz

I made an upstream report about src/pulsecore/sconv_neon.c here.

@albertz

Another related bug report about that modules-coreaudio-detect should be loaded by default on MacOSX is here. Right now, the default config doesn't work out-of-the-box on MacOSX.

@albertz

There is another error in PulseAudio (shm_unlink failed: Permission denied) I sometimes get after a while. It might also be MacOSX related. I reported it here.

@albertz

Another issue is when you try to build the trunk (--HEAD). There is a script git-version-info which tries to determine the Git revision. That doesn't work because Homebrew doesn't include the .git directory in the temporary build directory (maybe there should be a way in the formular to enable this?). I made a bug report with the suggestion to support a fallback in that case.

@mistydemeo

But I just checked and I have that file in both 10.7 and 10.8 SDK:

Multiprocessing.h exists, but is just a pointer to CoreServices/CoreServices.h; including it on its own is deprecated (as is FlatCarbon as a whole). That was actually the case at the time this code was done. The proper include would just be to include CoreServices/CoreServices.h. The OS X semaphore code in PulseAudio hasn't been changed substantially for four years.

At any rate, this formula still doesn't build for me due to the Multiprocessing.h header. I'm surprised it works for you. Do you have an Xcode+CLT install?

@albertz

I have a standard Xcode (4.6.1) installation. Multiprocessing.h is not a pointer for me. It has this content but with the deprecation notice as you said. Probably CoreServices.h would include it indirectly, though (as normally, the main header includes everything else).

I filled an upstream bug report here.

I checked semaphore-*.c and there is also a POSIX pthreads implementation. I wonder why that isn't used instead. Maybe it is already or we can just patch the build to use that one.

@albertz

I pushed another commit which also removes the semaphore-osx.c from the build. It still builds fine for me, so it seems it wasn't used for me.

@albertz

Ok, semaphore-posix.c compiles fine but doesn't work because sem_init is not supported on OSX. I will look at alternatives.

But I also still wonder why the current semaphore-osx.c code doesn't work for you. You say it doesn't find Multiprocessing.h for you although the file exists? So maybe some include path is missing?

@albertz

I have rewritten semaphore-osx.c myself (see here). (I also posted this upstream of course. See the bug report.) I also extended the formular so that it uses this rewritten semaphore-osx.c for now.

@mistydemeo

Multiprocessing.h is not a pointer for me.

Aha, the FlatCarbon one is a pointer to CoreServices.h, while the one in the CarbonCore framework is not. Odd.

Thanks for submitting the bug reports. At this point there are enough issues that I won't pull PulseAudio as is, but can you keep track of the issues and resubmit if/when the PulseAudio devs act on them? Thanks!

@mistydemeo mistydemeo closed this Apr 2, 2013
@ehntoo ehntoo referenced this pull request Aug 29, 2013
Closed

PulseAudio 4.0 #22185

@adammw adammw referenced this pull request Sep 26, 2013
Closed

pulseaudio 4.0 #22846

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.