<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
I’m trying to build Opus (git master) for iOS, and it doesn’t build unless I disable the ARM assembly.
<div><br>
</div>
<div>It looks like the problem is that Apple’s assembler doesn’t support all the assembler directives that the GNU assembler does. &nbsp;I suspect this is a combination of the fact that Apple platforms are Mach-O rather than Elf, and just the fact that Apple’s assembler
 is extremely divergent from the mainline GNU one.</div>
<div><br>
</div>
<div>Specifically, if I configure with:</div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">../configure -C CC=&quot;xcrun --sdk iphoneos clang -arch armv7&quot; --build=x86_64-apple-darwin13.1.0 --host=arm-apple-darwin11 --enable-fixed-point</div>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"><span style="font-family: Helvetica; font-size: 12px;">I get:</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"><span style="font-family: Helvetica; font-size: 12px;"><br>
</span></div>
<div style="margin: 0px;">
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">$ make V=1</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">/Applications/Xcode.app/Contents/Developer/usr/bin/make&nbsp; all-recursive</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">depbase=`echo celt/arm/celt_pitch_xcorr_arm-gnu.lo | sed 's|[^/]*$|.deps/&amp;|;s|\.lo$||'`;\</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><span class="Apple-tab-span" style="white-space:pre"></span>/bin/sh ./libtool&nbsp; &nbsp; --mode=compile xcrun --sdk iphoneos clang -arch armv7 -DHAVE_CONFIG_H -I. -I..&nbsp; -I../include -I../celt -I../silk
 -I../silk/float -I../silk/fixed &nbsp; -g -O2 -MT celt/arm/celt_pitch_xcorr_arm-gnu.lo -MD -MP -MF $depbase.Tpo -c -o celt/arm/celt_pitch_xcorr_arm-gnu.lo celt/arm/celt_pitch_xcorr_arm-gnu.S &amp;&amp;\</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><span class="Apple-tab-span" style="white-space:pre"></span>mv -f $depbase.Tpo $depbase.Plo</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">libtool: compile:&nbsp; xcrun --sdk iphoneos clang -arch armv7 -DHAVE_CONFIG_H -I. -I.. -I../include -I../celt -I../silk -I../silk/float -I../silk/fixed -g -O2 -MT celt/arm/celt_pitch_xcorr_arm-gnu.lo
 -MD -MP -MF celt/arm/.deps/celt_pitch_xcorr_arm-gnu.Tpo -c celt/arm/celt_pitch_xcorr_arm-gnu.S&nbsp; -fno-common -DPIC -o celt/arm/.libs/celt_pitch_xcorr_arm-gnu.o</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:30:24:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp; &nbsp; .text; .p2align 2; .arch armv7-a</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:31:4:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;&nbsp; .fpu neon</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;&nbsp; ^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:32:4:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;&nbsp; .object_arch armv4t</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;&nbsp; ^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:47:2:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;.type xcorr_kernel_neon, %function; xcorr_kernel_neon: @ PROC</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:155:2:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;.size xcorr_kernel_neon, .-xcorr_kernel_neon @ ENDP</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:159:2:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;.type celt_pitch_xcorr_neon, %function; celt_pitch_xcorr_neon: @ PROC</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:254:2:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;.size celt_pitch_xcorr_neon, .-celt_pitch_xcorr_neon @ ENDP</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:262:2:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;.type xcorr_kernel_edsp, %function; xcorr_kernel_edsp: @ PROC</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:343:2:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;.size xcorr_kernel_edsp, .-xcorr_kernel_edsp @ ENDP</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:345:2:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;.type celt_pitch_xcorr_edsp, %function; celt_pitch_xcorr_edsp: @ PROC</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:544:2:
</b><span style="color: #c33720"><b>error: </b></span><b>unknown directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp;.size celt_pitch_xcorr_edsp, .-celt_pitch_xcorr_edsp @ ENDP</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp;^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><b>celt/arm/celt_pitch_xcorr_arm-gnu.S:549:23:
</b><span style="color: #c33720"><b>error: </b></span><b>unexpected token in '.section' directive</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">&nbsp; &nbsp; .section .note.GNU-stack,&quot;&quot;,%progbits</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px; color: rgb(52, 189, 38);">
<b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</b></div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">make[2]: *** [celt/arm/celt_pitch_xcorr_arm-gnu.lo] Error 1</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">make[1]: *** [all-recursive] Error 1</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">make: *** [all] Error 2</div>
<div style="font-family: Menlo; font-size: 11px;"><br>
</div>
<div style="font-family: Menlo; font-size: 11px;">
<div style="margin: 0px;"><span style="font-family: Helvetica; font-size: 12px;">If I add&nbsp;</span>--disable-asm<span style="font-family: Helvetica; font-size: 12px;">&nbsp;to the build, it builds correctly.</span></div>
</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><span style="font-family: Helvetica; font-size: 12px;"><br>
</span></div>
<div style="margin: 0px;">Does anyone have experience with Apple assembler directives to know what’s the best way to fix this? &nbsp;I assume the Perl script to generate the assembler file is going to need to be modified somehow.</div>
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;">(Note: if I build from the released opus-1.1, I get all the above errors, and also the UAS errors that were mentioned last month. &nbsp;Those have been fixed in git.)</div>
<div style="font-family: Menlo; font-size: 11px;"><span style="font-family: Helvetica; font-size: 12px;"><br>
</span></div>
</div>
</body>
</html>