Android NDK 22.x and linking with lld

Hi,

I’m trying to use lld linker in my android project, but build fails with error:

  ld: error: found local symbol '_edata' in global part of symbol table in file /Users/xxx/AndroidStudioProjects/MyApplication/app/src/main/cpp/../../../libs/fmod-android/lib/arm64-v8a/libfmod.so
  ld: error: found local symbol '_end' in global part of symbol table in file /Users/xxx/AndroidStudioProjects/MyApplication/app/src/main/cpp/../../../libs/fmod-android/lib/arm64-v8a/libfmod.so
  ld: error: found local symbol '__bss_start' in global part of symbol table in file /Users/xxx/AndroidStudioProjects/MyApplication/app/src/main/cpp/../../../libs/fmod-android/lib/arm64-v8a/libfmod.so
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.

Any ideas what’s causing these errors?

Thanks,
Aki

Which version of FMOD are you using? The latest version was built with the newer NDK so that should get around the issue, so maybe try again with FMOD version 2.02.02.

FMOD_VERSION 0x00020111
ndkVersion 22.1.7171670

Confirmed that 2.02.02 works. We’ll have to see if we can start using it instead of 2.01…

Good to hear it’s working. You should be able to update the studio project easily enough, the API might be a little more hassle but all of the relevant changes are described in What’s New in 2.02. Let us know if you need any help!