The cxx compiler identification is unknown windows
Windows Build issue («The C compiler identification is unknown») #3567
Comments
dlobutters commented Aug 16, 2017
Full Error Output:
c:\osquery>.\tools\make-win64-binaries.bat
— The C compiler identification is unknown
— The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:341 (project):
The CMAKE_C_COMPILER:
is not a full path and was not found in the PATH.
CMake Error at CMakeLists.txt:341 (project):
The CMAKE_CXX_COMPILER:
is not a full path and was not found in the PATH.
— Configuring incomplete, errors occurred!
See also «C:/osquery/build/windows10/CMakeFiles/CMakeOutput.log».
See also «C:/osquery/build/windows10/CMakeFiles/CMakeError.log».
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: shell.vcxproj
Worked with @muffins to try and resolve but we were unsuccessful.
Removing Visual Studios on both computers and then running make-win64-dev-env.bat again to reinstall
Removing the chocolaty folder and then then running make-win64-dev-env.bat again to reinstall
tested the system PATH to ensure we could call cl, clang and clang++ as well as copy the PATH from a working computer
NOTE: One thing these computers had in common is that both chocolaty and Visual Studios were installed before following the build process. Being that chocolaty is just a folder it is unlikely that is the issue. If you had Visual Studios installed on your computer before the build process will possibly fail.
Current workaround:
Reimage or get a computer that has never had Visual Studios. So far all computers that have never had Visual Studios have no issues following the build steps.
The text was updated successfully, but these errors were encountered:
muffins commented Aug 17, 2017
muffins commented Sep 6, 2017
I ran into this issue tonight myself when I had inadvertently upgrade to VS 2017. This was pretty infuriating, and the fix ultimately was to uninstall all versions of Visual Studio as well as SDK and Runtimes, and re-run our provisioning script. This got our environment set back up and builds kicked off successfully.
realnemo commented Sep 21, 2017
I landed up in the same issue. This is my first time trying to build the OSQuery on windows. My system had Visual Studio 2013 pre-installed.
C:\osquery>tools\make-win64-dev-env.bat
[+] Provisioning a Win64 build environment for osquery
[+] Done.
Refreshing environment variables from registry for cmd.exe. Please wait. Finished..
C:\osquery>tools\make-win64-binaries.bat
— The C compiler identification is unknown
— The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:341 (project):
The CMAKE_C_COMPILER:
is not a full path and was not found in the PATH.
CMake Error at CMakeLists.txt:341 (project):
The CMAKE_CXX_COMPILER:
is not a full path and was not found in the PATH.
CMake не видит компилятор VS2019
Установил VS2019 (cmake компонент также установил)
затем переустановил CMake.
— Selecting Windows SDK version 8.1 to target Windows 6.3.9600.
— The C compiler identification is unknown
— The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:5 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:5 (project):
No CMAKE_CXX_COMPILER could be found.
— Configuring incomplete, errors occurred!
запускать консоль разработки Visual Studio, а уже из неё CMAKE
0iStalker
> запускать консоль разработки Visual Studio, а уже из неё CMAKE
Текст ошибки взят как раз из консоли разработки (developer command prompt)
то есть не работает (через гуи тоже).
war_zes
> No CMAKE_C_COMPILER could be found
Попробуй набрать в developer command prompt команды cl.exe и rc.exe, может быть что-то недоустановилось?
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>rc.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>
Как-то оно странно выглядит. В старых версиях было так
usage: cl [ option. ] filename. [ /link linkoption. ]
C:\Program Files (x86)\Microsoft Visual Studio 14.0>rc.exe
Microsoft (R) Windows (R) Resource Compiler Version 6.3.9600.17336
Copyright (C) Microsoft Corporation. All rights reserved.
fatal error RC1107: invalid usage; use RC /? for Help
C:\Program Files (x86)\Microsoft Visual Studio 14.0>
Попробовал так. Не работает
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>cd C:\Users\1\Desk
top\turso3d-master\turso3d-master
C:\Users\1\Desktop\turso3d-master\turso3d-master>cl
Оптимизирующий компилятор Microsoft (R) C/C++ версии 19.21.27702.2 для x86
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.
использование: cl [ параметр. ] имя_файла. [ /link параметр_компоновки. ]
Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.
C:\Users\1\Desktop\turso3d-master\turso3d-master>cmake CMa
keLists.txt
— Building for: Visual Studio 16 2019
— Selecting Windows SDK version 8.1 to target Windows 6.3.9600.
— The C compiler identification is unknown
— The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.
— Configuring incomplete, errors occurred!
See also «C:/Users/1/Desktop/turso3d-master/turso3d-master
/CMakeFiles/CMakeOutput.log».
See also «C:/Users/1/Desktop/turso3d-master/turso3d-master
/CMakeFiles/CMakeError.log».
Теперь надо сделать решение.
Собственно да, сам же CMake пишет
Так можно как-то его заставить использовать SDK 10?
The C compiler identification is unknown #588
Comments
hynguyen2610 commented Jan 5, 2016
I installed cmake.
When trying to run the build.bat, I got this error.
— The C compiler identification is unknown
— The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.
The text was updated successfully, but these errors were encountered:
jkotas commented Jan 5, 2016
hynguyen2610 commented Jan 5, 2016
I have Visual Studio 2015 Community installed, with C# and C++ modules. Tried to run build.bat with VS2015 x64 Native Tools Command Prompt, but this error still happened.
jkotas commented Jan 5, 2016
hynguyen2610 commented Jan 6, 2016
I findout this error because I install CMake before VS. Remove CMake and reinstall fix this
cipher982 commented Feb 10, 2017
I have spent hours trying to figure this out, but re-installing CMake AFTER VS finally got it all working.
walter211 commented Feb 24, 2017
v2up commented Apr 6, 2017
Alan-FGR commented Jun 13, 2017 •
@walter211, @mafanshu: Are your guys uninstalling CMake and reinstalling or just using the modify option?
In any case, I’m not sure if that will fix the problem, try pointing CMake manually to cl.exe and see if it drops a linker error. CMake compiles a simple program for testing and it may drop some errors, possibly a missing lib (which can be installed in the VS installer program. maybe ucrt).
See also:
https://stackoverflow.com/questions/42701019/problems-generating-solution-for-vs-2017-with-cmake
PathogenDavid commented Apr 3, 2019
In my case this issue was being caused by not having the Spectre mitigated libraries installed. (Checking the CMake logs reveals the warning «warning MSB8038: Spectre mitigation is enabled but Spectre mitigated libraries are not found.» followed by an error to link MSVCRTD.lib when CMake tries to validate the compiler.)
Spectre mitigations are supposed to be off by default, but they aren’t in Visual Studio 2017.
The workaround is to install the «VC++ 2017 version 15.9 v14.16 Libs for Spectre (x86 and x64)» component or to use Visual Studio 2019 instead (which does not have this issue.)
Идентификатор компилятора CXX неизвестен
У нас возникают проблемы при компиляции проекта с использованием CMake (v2.8.12) под Windows 7 64Bit с использованием Visual Studio 2012. CMake выдает нам следующие ошибки. Мы уже пытались запустить Cmake из командной строки Visual Studio, используя права администратора. Кажется, в CMake 2.8.11 была похожая ошибка: http://www.cmake.org/Bug/view.php?id=14440
Решение
У меня была та же проблема, и я исправил ее, запустив cmake как Admin
Другие решения
У меня была похожая проблема также, если вы используете Microsoft Visual Studio 2012, это может быть из-за обновления KB2781514 пропал, отсутствует.
После того как я установил следующее обновление, CMake начал правильно определять компиляторы Visual Studio 2012 c / c ++.
Эти сообщения об ошибках
означает, что CMake действительно нашел или предполагал компилятор, но не смог скомпилировать простую тестовую программу.
Взгляни на CMakeFiles\CMakeError.log и проверьте там сообщение об ошибке, чтобы увидеть:
какое сообщение об ошибке вызывало компилятор
например LINK : fatal error LNK1181: cannot open input file ‘kernel32.lib’
В прошлый раз у меня была эта проблема …
В прошлый раз у меня возникла эта проблема, когда моя стандартная установка Visual Studio 2012 Professional не установила Windows SDK (в журнале ошибок отображался отсутствующий заголовок SDK).
Чтобы проверить установку SDK, например, убедитесь, что у вас установлен любой Resource Compiler. Это должно быть в пути, похожем на:
Так как мне не хватало этого — или точнее любого SDK — я установил Windows 8.1 SDK (поскольку Visual Studio 2012 предназначена для Windows 8.x) и вуаля, мой CMake снова смог скомпилировать (тестировать) программы.
Ссылка
Та же проблема здесь с cmake 2.8.12 и visual studio 10. Cmake может не найти компилятор. Я решил проблему, удалив последнюю версию и установив cmake 2.8.10.
Я только сталкиваюсь с этой проблемой, после того, как я удалил некоторое программное обеспечение MS.
Я исправил это путем ремонта visual studio 2012.
Сначала зайдите в [Панель управления], затем выберите Visual Studio и восстановите его, все пойдет прямо сейчас.
Убедитесь, что вы выбрали правильную версию Visual Studio.
Например, Visual Studio 2012 является версией 11.
Если вы используете CMake 3.4.0, попробуйте обновить его до более новой версии. Ошибка относительно этого была исправлена относительно недавно (см. сообщение об ошибке ).
Arch Linux
You are not logged in.
#1 2016-02-06 04:29:01
The C compiler identification is unknown (Solved)
Can not build from aur I get this error
I have installed Arch Linux x64
Last edited by kabbalah (2016-02-06 22:19:03)
#2 2016-02-06 04:40:26
Re: The C compiler identification is unknown (Solved)
Yeah: that doesn’t look too good.
Registered Linux User #482438
#3 2016-02-06 05:10:20
Re: The C compiler identification is unknown (Solved)
I just test qtspell aur package and compiles as expected:
the obvious, did you have base-devel installed?
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.
* AUR contributor.
#4 2016-02-06 05:12:15
Re: The C compiler identification is unknown (Solved)
Please post output in English. In this case, though, it doesn’t take any of my Spanish training to see what this message is saying:
Translation: fix the typo in your makepkg.conf
#5 2016-02-06 05:24:19
Re: The C compiler identification is unknown (Solved)
Moving to «Newbie Corner».
#6 2016-02-06 14:48:22
Re: The C compiler identification is unknown (Solved)
Base devel is the first thing that is installed #pacstrap / mnt based base-devel
#7 2016-02-06 16:00:54
Re: The C compiler identification is unknown (Solved)
So that’s a yes? We don’t know what you installed. But here it is clear that the compiler is present. But there is a typo in your CFLAGS. Fix the typo.
#8 2016-02-06 17:16:15
Re: The C compiler identification is unknown (Solved)
If I install base and base-devel first. Now I post my COMPILE FLAGS
I do not know how to do what says Trilby
Last edited by kabbalah (2016-02-06 17:19:29)
#9 2016-02-06 17:23:11
Re: The C compiler identification is unknown (Solved)
#10 2016-02-06 18:16:14
Re: The C compiler identification is unknown (Solved)
Change ssp-buffer-size4 to ssp-buffer-size=4 (or just remove it).
#11 2016-02-06 18:31:28
Re: The C compiler identification is unknown (Solved)
In this page copy this code and change this in my makepkg, and it worked for me
Last edited by kabbalah (2016-02-06 18:32:40)
#12 2016-02-06 19:23:05
Re: The C compiler identification is unknown (Solved)
#13 2016-02-06 22:21:09
Re: The C compiler identification is unknown (Solved)
No, I do not know why but eventually worked for me and I could compile from AUR
#14 2016-02-06 22:56:25
Re: The C compiler identification is unknown (Solved)
It «works» because you fixed the typo. «—param=ssp-buffer-size=4» is an option that gcc understands, «—param=ssp-buffer-size4» is giberish. Scimmia’s question was why you have that option included at all, it is not in the default makepkg.conf (it previously was which is most likely why you have it).