Bug 55733

Summary: Pulseaudio from git (f0432ce6aedca5956f6086824120bb03559e6534) fails to build on OS X
Product: PulseAudio Reporter: Mieszko Ślusarczyk <mieszkoslusarczyk>
Component: build-systemAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: critical    
Priority: medium CC: jeremyhu, lennart
Version: unspecified   
Hardware: x86 (IA32)   
OS: Mac OS X (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 42082    

Description Mieszko Ślusarczyk 2012-10-07 16:16:25 UTC
I've tried to build pulse audio on OS X 10.8.2 with the following configure options:
./autogen.sh --prefix=/Library/Frameworks/PulseAudio.framework/Contents/MacOS --enable-mac-universal --disable-dependency-tracking --disable-jack --disable-glib2 --disable-hal --disable-bluez --disable-dbus --disable-avahi --with-mac-version-min=10.7 --with-mac-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk

I've tried to build  it with both gcc and clang, versions from latest Xcode (4.5);

$ clang -v                                                                                                                                                        
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

$ gcc -v                                                                                                                                                          [18:11:42]
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)


clang output:
CC       libpulsecore_2.98_la-svolume_mmx.lo
pulsecore/svolume_mmx.c:108:43: error: register %rcx is only available in 64-bit mode
        " je 2f                         \n\t"
                                          ^
<inline asm>:5:9: note: instantiated into assembly here
         movd (%rcx, %edi, 4), %mm0      
               ^~~~
pulsecore/svolume_mmx.c:124:43: error: register %rcx is only available in 64-bit mode
        "3:                             \n\t" /* do samples in groups of 2 */
                                          ^
<inline asm>:33:9: note: instantiated into assembly here
         movq (%rcx, %edi, 4), %mm0      
               ^~~~
pulsecore/svolume_mmx.c:137:43: error: register %rcx is only available in 64-bit mode
        "5:                             \n\t" /* do samples in groups of 4 */
                                          ^
<inline asm>:59:9: note: instantiated into assembly here
         movq (%rcx, %edi, 4), %mm0      
               ^~~~
pulsecore/svolume_mmx.c:138:43: error: register %rcx is only available in 64-bit mode
        " movq (%q1, %3, 4), %%mm0      \n\t" /* |  v1h  |  v1l  |  v0h  |  v0l  | */
                                          ^
<inline asm>:60:10: note: instantiated into assembly here
         movq 8(%rcx, %edi, 4), %mm2     
                ^~~~
pulsecore/svolume_mmx.c:181:43: error: register %rcx is only available in 64-bit mode
        " je 2f                         \n\t"
                                          ^
<inline asm>:9:9: note: instantiated into assembly here
         movd (%rcx, %edi, 4), %mm0      
               ^~~~
pulsecore/svolume_mmx.c:199:43: error: register %rcx is only available in 64-bit mode
        "3:                             \n\t" /* do samples in groups of 2 */
                                          ^
<inline asm>:39:9: note: instantiated into assembly here
         movq (%rcx, %edi, 4), %mm0      
               ^~~~
pulsecore/svolume_mmx.c:214:43: error: register %rcx is only available in 64-bit mode
        "5:                             \n\t" /* do samples in groups of 4 */
                                          ^
<inline asm>:73:9: note: instantiated into assembly here
         movq (%rcx, %edi, 4), %mm0      
               ^~~~
pulsecore/svolume_mmx.c:215:43: error: register %rcx is only available in 64-bit mode
        " movq (%q1, %3, 4), %%mm0      \n\t" /* |  v1h  |  v1l  |  v0h  |  v0l  | */
                                          ^
<inline asm>:74:10: note: instantiated into assembly here
         movq 8(%rcx, %edi, 4), %mm2     
                ^~~~
8 errors generated.
make[3]: *** [libpulsecore_2.98_la-svolume_mmx.lo] Error 1
make[2]: *** [install] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2



gcc output:

CC       libpulsecore_2.98_la-svolume_mmx.lo
{standard input}:67:bad register name `%rdx, %edi,4)'
{standard input}:95:bad register name `%rdx, %edi,4)'
{standard input}:121:bad register name `%rdx, %edi,4)'
{standard input}:122:bad register name `%rdx, %edi,4)'
{standard input}:201:bad register name `%rdx, %edi,4)'
{standard input}:231:bad register name `%rdx, %edi,4)'
{standard input}:265:bad register name `%rdx, %edi,4)'
{standard input}:266:bad register name `%rdx, %edi,4)'
lipo: can't open input file: /var/tmp//ccw2a05M.out (No such file or directory)
make[3]: *** [libpulsecore_2.98_la-svolume_mmx.lo] Error 1
make[2]: *** [install] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
Comment 1 Tanu Kaskinen 2012-10-23 10:14:41 UTC
I notified the mailing list about this: http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/14672
Comment 2 Jeremy Huddleston Sequoia 2013-08-05 15:52:48 UTC
It builds fine for x86_64.  It just fails to build i386.
Comment 3 Jeremy Huddleston Sequoia 2013-08-05 16:08:51 UTC
We're just disabling this in i386 as the workaround in MacPorts:

http://trac.macports.org/browser/trunk/dports/audio/pulseaudio/files/no-buggy-i386-asm.patch
Comment 4 GitLab Migration User 2018-07-30 10:36:44 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/528.

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.