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-install server failure #135

Closed
chester755 opened this issue Nov 12, 2014 · 31 comments
Closed

Irony-install server failure #135

chester755 opened this issue Nov 12, 2014 · 31 comments

Comments

@chester755
Copy link

 1-*- mode: compilation; default-directory: "~/.emacs.d/irony/build/" -*-
 2Compilation started at Wed Nov 12 11:46:21
 3
 4cmake -DCMAKE_INSTALL_PREFIX\=/Users/Chester/.emacs.d/irony/ /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server && cmake --build . --use-stderr --config Release --target i\
  nstall
 5-- Detecting libclang builtin headers directory
 6-- Detecting libclang builtin headers directory -- fail
 7CMake Warning at cmake/CheckLibClangBuiltinHeadersDir.cmake:87 (message):
 8  CheckLibClangBuiltinHeadersDir: unsupported configuration, please report.
 9
10
11
12    Check with args: -isystem;"/usr/local/Cellar/llvm/3.5.0/lib/clang/3.5.0/include";/Users/Chester/.emacs.d/irony/build/CMakeFiles/CMakeTmp/check-libclang-stddef.cpp
13    Check output:
14      dyld: Library not loaded: @rpath/libLLVM-3.5.dylib
15    Referenced from: /usr/local/opt/llvm/lib/libclang.dylib
16    Reason: image not found
17
18  SIGTRAP
19
20Call Stack (most recent call first):
21  src/CMakeLists.txt:8 (check_libclang_builtin_headers_dir)
22
23
24-- Irony package version is '0.1.2'
25-- Found emacs: /Applications/emacs.app/Contents/MacOS/Emacs
26-- Configuring done
27-- Generating done
28-- Build files have been written to: /Users/Chester/.emacs.d/irony/build
29[100%] Built target irony-server
30Install the project...
31-- Install configuration: "Release"
32-- Up-to-date: /Users/Chester/.emacs.d/irony/bin/irony-server
33
34Compilation finished at Wed Nov 12 11:46:21

Here is the error messages i have when I tried to irony-in stall-server.
I am currently using Mac OS v10.9.5, with cmake version 3.0.0 and LLVM built from brew.

Thanks
Chester

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 12, 2014

That is not an error but a (scary?) warning.

It looks like libclang.dylib may not be in your path (ld.so.conf on Linux, on Mac OS X I have no idea).
Can you run ~/.emacs.d/irony/bin/irony-server --version to see if you have an error related to rpath when it runs?

If you have such error you can try to build reinstall irony-server with this additional flags: cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON <...>

@chester755
Copy link
Author

~/.emacs.d/irony/bin/irony-server --version
dyld: Library not loaded: @rpath/libLLVM-3.5.dylib
  Referenced from: /usr/local/opt/llvm/lib/libclang.dylib
  Reason: image not found
Trace/BPT trap: 5

@chester755
Copy link
Author

I tried to add this addtional line to it by

-*- mode: compilation; default-directory: "~/.emacs.d/irony/build/" 
Compilation started at Wed Nov 12 12:39:11

cmake -DCMAKE_INSTALL_PREFIX\=/Users/Chester/.emacs.d/irony/ /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server && cmake --build . --use-stderr --config Release --target in\
 stall make -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON </usr/local/opt/llvm/lib/libclang.dylib>
/bin/bash: -c: line 0: syntax error near unexpected token `newline'
/bin/bash: -c: line 0: `cmake -DCMAKE_INSTALL_PREFIX\=/Users/Chester/.emacs.d/irony/ /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server && cmake --build . --use-stderr --co\
 nfig Release --target install make -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON </usr/local/opt/llvm/lib/libclang.dylib>'

Compilation exited abnormally with code 2 at Wed Nov 12 12:39:11

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 12, 2014

A similar issue regarding the @rpath with brew has been brought up here: #88 (comment)

Maybe it's time to ask the brew guys?

Regarding your command, you didn't add the argument at the right place.

Try the following command in the irony-install-server prompt:

cmake -DCMAKE_INSTALL_PREFIX\=/Users/Chester/.emacs.d/irony/  -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server && cmake --build . --use-stderr --config Release --target install

@sevki: did you ever managed to get irony-server working with homebrew?

@chester755
Copy link
Author

