You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I built ffmpeg libraries using ffmpeg-kit https://github.com/tanersener/ffmpeg-kit master version and then added many of the built libraries (including libavutils.so) to my Android app (baresip+). Immediately when I start baresip+ it crashes with error message:
11-13 11:18:09.442 23890 23890 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~VV5up2PFDWp5FVE4Nd4CIA==/com.tutpro.baresip.plus-OoB1CvZdgkOqYxE_nLSsvQ==/base.apk!/lib/arm64-v8a/libavutil.so"...
Everything works fine when I build ffmpeg libaries with ndk version 23.0.7599858.
Environment Details
NDK Version: 23.1.7779620 from Android SDK bundle
Build system: toolchain build with API level 24, Android target architecture arm64-v8a, target aarch64-linux-android, machine architecture armv8-a.
and then added many of the built libraries (including libavutils.so) to my Android app (baresip+)
Without a repro case the only tool we have at our disposal is using readelf on the ffmpeg binaries. If that's not sufficient we probably can't do anything without a repro case.
The crash was gone after I added ndkVersion = '23.1.7779620' to app'd build.gradle. Looks like Android Studio chose an older version of NDK if not explicitly specified.
AGP has a default version it uses that is whatever it was tested with. It will never auto-upgrade you (except when you upgrade AGP) because newer NDKs are not always compatible with older AGPs, and non-reproducible builds are a pain :)
Activity
DanAlbert commentedon Nov 15, 2021
Thanks. Looks like build instructions are in their readme: https://github.com/tanersener/ffmpeg-kit#6-build-scripts
Without a repro case the only tool we have at our disposal is using
readelfon the ffmpeg binaries. If that's not sufficient we probably can't do anything without a repro case.juha-h commentedon Nov 15, 2021
Yes, and I use this command to make the build:
My baresip+ app is open source (https://github.com/juha-h/baresip-studio/tree/video), but is depends on lots of libraries. If it helps, I can create for you an apk of it, where the crash happens at start.
juha-h commentedon Nov 15, 2021
The generated lib where the crash happens is here https://box.tutpro.com/tmp/libavutil.so.
juha-h commentedon Jan 2, 2022
The crash was gone after I added
ndkVersion = '23.1.7779620'to app'dbuild.gradle. Looks like Android Studio chose an older version of NDK if not explicitly specified.DanAlbert commentedon Jan 4, 2022
AGP has a default version it uses that is whatever it was tested with. It will never auto-upgrade you (except when you upgrade AGP) because newer NDKs are not always compatible with older AGPs, and non-reproducible builds are a pain :)