Sarcasm / irony-mode

A C/C++ minor mode for Emacs powered by libclang
GNU General Public License v3.0
909 stars 99 forks source link

irony-install-server failure on OSx; error in CommandLineParser.h #278

Open CSRaghunandan opened 8 years ago

CSRaghunandan commented 8 years ago

Hi,

I've been unsuccessful in trying to install irony-server. I'm using OSx el capitan, installed clang using "brew install llvm --with-clang. I'm running into the below error when I'm trying to run cmake :-

cmake -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DLIBCLANG_INCLUDE_DIR=/usr/local/Cellar/llvm/3.6.2/include -DLIBCLANG_LIBRARY=/usr/local/Cellar/llvm/3.6.2/lib/libclang.dylib -DCMAKE_INSTALL_PREFIX\=/Users/csraghunandan/.emacs.d/irony/ /Users/csraghunandan/.emacs.d/elpa/irony-20160123.1307/server && cmake --build . --use-stderr --config Release --target install

--build . --use-stderr --config Release --target install
-- Irony package version is '0.2.0-cvs4'
-- Found emacs: /Applications/emacs.app/Contents/MacOS/Emacs
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/Cellar/llvm/3.6.2/lib
[ 14%] Building CXX object src/CMakeFiles/irony-server.dir/support/CommandLineParser.cpp.o
In file included from /Users/csraghunandan/.emacs.d/elpa/irony-20160123.1307/server/src/support/CommandLineParser.cpp:9:
/Users/csraghunandan/.emacs.d/elpa/irony-20160123.1307/server/src/support/CommandLineParser.h:15:10: fatal error:
      'string' file not found
#include <string>
         ^
1 error generated.
make[2]: *** [src/CMakeFiles/irony-server.dir/support/CommandLineParser.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/irony-server.dir/all] Error 2
make: *** [all] Error 2

I tried searching for the error, but no success so far.

Is there any way I could fix this issue ?

coldnew commented 8 years ago

Hi @CSRaghunandan,

You also need to install llvm with libcxx support, I use following command fix this issue.

brew install llvm --with-clang --with-libcxx

ref: https://berezovskiy.me/2015/02/clang-fatal-error-headers-not-found/