Thanks I don't think it's working at this moment, followed by your line I have:

 1-*- mode: compilation; default-directory: "~/.emacs.d/irony/build/" -*-
 2Compilation started at Wed Nov 12 12:53:21
 3
 4cmake -DCMAKE_INSTALL_PREFIX\=/Users/Chester/.emacs.d/irony/  -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server && cmake --build . --use-stderr --config Release --target install
 5-- The C compiler identification is AppleClang 6.0.0.6000054
 6-- The CXX compiler identification is AppleClang 6.0.0.6000054
 7-- Check for working C compiler: /usr/bin/cc
 8-- Check for working C compiler: /usr/bin/cc -- works
 9-- Detecting C compiler ABI info
10-- Detecting C compiler ABI info - done
11-- Check for working CXX compiler: /usr/bin/c++
12-- Check for working CXX compiler: /usr/bin/c++ -- works
13-- Detecting CXX compiler ABI info
14-- Detecting CXX compiler ABI info - done
15-- Setting build type to 'Release' as none was specified
16-- Performing Test HAS_STDCXX11
17-- Performing Test HAS_STDCXX11 - Success
18-- Performing Test HAS_CXX11_STDLIB
19-- Performing Test HAS_CXX11_STDLIB - Success
20-- C++11 compiler option(s): -std=c++11
21-- Found LibClang: /usr/local/Cellar/llvm/3.5.0/lib/libclang.dylib
22-- Detecting libclang builtin headers directory
23-- Detecting libclang builtin headers directory -- fail
24CMake Warning at cmake/CheckLibClangBuiltinHeadersDir.cmake:87 (message):
25  CheckLibClangBuiltinHeadersDir: unsupported configuration, please report.
26
27
28
29    Check with args: -isystem;"/usr/local/Cellar/llvm/3.5.0/lib/clang/3.5.0/include";/Users/Chester/.emacs.d/irony/build/CMakeFiles/CMakeTmp/check-libclang-stddef.cpp
30    Check output:
31      dyld: Library not loaded: @rpath/libLLVM-3.5.dylib
32    Referenced from: /usr/local/opt/llvm/lib/libclang.dylib
33    Reason: image not found
34
35  SIGTRAP
36
37Call Stack (most recent call first):
38  src/CMakeLists.txt:8 (check_libclang_builtin_headers_dir)
39
40
41-- Irony package version is '0.1.2'
42-- Found emacs: /Applications/emacs.app/Contents/MacOS/Emacs
43-- Configuring done
44-- Generating done
45-- Build files have been written to: /Users/Chester/.emacs.d/irony/build
46Scanning dependencies of target irony-server
47[ 16%] Building CXX object src/CMakeFiles/irony-server.dir/support/CommandLineParser.cpp.o
48[ 33%] Building CXX object src/CMakeFiles/irony-server.dir/support/TemporaryFile.cpp.o
49[ 50%] Building CXX object src/CMakeFiles/irony-server.dir/Command.cpp.o
50[ 66%] Building CXX object src/CMakeFiles/irony-server.dir/Irony.cpp.o
51[ 83%] Building CXX object src/CMakeFiles/irony-server.dir/TUManager.cpp.o
52[100%] Building CXX object src/CMakeFiles/irony-server.dir/main.cpp.o
53Linking CXX executable ../bin/irony-server
54[100%] Built target irony-server
55Install the project...
56-- Install configuration: "Release"
57-- Installing: /Users/Chester/.emacs.d/irony/bin/irony-server
58
59Compilation finished at Wed Nov 12 12:53:26

In the mean time I will try to find another way to install llvm.
Thanks!

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 12, 2014

Can you tell me where libLLVM-3.5.dylib is located on your system?

@chester755
Copy link
Author

To be honest I don't know, I tried to reinstall the llvm via brew and this is what I have:
==> Downloading http://llvm.org/releases/3.5.0/llvm-3.5.0.src.tar.xz
Already downloaded: /Library/Caches/Homebrew/llvm-3.5.0.tar.xz
==> Downloading http://llvm.org/releases/3.5.0/cfe-3.5.0.src.tar.xz
Already downloaded: /Library/Caches/Homebrew/llvm--clang-3.5.0.tar.xz
==> ./configure --prefix=/usr/local/Cellar/llvm/3.5.0 --enable-optimized --disable-bindings --enable-targets=host --enable-shared
==> make
==> make install
==> Caveats
LLVM executables are installed in /usr/local/opt/llvm/bin.
Extra tools are installed in /usr/local/opt/llvm/share/llvm.

