Closed Xplo8E closed 5 months ago
libdl is available via libSystem in the dyldcache on macOS, and it builds fine here. Is your xcode up to date? or maybe you have a different broken compiler installed from brew? Try this
1$ vim a.c
0$ gcc a.c -ldl
0$ cat a.c
int main(void){return 0;}
0$
$ gcc a.c -ldl
$ ./a.out
$ cat a.c
int main(void){return 0;}
it compiled fine.
$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang a.c -ldl
ld: library 'dl' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
but with clang
$ clang a.c -ldl
$ where clang
/usr/bin/clang
$ where gcc
/usr/bin/gcc
this issue was fixed with
export SDKROOT="`xcrun --show-sdk-path`"
Closing because it seems like an issue in your toolchain setup. using gcc/clang builds fine in my macOS.
Thanks for investigating and posting the solution to the issue, that may hopefully help other users if affected.
with
make
with
r2pm -ci r2frida
I tried to install r2frida using both methods in my macos 14.4.1, getting these errors, radare2 up to date, frida up to date.