[opus] Cross-compiling Opus for Android arm64
Kostya Vasilyev
kvasilye at justin.tv
Fri May 26 02:22:30 UTC 2023
Hello,
I'm trying to compile Opus for Android arm64 (and ultimately other arch's)
using the CMakeLists.txt file available in the repository.
My cmake commands are like this:
https://gist.github.com/kvasilye/9004332a5f3f90f2a6e868090d004d7b
This produces an error:
ld: error: undefined symbol: celt_pitch_xcorr_neon
>>> referenced by pitch.c:347 (/home/
ANT.AMAZON.COM/kvasilye/opus/celt/pitch.c:347)
>>> CMakeFiles/opus.dir/celt/pitch.c.o:(pitch_search)
>>> referenced by celt_lpc.c:314 (/home/
ANT.AMAZON.COM/kvasilye/opus/celt/celt_lpc.c:314)
>>> CMakeFiles/opus.dir/celt/celt_lpc.c.o:(_celt_autocorr)
>>> referenced by burg_modified_FIX.c:98 (/home/
ANT.AMAZON.COM/kvasilye/opus/silk/fixed/burg_modified_FIX.c:98)
>>>
CMakeFiles/opus.dir/silk/fixed/burg_modified_FIX.c.o:(silk_burg_modified_c)
>>> referenced 2 more times
Next, I tried to write my own CMakeLists.txt and got stuck too - the
undefined symbol above is defined in celt_pitch_xcorr_arm.s which as I
understand uses ARM assembler syntax.
I converted the file to GNU syntax using the provided Perl script.
Trying to compile the output with aarch64-linux-gnu-as gives a whole bunch
of errors like:
third_party/cmake-build-opus-android-arm64-v8a-Debug/celt_pitch_xcorr_arm_gnu.S:
Assembler messages:
third_party/cmake-build-opus-android-arm64-v8a-Debug/celt_pitch_xcorr_arm_gnu.S:1:
Error: unknown pseudo-op: `.syntax'
third_party/cmake-build-opus-android-arm64-v8a-Debug/celt_pitch_xcorr_arm_gnu.S:2:
Error: junk at end of line, first unrecognized character is `@'
third_party/cmake-build-opus-android-arm64-v8a-Debug/celt_pitch_xcorr_arm_gnu.S:3:
Error: junk at end of line, first unrecognized character is `@'
third_party/cmake-build-opus-android-arm64-v8a-Debug/celt_pitch_xcorr_arm_gnu.S:4:
Error: junk at end of line, first unrecognized character is `@'
third_party/cmake-build-opus-android-arm64-v8a-Debug/celt_pitch_xcorr_arm_gnu.S:5:
Error: junk at end of line, first unrecognized character is `@'
So it looks unhappy with the syntax.
Questions:
1 - What is the right way to compile Opus for Android on arm64-v8a?
2 - If I wanted to compile the asm file, how can I do that?
3 - Is this asm file for both armeabi-v7a and arm64-v8a or just
for armeabi-v7a? The symbol is required for arm64-v8a, but there is a
directive ".arch armv7-a" at the top of the file so I'm confused.
I really don't know anything about arm assembly to figure these out on my
own, any help would be appreciated!
Thanks,
-- K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20230525/b93f8b58/attachment.htm>
More information about the opus
mailing list