If you already have LLVM installed, then "brew upgrade llvm" might not work.
Instead, try:
brew rm llvm && brew install llvm

This formula is keg-only, which means it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS:  -L/usr/local/opt/llvm/lib
CPPFLAGS: -I/usr/local/opt/llvm/include

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 12, 2014

What I don't understand is that llvm is installed in /usr/local/Cellar/llvm/3.5.0/ or something like that, but here it seems to be usr/local/opt/llvm/.

Do you have multiple versions of LLVM?

@sevki
Copy link

sevki commented Nov 12, 2014

Home brew does ln -s type stuff


Sent from Mailbox

On Wed, Nov 12, 2014 at 4:20 PM, Guillaume Papin notifications@github.com
wrote:

What I don't understand is that llvm is installed in /usr/local/Cellar/llvm/3.5.0/ or something like that, but here it seems to be usr/local/opt/llvm/.

Do you have multiple versions of LLVM?

Reply to this email directly or view it on GitHub:
#135 (comment)

@sevki
Copy link

sevki commented Nov 12, 2014

I managed to build it, ycm downloads libclang precompiled from somewhere so that came in handy. I'll repeat my self a little here but this project lacks a homebrew package so llvm updates sometimes break this and hence its not a dependency it doesn't get tested in homebrew's tests

@chester755
Copy link
Author

I don't think I have multiple version of llvm

@sevki
Copy link

sevki commented Nov 12, 2014

@chester755 you probably do since commandline tools is required for homebrew and commandline tools is simply apple's llvm toolchain. and if you have ever done brew upgrade you might have more then 2 versions, homebrew symlinks new versions to /usr/local/opt/llvm/ after removing the oldones, which is how it manages to keep multiple versions of packages

@chester755
Copy link
Author

@sevki Ahh ok, so how am I suppose to resolve this multiple version issues? Shall I just uninstall the brew one, since there is a mac default one installed? If I uninstall brew one, and trying to do irony-install-server, it says it can't find libclang anywhere.

@chester755
Copy link
Author

1-- mode: compilation; default-directory: "~/.emacs.d/irony/build/" --
2Compilation started at Wed Nov 12 15:20:16
3
4cmake -DCMAKE_INSTALL_PREFIX=/Users/Chester/.emacs.d/irony/ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server && cmake --build .
--use-stderr --config Release --target install
5-- Detecting libclang builtin headers directory
6-- Detecting libclang builtin headers directory -- fail
7CMake Warning at cmake/CheckLibClangBuiltinHeadersDir.cmake:82 (message):
8 CheckLibClangBuiltinHeadersDir: failed to compile checker, please report.
9
10 Compile output:
11 Change Dir: /Users/Chester/.emacs.d/irony/build/CMakeFiles/CMakeTmp
12
13
14
15 Run Build Command:"/usr/bin/make" "cmTryCompileExec4081783102/fast"
16
17 /Applications/Xcode.app/Contents/Developer/usr/bin/make -f
18 CMakeFiles/cmTryCompileExec4081783102.dir/build.make
19 CMakeFiles/cmTryCompileExec4081783102.dir/build
20
21 /usr/local/Cellar/cmake/3.0.0/bin/cmake -E cmake_progress_report
22 /Users/Chester/.emacs.d/irony/build/CMakeFiles/CMakeTmp/CMakeFiles 1
23
24 Building CXX object
25 CMakeFiles/cmTryCompileExec4081783102.dir/LibClangDiagnosticsChecker.cpp.o
26
27 /usr/bin/c++ -fno-exceptions -I/usr/local/Cellar/llvm/3.5.0/include -o
28 CMakeFiles/cmTryCompileExec4081783102.dir/LibClangDiagnosticsChecker.cpp.o
29 -c
30 /Users/Chester/.emacs.d/irony/build/CMakeFiles/CMakeTmp/LibClangDiagnosticsChecker.cpp
31
32
33
34 /Users/Chester/.emacs.d/irony/build/CMakeFiles/CMakeTmp/LibClangDiagnosticsChecker.cpp:9:10:
35 fatal error: 'clang-c/Index.h' file not found
36
37 #include <clang-c/Index.h>
3839 ^
40
41 1 error generated.
42
43 make[1]: ***
44 [CMakeFiles/cmTryCompileExec4081783102.dir/LibClangDiagnosticsChecker.cpp.o]
45 Error 1
46
47 make: *** [cmTryCompileExec4081783102/fast] Error 2
48
49
50
51Call Stack (most recent call first):
52 src/CMakeLists.txt:8 (check_libclang_builtin_headers_dir)
53
54
55-- Irony package version is '0.1.2'
56-- Found emacs: /Applications/emacs.app/Contents/MacOS/Emacs
57-- Configuring done
58-- Generating done
59-- Build files have been written to: /Users/Chester/.emacs.d/irony/build
60[ 16%] Building CXX object src/CMakeFiles/irony-server.dir/Command.cpp.o
61In file included from /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server/src/Command.cpp:11:
62/Users/Chester/.emacs.d/elpa/irony-20141030.1555/server/src/Command.h:14:10: fatal error:
63 'clang-c/Index.h' file not found
64#include <clang-c/Index.h>
65 ^
661 error generated.
67make[2]: *** [src/CMakeFiles/irony-server.dir/Command.cpp.o] Error 1
68make[1]: *** [src/CMakeFiles/irony-server.dir/all] Error 2
69make: *** [all] Error 2
70
71Compilation exited abnormally with code 2 at Wed Nov 12 15:20:16

