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

irony-server-install fail on OS X 10.11 /w XCode 8 #341

Closed
weijiangan opened this issue Oct 25, 2016 · 4 comments
Closed

irony-server-install fail on OS X 10.11 /w XCode 8 #341

weijiangan opened this issue Oct 25, 2016 · 4 comments

Comments

@weijiangan
Copy link

weijiangan commented Oct 25, 2016

-*- mode: compilation; default-directory: "/var/folders/8y/zxw3vpdd5ml7y04qhdjlb_7m0000gn/T/build-irony-server-0.2.0/" -*-
Compilation started at Tue Oct 25 15:49:20

cmake -DCMAKE_INSTALL_PREFIX\=/Users/weijiangan/.emacs.d/irony/ /Users/weijiangan/.emacs.d/elpa/irony-20160925.1030/server && cmake --build . --use-stderr --config Release --target install
-- The C compiler identification is AppleClang 8.0.0.8000038
-- The CXX compiler identification is AppleClang 8.0.0.8000038
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified
-- Performing Test HAS_STDCXX11
-- Performing Test HAS_STDCXX11 - Success
-- Performing Test HAS_CXX11_STDLIB
-- Performing Test HAS_CXX11_STDLIB - Success
-- C++11 compiler option(s): -std=c++11
CMake Error at /opt/local/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find LibClang (missing: LIBCLANG_LIBRARY LIBCLANG_INCLUDE_DIR)
Call Stack (most recent call first):
  /opt/local/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindLibClang.cmake:90 (find_package_handle_standard_args)
  src/CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!
See also "/var/folders/8y/zxw3vpdd5ml7y04qhdjlb_7m0000gn/T/build-irony-server-0.2.0/CMakeFiles/CMakeOutput.log".

Compilation exited abnormally with code 1 at Tue Oct 25 15:49:24

I understand that most people install llvm with brew on macOS with the --with-clang flag, but I checked Xcode and it already comes with libclang. Can I make use of that? It's stored in
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib

@ANDRON94
Copy link

ANDRON94 commented Oct 25, 2016

Maybe it helps You:
"
When libclang is installed in a non-standard location (one that is missing from the path list of the dynamic loader, see ld.so.conf) you can tell CMake to use the rpath when installing the target irony-server. To enable rpath in CMake use the following command:

cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON <args...>

If you're running OS X, you can also use install_name_tool to explicitly tell irony-server where an appropriate version of libclang.dylib lives. For example, Homebrew (with brew install llvm --with-clang) will install a libclang.dylib library at /usr/local/opt/llvm/lib/libclang.dylib; you can instruct irony-server to use this with something like:

install_name_tool -change @rpath/libclang.dylib /usr/local/opt/llvm/lib/libclang.dylib irony-server"

From README.md

@Sarcasm
Copy link
Owner

Sarcasm commented Oct 25, 2016

I understand that most people install llvm with brew on macOS with the --with-clang flag, but I checked Xcode and it already comes with libclang. Can I make use of that?

I think XCode provides libclang.dylib but does provide clang-c/Index.h?

This was discussed from here: #138 (comment) to here #138 (comment)

It's possible things have changed, in this case let me know.

@weijiangan
Copy link
Author

@Sarcasm Thanks for the link I followed the instructions in this comment and it solved my problems #138 (comment)

Perhaps you want to add this to the readme for macOS users? I mean not everybody wants to install a full copy of llvm-clang when it already comes with Xcode, especially when the space llvm-clang requires is not negligible. Thanks!

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 10, 2016

I added this to the wiki:

Feel free to improve.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants