when I install LLVM, error occurred:
➜ build make
[ 0%] Linking CXX static library ../libLLVMSupport.a
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make[2]: *** [lib/libLLVMSupport.a] Error 1
make[1]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make: *** [all] Error 2
➜ build which libtool
/usr/local/bin/libtool
I have try solve it fllow this, but failed.
http://flummox-engineering.blogspot.com/2014/04/libtool-unrecognized-option-static.html
I solved the problem this way: changed my PATH in ~/.bash_profile
to export PATH="/Library/Developer/CommandLineTools/usr/bin:$PATH"
, opened a new terminal and ran the installation process again.
The libtool
in /Library/Developer/CommandLineTools/usr/bin
did not complain about the -static
flag and everything worked well. You can later remove /Library/Developer/CommandLineTools/usr/bin
from your $PATH
.