Some ABIs (particularly armeabi) need libatomic to provide some implementations for atomic operations.
The case was arm64 works, armeabi had exception .
dlopen failed, Undefined Reference to __atomic_exchange_4
Solution: Add
-latomic
when linking.The solution not working, since the -latomic already in link flag.
reference to :
https://github.com/android-ndk/ndk/issues/589
Just FYI, we were running into the same issue. In our case it was not enough to add
-latomic
to the linker option, but -latomic
had to be listed as the last option, even after the C++ standard library.So the added -Wl -latomic fix the issue.
No comments:
Post a Comment