When following the Windows build process I have found on 2 computers when running ‘.\tools\make-win64-binaries.bat’ or running cmake ../../ -G «Visual Studio 14 2015 Win64» from the build\windows10 folder that the build will fail with the following message:
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.
What we tried:
-
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
-
Invoking «C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat then running cmake …. -G «Visual Studio 14 2015 Win64»
-
cmake ../../ -G «Visual Studio 14 2015 Win64» -T v140
-
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 environment
CLion+Cmake+Mingw
An error log
-- The C compiler identification is unknown
-- Check for working C compiler: D:/MinGW/bin/gcc.exe
-- Check for working C compiler: D:/MinGW/bin/gcc.exe -- broken
CMake Error at D:/Program Files/JetBrains/CLion 2019.2.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"D:/MinGW/bin/gcc.exe"
is not able to compile a simple test program.
If it is a CPP program, it may be reported again
-- The CXX compiler identification is unknown
why
CMAKE could not check the C Compiler ID for unknown reasons, causing compilation to fail
The solution
Add the following configuration to the cMakelists.txt file to force the Compiler ID to be specified
INCLUDE(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(gcc GNU)
CMAKE_FORCE_CXX_COMPILER(g++ GNU)
Rerun the cmake directive after adding it
Read More:
Loading…
You are seeing this because the administrator of this website has set up Anubis to protect the server against the scourge of AI companies aggressively scraping websites. This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.
Anubis is a compromise. Anubis uses a Proof-of-Work scheme in the vein of Hashcash, a proposed proof-of-work scheme for reducing email spam. The idea is that at individual scales the additional load is ignorable, but at mass scraper levels it adds up and makes scraping much more expensive.
Ultimately, this is a hack whose real purpose is to give a «good enough» placeholder solution so that more time can be spent on fingerprinting and identifying headless browsers (EG: via how they do font rendering) so that the challenge proof of work page doesn’t need to be presented to users that are much more likely to be legitimate.
Please note that Anubis requires the use of modern JavaScript features that plugins like JShelter will disable. Please disable JShelter or other such plugins for this domain.
If you’re like me, you’ve run into the following set of errors when trying to use CMake on Windows and especially when trying to compile Python code:
— Building for: NMake Makefiles
— The CXX compiler identification is unknown
— The C compiler identification is unknown
CMake Error at CMakeLists.txt:131 (project):
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable «CXX» or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:131 (project):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable «CC» or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
Read on for instructions on how to get past this error…
The solution is to modify the installation of Visual Studio 2017 and install a specific individual component.
- Go to Add or Remove Programs and Modify your Visual Studio 2017 installation
- Click the Individual Components heading at the top
- Under Compilers, build tools, and runtimes check the Visual C++ tools for CMake (see image below)
- Allow it to include any other necessary dependency items for CMake tools
- Click the Modify button to have it update the installation
- When installation is done, if you have a command prompt shell open still you will want to restart it.
- Try your CMake command again. It should work!
Modify Visual Studio 2017 to include CMake Tools
Tag: microsoft visual studio python cmake compiler