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
Unable Detect Clang Compiler in MacOS #12044
Comments
It seems problem is related to build script, it can not detect compiler is clang.
|
is this r2 from git? are you using sys/install.sh ? otherwise just make a clean clone and do that. you probably have a trashed builddir, you can also git clean -xdf
… On 2 Nov 2018, at 19:32, Sajjad Pourali ***@***.***> wrote:
Hi,
When building librz.a clang has an error, I didn't yet check why it's happened.
$uname -a
Darwin xxx.local 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct 5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64
$clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.2)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
cp -f ../../shlr/spp//config.def.h ../../shlr/spp//config.h
/Library/Developer/CommandLineTools/usr/bin/make spp_build
make[2]: Nothing to be done for `spp_build'.
/Library/Developer/CommandLineTools/usr/bin/make all2
"gcc -dynamiclib -o libr_util.dylib -Wl,-install_name,/opt/local//lib/libr_util.dylib binheap.o mem.o unum.o str.o hex.o file.o range.o tinyrange.o prof.o cache.o sys.o buf.o w32-sys.o ubase64.o base85.o base91.o list.o flist.o mixed.o btree.o chmod.o graph.o event.o regex/regcomp.o regex/regerror.o regex/regexec.o uleb128.o sandbox.o calc.o thread.o thread_sem.o thread_lock.o thread_cond.o strpool.o bitmap.o date.o format.o pie.o print.o ctype.o seven.o slist.o randomart.o zip.o debruijn.o log.o utf8.o utf16.o utf32.o strbuf.o lib.o name.o spaces.o signal.o syscmd.o diff.o bdiff.o stack.o queue.o tree.o des.o idpool.o assert.o punycode.o pkcs7.o x509.o asn1.o astr.o json_indent.o skiplist.o r_json.o rbtree.o qrcode.o trie.o vector.o str_trim.o ascii_table.o ../../shlr/sdb/src/buffer.o ../../shlr/sdb/src/cdb.o ../../shlr/sdb/src/cdb_make.o ../../shlr/sdb/src/ht.o ../../shlr/sdb/src/sdbht.o ../../shlr/sdb/src/json.o ../../shlr/sdb/src/lock.o ../../shlr/sdb/src/ls.o ../../shlr/sdb/src/ns.o ../../shlr/sdb/src/query.o ../../shlr/sdb/src/sdb.o ../../shlr/sdb/src/base64.o ../../shlr/sdb/src/disk.o ../../shlr/sdb/src/dict.o ../../shlr/sdb/src/array.o ../../shlr/sdb/src/fmt.o ../../shlr/sdb/src/match.o ../../shlr/sdb/src/num.o ../../shlr/sdb/src/util.o ../../shlr/sdb/src/journal.o ../../shlr/spp/spp.o -fPIC /opt/radare2/libr/../shlr/zip/librz.a -fvisibility=hidden -lpthread -lm -fvisibility=hidden"
ld: warning: ignoring file /opt/radare2/libr/../shlr/zip/librz.a, file was built for archive which is not the architecture being linked (x86_64): /opt/radare2/libr/../shlr/zip/librz.a
Undefined symbols for architecture x86_64:
"_inflate", referenced from:
_r_inflate in zip.o
(maybe you meant: _r_inflate)
"_inflateEnd", referenced from:
_r_inflate in zip.o
"_inflateInit2_", referenced from:
_r_inflate in zip.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libr_util.dylib] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#12044>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA3-lmQ_qRN9hn4jssJKL-0eXUaaPxa1ks5urI-3gaJpZM4YMCrX>.
|
Yes, I did try with make and sys/install.sh. result of make command : env:
|
Same problem here.
Error report is almost the same:
|
Did you git clean -xdf. Sounds to me like you have upgraded xcode and the builddir have still object files created with the old one |
I think I have done git clean -xdf, but it failed. I also cloned the repo in a new directory, same error occurred. |
I have also seen warnings that are fixed in master.. and cant repro yet.. |
It can be fix by using Please check this topic too : https://stackoverflow.com/questions/52529838/gdb-8-2-cant-recognized-executable-file-on-macos-mojave-10-14#answer-52995622 |
@SajjadPourali A quick question. May I know which place you have edited to make clang work? I tried but failed these days. :( |
I still cant reproduce this issue and i have tested in several machines and environmwnts
… On 7 Nov 2018, at 17:25, izhuer ***@***.***> wrote:
@SajjadPourali A quick question. May I know which place you have edited to make clang work? I tried but failed these days. :(
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Could you please let me know which commit fixed these warnings? This might help me debug about why building failed on my machine. Thanks a lot. |
@ZhangZhuoSJTU : I did attach my changes, it's dirty fix but it works. sorry, I didn't create patch file, because I'm sleepy and capstone needs patch too, it take a little bit time. |
@SajjadPourali and @ZhangZhuoSJTU are you using I solved uninstalling it and just using binutils from Xcode (default). |
@sferrini : Thank you,I did unlink binutils and it works. |
Hi,
When building
librz.a
clang has an error, I didn't yet check why it's happened.The text was updated successfully, but these errors were encountered: