0

I try to compile the project https://github.com/facebookresearch/rebel in windows.Like it says in the instruction I execute make. But the command fails with following error:

(pt) D:\GitHub\rebel>make
mkdir -p build && cd build && cmake ../csrc/liars_dice -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=../cfvpy && make -j
-- Building for: NMake Makefiles
CMake Warning at CMakeLists.txt:2 (project):
  To use the NMake generator, cmake must be run from a shell that can use the
  compiler cl from the command line.  This environment does not contain      
  INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to     
  work.


-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
CMake Warning at D:/Anaconda/envs/pt/Library/share/cmake-3.3/Modules/Platform/Windows-GNU.cmake:145 (enable_language):
  To use the NMake generator, cmake must be run from a shell that can use the
  compiler cl from the command line.  This environment does not contain
  INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
  work.
Call Stack (most recent call first):
  D:/Anaconda/envs/pt/Library/share/cmake-3.3/Modules/Platform/Windows-GNU-C.cmake:2 (__windows_compiler_gnu)
  D:/Anaconda/envs/pt/Library/share/cmake-3.3/Modules/CMakeCInformation.cmake:56 (include)
  CMakeLists.txt:2 (project)


-- Check for working C compiler: D:/mingw64/bin/gcc.exe
CMake Warning at CMakeLists.txt:2 (project):
  To use the NMake generator, cmake must be run from a shell that can use the
  compiler cl from the command line.  This environment does not contain
  INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
  work.


CMake Warning at D:/Anaconda/envs/pt/Library/share/cmake-3.3/Modules/Platform/Windows-GNU.cmake:145 (enable_language):
  To use the NMake generator, cmake must be run from a shell that can use the
  compiler cl from the command line.  This environment does not contain
  INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
  work.
Call Stack (most recent call first):
  D:/Anaconda/envs/pt/Library/share/cmake-3.3/Modules/Platform/Windows-GNU-C.cmake:2 (__windows_compiler_gnu)
  D:/Anaconda/envs/pt/Library/share/cmake-3.3/Modules/CMakeCInformation.cmake:56 (include)
  CMakeLists.txt:2 (project)


CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_137fe\fast"
-- Check for working C compiler: D:/mingw64/bin/gcc.exe -- broken
CMake Error at D:/Anaconda/envs/pt/Library/share/cmake-3.3/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "D:/mingw64/bin/gcc.exe" is not able to compile a simple
  test program.

  It fails with the following output:

   Change Dir: D:/GitHub/rebel/build/CMakeFiles/CMakeTmp



  Run Build Command:"nmake" "/NOLOGO" "cmTC_137fe\fast"

  绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆

  Generator: execution of make failed.  Make command was: "nmake" "/NOLOGO"
  "cmTC_137fe\fast"





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!
See also "D:/GitHub/rebel/build/CMakeFiles/CMakeOutput.log".
See also "D:/GitHub/rebel/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:5: compile] Error 1

CMakeError.log:

Determining if the C compiler works failed with the following output:
Change Dir: D:/GitHub/rebel/build/CMakeFiles/CMakeTmp

Run Build Command:"nmake" "/NOLOGO" "cmTC_137fe\fast"
系统找不到指定的文件。
Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_137fe\fast"

CMakeOutput.log:

The system is: Windows - 6.2 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: D:/mingw64/bin/gcc.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "D:/GitHub/rebel/build/CMakeFiles/3.3.1/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: D:/mingw64/bin/g++.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "D:/GitHub/rebel/build/CMakeFiles/3.3.1/CompilerIdCXX/a.exe"

I have tried to implement the suggestions given in Cmake Compiler Issue it fails with the below output :

(pt) D:\GitHub\rebel>cmake -G "MinGW Makefiles"
CMake Error: The source directory "D:/GitHub/rebel" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

I'm new to use cmake,can you please help me?

xyfc
  • 1
  • Seems like you run the commands from cmd without running vcvarsall.bat. – nevilad Mar 21 '21 at 17:10
  • Thank you for your suggestion.I have installed visual studio 2019, and run the command `vcvarsall.bat amd64`.This error doesn't appear.But another error happens.I'll try to solve the problem tomorrow. – xyfc Mar 23 '21 at 14:27

0 Answers0