Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined symbol: __atomic_is_lock_free #510

Open
black8855 opened this issue Jul 26, 2023 · 7 comments
Open

Undefined symbol: __atomic_is_lock_free #510

black8855 opened this issue Jul 26, 2023 · 7 comments
Labels

Comments

@black8855
Copy link

I'm trying to use r2frida natively on Android via Termux, and I'm getting the following error:

ld.lld: error: undefined symbol: __atomic_is_lock_free

referenced by threads_pthread.c:231 (../../../deps/openssl/crypto/threads_pthread.c:231)
crypto_threads_pthread.c.o:(_frida_CRYPTO_atomic_or) in archive ext/frida/libfrida-core.a
referenced by threads_pthread.c:256 (../../../deps/openssl/crypto/threads_pthread.c:256)
crypto_threads_pthread.c.o:(_frida_CRYPTO_atomic_load) in archive ext/frida/libfrida-core.a

ld.lld: error: undefined symbol: __atomic_fetch_or_8

referenced by threads_pthread.c:232 (../../../deps/openssl/crypto/threads_pthread.c:232)
crypto_threads_pthread.c.o:(_frida_CRYPTO_atomic_or) in archive ext/frida/libfrida-core.a

ld.lld: error: undefined symbol: __atomic_load

referenced by threads_pthread.c:257 (../../../deps/openssl/crypto/threads_pthread.c:257)
crypto_threads_pthread.c.o:(_frida_CRYPTO_atomic_load) in archive ext/frida/libfrida-core.a
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:359: src/r2frida-compile] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/.local/share/radare2/r2pm/git/r2frida'
make: *** [Makefile:164: all] Error 2
Build failed
mkdir -p /"/data/data/com.termux/files/home/.local/share/radare2/plugins"
mkdir -p /"/data/data/com.termux/files/home/.local/share/radare2/prefix/bin"
rm -f "//data/data/com.termux/files/home/.local/share/radare2/plugins/io_frida.so"
cp -f io_frida.so* /"/data/data/com.termux/files/home/.local/share/radare2/plugins"
cp: cannot stat 'io_frida.so*': No such file or directory
make: *** [Makefile:320: user-install] Error 1
Install fail

I have Samsung Galaxy Tab3 10.1 with Lineage OS 14.1. It's x86 system.

@trufae
Copy link
Member

trufae commented Jul 27, 2023

Maybe -mno-outline-atomics clang flag can fix this but could be an issue on the frida devkit for android-x86. I dont think anybody tried to build r2f for this target before

@black8855
Copy link
Author

Ok. Thank you. I'll try this.

@black8855
Copy link
Author

This didn't work unfortunately.

@romanovj
Copy link

romanovj commented Jul 30, 2023

@black8855 try
pkg install ndk-sysroot

LDFLAGS="-latomic"

@black8855
Copy link
Author

Thank you.This hasn't help either. Still have the same error.

@trufae
Copy link
Member

trufae commented Nov 27, 2023

looks like an issue in the frida-sdk, did you tried again with the latest code from git because the version has changed since then and im aware Ole fixed some bugs in there

@trufae
Copy link
Member

trufae commented Feb 4, 2024

Can you try again? lot of people is using r2frida on android without these issues

@trufae trufae added the android label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants