Open emacsun opened 6 years ago
Think I got the same, came here by googling for "CMake Warning at cmake/CheckClangResourceDir.cmake:77 (message): CheckClangResourceDir: failed to compile checker, please report."
i have the same trouble, don't know how to solve it.
OS: windows 10; clang version 6.0.0 cmake: 3.11.0
Visual Studio 15 2017 Win64
I got it working by using the following command
(yeah I took a screenshot because I was too tired to google "copy from mini-buffer" at this point :P )
Thanks, Dapuva76,
Message "cmake/CheckClangResourceDir.cmake:77 (message):" appears only with cmake-gui, when i select path to "source code" and path to "build the binaries", then push Configure button and configuration process fails with "...cmake:77 ..." message.
But if i use console cmake command mentioned at https://github.com/Sarcasm/irony-mode/wiki/Setting-up-irony-mode-on-Windows all right. This behavior quite surprized for me.
cmake -G "Visual Studio 15 2017 Win64" ..
-- The C compiler identification is MSVC 19.13.26131.1
-- The CXX compiler identification is MSVC 19.13.26131.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found LibClang: C:/Program Files/LLVM/lib/libclang.lib
-- Detecting Clang resource directory
-- Detecting libclang builtin headers directory -- success
-- Irony package version is '1.2.0'
-- Found emacs: C:/emacs/bin/emacs.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/develop/emacs-irony/irony-mode-master/server/build
To sum up solution by @Dapuva76 : when irony-install-server
prompts for command, you need to add to the already existing text a -DCLANG_RESOURCE_DIR
that points out to clang libs.
E.g. for me on Archlinux it was -DCLANG_RESOURCE_DIR=/usr/lib
.
(no idea why this dir was not detected, though worth noting that I used clang-svn package instead of plain clang until today)
Hi @Sarcasm I am desperate to compile the iron-server.exe. However, after around one hundread of failure. I need your help. thanks in advance.
the environment is listed as bellow:
OS: windows 10: LLVM: 5.0.1 cmake: 3.10.2
mainly because "Detecting Clang resource directore --fail"
and "Cannot open include file: 'clang-c/Index.h': No such file or directory"
the command and the message is listed as bellow: c:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build>cmake -DLIBCLANG_LIBRARY=c:\tools\LLVM\lib\libclang.lib -DLIBCLANG_INCLUDE_DIR=c:\tools\LLVM\lib -G "Visual Studio 14 2015 Win64" .. -- Selecting Windows SDK version to target Windows 10.0.16299. -- The C compiler identification is MSVC 19.0.24210.0 -- The CXX compiler identification is MSVC 19.0.24210.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found LibClang: C:/tools/LLVM/lib/libclang.lib -- Detecting Clang resource directory -- Detecting Clang resource directory -- fail CMake Warning at cmake/CheckClangResourceDir.cmake:77 (message): CheckClangResourceDir: failed to compile checker, please report.
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_e8b70.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 1/25/2018 12:00:28 AM.
Project "C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj" on node 1 (default targets).
PrepareForBuild:
InitializeBuildStatus:
ClCompile:
cl : Command line warning D9025: overriding '/EHs' with '/EHs-' [C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj]
cl : Command line warning D9025: overriding '/EHc' with '/EHc-' [C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj]
C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\LibClangDiagnosticsChecker.cpp(9): fatal error C1083: Cannot open include file: 'clang-c/Index.h': No such file or directory [C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj]
Done Building Project "C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj" (default target) (1) ->
(ClCompile target) ->
"C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj" (default target) (1) ->
(ClCompile target) ->
Time Elapsed 00:00:00.85
Call Stack (most recent call first): src/CMakeLists.txt:8 (check_clang_resource_dir)
-- Irony package version is '1.2.0' -- Found emacs: C:/Emacs64/bin/emacs.exe -- Configuring done -- Generating done -- Build files have been written to: C:/Users/cliyh/AppData/Roaming/.emacs.d/elpa/irony-20180104.1109/server/build