Search code examples
androidandroid-ndkopus

Why does building libOpus for Android fail?


When trying to compile a locally checked-out copy of Opus 1.3.1 for Android, I get this cryptic error message:

  CCLD     opus_demo
clang: error: no such file or directory: './.libs/libopus.so'

It seems like the demo project is failing to find Opus as a dynamic library. When I look through the .lib folder, I only find .la files, so this seems like it's looking for the wrong type of library.


Solution

  • This only seems to be an issue when compiling with Android NDK 21.4.7075529. When I upgrade to 22.0.7026061, the issue goes away. Perhaps the version of libtool in 21.4` has an issue with static linkage versus dynamic linkage.