This is what happened after I have uninstall the llvm from brew

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 12, 2014

The cmake build directory has to be cleaned (I will do it automatically in irony-install-server someday as it may be confusing.

Please, when you change your llvm installation/settings, remove the .emacs.d/irony directory:

rm -rf ~/.emacs.d/irony

And call irony-install-server again.

@chester755
Copy link
Author

Sorry about the mess, I have deleted everything and here is what I have:

 1-*- mode: compilation; default-directory: "~/.emacs.d/irony/build/" -*-
 2Compilation started at Wed Nov 12 15:35:15
 3
 4cmake -DCMAKE_INSTALL_PREFIX\=/Users/Chester/.emacs.d/irony/ /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server && cmake --build . --use-stderr --config Release --target i\
  nstall
 5-- The C compiler identification is AppleClang 6.0.0.6000054
 6-- The CXX compiler identification is AppleClang 6.0.0.6000054
 7-- Check for working C compiler: /usr/bin/cc
 8-- Check for working C compiler: /usr/bin/cc -- works
 9-- Detecting C compiler ABI info
10-- Detecting C compiler ABI info - done
11-- Check for working CXX compiler: /usr/bin/c++
12-- Check for working CXX compiler: /usr/bin/c++ -- works
13-- Detecting CXX compiler ABI info
14-- Detecting CXX compiler ABI info - done
15-- Setting build type to 'Release' as none was specified
16-- Performing Test HAS_STDCXX11
17-- Performing Test HAS_STDCXX11 - Success
18-- Performing Test HAS_CXX11_STDLIB
19-- Performing Test HAS_CXX11_STDLIB - Success
20-- C++11 compiler option(s): -std=c++11
21CMake Error at /usr/local/Cellar/cmake/3.0.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
22  Could NOT find LibClang (missing: LIBCLANG_LIBRARY LIBCLANG_INCLUDE_DIR)
23Call Stack (most recent call first):
24  /usr/local/Cellar/cmake/3.0.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
25  cmake/modules/FindLibClang.cmake:78 (find_package_handle_standard_args)
26  src/CMakeLists.txt:3 (find_package)
27
28
29-- Configuring incomplete, errors occurred!
30See also "/Users/Chester/.emacs.d/irony/build/CMakeFiles/CMakeOutput.log".
31
32Compilation exited abnormally with code 1 at Wed Nov 12 15:35:16

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 12, 2014

Please try CMake with the additional argument: -DCMAKE_PREFIX_PATH=/usr/local/Cellar/llvm/3.5.0.

You need llvm 3.5.0 from homebrew of course.

@chester755
Copy link
Author

This is the output

*- mode: compilation; default-directory: "~/.emacs.d/irony/build/" -*-
 2Compilation started at Wed Nov 12 16:17:33
 3
 4cmake -DCMAKE_INSTALL_PREFIX\=/Users/Chester/.emacs.d/irony/ /usr/local/Cellar/llvm/3.5.0/  /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server && cmake --build . --use-std\
  err --config Release --target install
 5-- The C compiler identification is AppleClang 6.0.0.6000054
 6-- The CXX compiler identification is AppleClang 6.0.0.6000054
 7-- Check for working C compiler: /usr/bin/cc
 8-- Check for working C compiler: /usr/bin/cc -- works
 9-- Detecting C compiler ABI info
10-- Detecting C compiler ABI info - done
11-- Check for working CXX compiler: /usr/bin/c++
12-- Check for working CXX compiler: /usr/bin/c++ -- works
13-- Detecting CXX compiler ABI info
14-- Detecting CXX compiler ABI info - done
15-- Setting build type to 'Release' as none was specified
16-- Performing Test HAS_STDCXX11
17-- Performing Test HAS_STDCXX11 - Success
18-- Performing Test HAS_CXX11_STDLIB
19-- Performing Test HAS_CXX11_STDLIB - Success
20-- C++11 compiler option(s): -std=c++11
21-- Found LibClang: /usr/local/Cellar/llvm/3.5.0/lib/libclang.dylib
22-- Detecting libclang builtin headers directory
23-- Detecting libclang builtin headers directory -- fail
24CMake Warning at cmake/CheckLibClangBuiltinHeadersDir.cmake:87 (message):
25  CheckLibClangBuiltinHeadersDir: unsupported configuration, please report.
26
27
28
29    Check with args: -isystem;"/usr/local/Cellar/llvm/3.5.0/lib/clang/3.5.0/include";/Users/Chester/.emacs.d/irony/build/CMakeFiles/CMakeTmp/check-libclang-stddef.cpp
30    Check output:
31      dyld: Library not loaded: @rpath/libLLVM-3.5.dylib
32    Referenced from: /usr/local/opt/llvm/lib/libclang.dylib
33    Reason: image not found
34
35  SIGTRAP
36
37Call Stack (most recent call first):
38  src/CMakeLists.txt:8 (check_libclang_builtin_headers_dir)
39
40
41-- Irony package version is '0.1.2'
42-- Found emacs: /Applications/emacs.app/Contents/MacOS/Emacs
43-- Configuring done
44-- Generating done
45-- Build files have been written to: /Users/Chester/.emacs.d/irony/build
46Scanning dependencies of target irony-server
47[ 16%] Building CXX object src/CMakeFiles/irony-server.dir/support/CommandLineParser.cpp.o
48[ 33%] Building CXX object src/CMakeFiles/irony-server.dir/support/TemporaryFile.cpp.o
49[ 50%] Building CXX object src/CMakeFiles/irony-server.dir/Command.cpp.o
50[ 66%] Building CXX object src/CMakeFiles/irony-server.dir/Irony.cpp.o
51[ 83%] Building CXX object src/CMakeFiles/irony-server.dir/TUManager.cpp.o
52[100%] Building CXX object src/CMakeFiles/irony-server.dir/main.cpp.o
53Linking CXX executable ../bin/irony-server
54[100%] Built target irony-server
55Install the project...
56-- Install configuration: "Release"
57-- Installing: /Users/Chester/.emacs.d/irony/bin/irony-server
58
59Compilation finished at Wed Nov 12 16:17:37

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 12, 2014

You didn't add the CMAKE_PREFIX_PATH.

Please install with the following command (after deleting ~/.emacs.d/irony):

cmake -DCMAKE_INSTALL_PREFIX\=/Users/Chester/.emacs.d/irony/ -DCMAKE_PREFIX_PATH=/usr/local/Cellar/llvm/3.5.0 /usr/local/Cellar/llvm/3.5.0/  /Users/Chester/.emacs.d/elpa/irony-20141030.1555/server && cmake --build . --use-stderr --config Release --target install

@chester755
Copy link
Author

1-- mode: compilation; default-directory: "~/.emacs.d/irony/build/" --
2Compilation started at Wed Nov 12 16:22:29
3
4cmake -DCMAKE_INSTALL_PREFIX=/Users/Chester/.emacs.d/irony/ -DCMAKE_PREFIX_PATH=/usr/local/Cellar/llvm/3.5.0 /usr/local/Cellar/llvm/3.5.0/ /Users/Chester/.emacs.d/elpa/irony-
20141030.1555/server && cmake --build . --use-stderr --config Release --target install
5-- The C compiler identification is AppleClang 6.0.0.6000054
6-- The CXX compiler identification is AppleClang 6.0.0.6000054
7-- Check for working C compiler: /usr/bin/cc
8-- Check for working C compiler: /usr/bin/cc -- works
9-- Detecting C compiler ABI info
10-- Detecting C compiler ABI info - done
11-- Check for working CXX compiler: /usr/bin/c++
12-- Check for working CXX compiler: /usr/bin/c++ -- works
13-- Detecting CXX compiler ABI info
14-- Detecting CXX compiler ABI info - done
15-- Setting build type to 'Release' as none was specified
16-- Performing Test HAS_STDCXX11
17-- Performing Test HAS_STDCXX11 - Success
18-- Performing Test HAS_CXX11_STDLIB
19-- Performing Test HAS_CXX11_STDLIB - Success
20-- C++11 compiler option(s): -std=c++11
21-- Found LibClang: /usr/local/Cellar/llvm/3.5.0/lib/libclang.dylib
22-- Detecting libclang builtin headers directory
23-- Detecting libclang builtin headers directory -- fail
24CMake Warning at cmake/CheckLibClangBuiltinHeadersDir.cmake:87 (message):
25 CheckLibClangBuiltinHeadersDir: unsupported configuration, please report.
26
27
28
29 Check with args: -isystem;"/usr/local/Cellar/llvm/3.5.0/lib/clang/3.5.0/include";/Users/Chester/.emacs.d/irony/build/CMakeFiles/CMakeTmp/check-libclang-stddef.cpp
30 Check output:
31 dyld: Library not loaded: @rpath/libLLVM-3.5.dylib
32 Referenced from: /usr/local/opt/llvm/lib/libclang.dylib
33 Reason: image not found
34
35 SIGTRAP
36
37Call Stack (most recent call first):
38 src/CMakeLists.txt:8 (check_libclang_builtin_headers_dir)
39
40
41-- Irony package version is '0.1.2'
42-- Found emacs: /Applications/emacs.app/Contents/MacOS/Emacs
43-- Configuring done
44-- Generating done
45-- Build files have been written to: /Users/Chester/.emacs.d/irony/build
46Scanning dependencies of target irony-server
47[ 16%] Building CXX object src/CMakeFiles/irony-server.dir/support/CommandLineParser.cpp.o
48[ 33%] Building CXX object src/CMakeFiles/irony-server.dir/support/TemporaryFile.cpp.o
49[ 50%] Building CXX object src/CMakeFiles/irony-server.dir/Command.cpp.o
50[ 66%] Building CXX object src/CMakeFiles/irony-server.dir/Irony.cpp.o
51[ 83%] Building CXX object src/CMakeFiles/irony-server.dir/TUManager.cpp.o
52[100%] Building CXX object src/CMakeFiles/irony-server.dir/main.cpp.o
53Linking CXX executable ../bin/irony-server
54[100%] Built target irony-server
55Install the project...
56-- Install configuration: "Release"
57-- Installing: /Users/Chester/.emacs.d/irony/bin/irony-server
58
59Compilation finished at Wed Nov 12 16:22:34

@tsukimizake
Copy link
Contributor

@chester755
Can you try following shell command?

$ cd /usr/local/opt/llvm/lib
$ sudo install_name_tool -change @rpath/libLLVM-3.5.dylib /usr/local/opt/llvm/lib/libLLVM-3.5.dylib /usr/local/opt/llvm/lib/libclang.dylib

It rewrites the data of dynamic linker of libclang to specify full path of libLLVM-3.5 instead of using rpath.

@chester755
Copy link
Author

@tsukimizake i have changed that

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 13, 2014

So can you try to rebuild and retest irony-server?

@chester755
Copy link
Author

1-- mode: compilation; default-directory: "~/.emacs.d/irony/build/" --
2Compilation started at Thu Nov 13 09:48:12
3
4cmake -DCMAKE_INSTALL_PREFIX=/Users/Chester/.emacs.d/irony/ -DCMAKE_PREFIX_PATH=/usr/local/Cellar/llvm/3.5.0 /usr/local/Cellar/llvm/3.5.0/ /Users/Chester/.emacs.d/elpa/irony-
20141030.1555/server && cmake --build . --use-stderr --config Release --target install
5-- The C compiler identification is AppleClang 6.0.0.6000054
6-- The CXX compiler identification is AppleClang 6.0.0.6000054
7-- Check for working C compiler: /usr/bin/cc
8-- Check for working C compiler: /usr/bin/cc -- works
9-- Detecting C compiler ABI info
10-- Detecting C compiler ABI info - done
11-- Check for working CXX compiler: /usr/bin/c++
12-- Check for working CXX compiler: /usr/bin/c++ -- works
13-- Detecting CXX compiler ABI info
14-- Detecting CXX compiler ABI info - done
15-- Setting build type to 'Release' as none was specified
16-- Performing Test HAS_STDCXX11
17-- Performing Test HAS_STDCXX11 - Success
18-- Performing Test HAS_CXX11_STDLIB
19-- Performing Test HAS_CXX11_STDLIB - Success
20-- C++11 compiler option(s): -std=c++11
21-- Found LibClang: /usr/local/Cellar/llvm/3.5.0/lib/libclang.dylib
22-- Detecting libclang builtin headers directory
23-- Detecting libclang builtin headers directory -- success
24-- Irony package version is '0.1.2'
25-- Found emacs: /Applications/emacs.app/Contents/MacOS/Emacs
26-- Configuring done
27-- Generating done
28-- Build files have been written to: /Users/Chester/.emacs.d/irony/build
29Scanning dependencies of target irony-server
30[ 16%] Building CXX object src/CMakeFiles/irony-server.dir/support/CommandLineParser.cpp.o
31[ 33%] Building CXX object src/CMakeFiles/irony-server.dir/support/TemporaryFile.cpp.o
32[ 50%] Building CXX object src/CMakeFiles/irony-server.dir/Command.cpp.o
33[ 66%] Building CXX object src/CMakeFiles/irony-server.dir/Irony.cpp.o
34[ 83%] Building CXX object src/CMakeFiles/irony-server.dir/TUManager.cpp.o
35[100%] Building CXX object src/CMakeFiles/irony-server.dir/main.cpp.o
36Linking CXX executable ../bin/irony-server
37[100%] Built target irony-server
38Install the project...
39-- Install configuration: "Release"
40-- Installing: /Users/Chester/.emacs.d/irony/bin/irony-server
41

@chester755
Copy link
Author

41
42Compilation finished at Thu Nov 13 09:48:18

I think it's working now

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 13, 2014

Nice, thanks @tsukimizake. Should homebrew or Clang be fixed?

@chester755
Copy link
Author

Thanks guys, you are wizards

@tsukimizake
Copy link
Contributor

@Sarcasm
Maybe. I'll post an issue to homebrew.

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 13, 2014

Great, thank you. Please let me know when it's posted I may update irony-mode's FAQ to link to it or put something in the Wiki.

Best,
Guillaume

@Sarcasm
Copy link
Owner

Sarcasm commented Nov 17, 2014

Closing this, hopefully the Homebrew guys will do something about it. It is now shortly documented in the Wifi at least.

I'll repeat my self a little here but this project lacks a homebrew package so llvm updates sometimes break this and hence its not a dependency it doesn't get tested in homebrew's tests

@sevki: I understand the problem but the right thing to do after giving it some thoughts was to package irony-server with the Emacs package manager instead of a system package manager. Since it's a mode for C++ I'm assuming people have the necessary tools to build irony-server. I just wished I was using this platform so that I would have a better understanding of what to do, in the meantime I will rely on volunteers to make this better. Actually I believe it could be packaged without too much difficulties. What I'm not sure is how the other projects such as company-irony should be installed.

@Sarcasm Sarcasm closed this as completed Nov 17, 2014
@codekingplusplus
Copy link

I think I am experiencing an error related to this, but when I use the install_name_tool command and try installing the server again, it just tells me a different dylib is missing. See issue #196.

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

5 participants