Error using rez on windows
See original GitHub issueI’m trying to build the hello_world example package provided with rez but I’m getting errors just doing the cmake compiler tests that I don’t get when just running cmake by itself without rez.
When I run rez-build on the hello_world project, I get the following output:
NOTE: I get this same output even if the CMakeLists.txt
file only contains the cmake_minimum_required
command
Executing: c:\program files (x86)\cmake\bin\cmake.exe -d C:\Users\babel\workspace\rez\example_packages\hello_world -Wno-dev -DCMAKE_ECLIPSE_GENERATE_S
OURCE_PROJECT=TRUE -D_ECLIPSE_VERSION=4.3 --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX=C:\Users\babel\packages\hello_world\1.0.0 -DCMAKE_MODULE_PATH=%C
MAKE_MODULE_PATH% -DCMAKE_BUILD_TYPE=Release -DREZ_BUILD_TYPE=local -DREZ_BUILD_INSTALL=0 -G NMake Makefiles
Not searching for unused variables given on the command line.
-- 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/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/babel/workspace/rez/example_packages/hello_world/build/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_62b41\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe" -f
CMakeFiles\cmTC_62b41.dir\build.make /nologo -L
CMakeFiles\cmTC_62b41.dir\build
Building C object CMakeFiles/cmTC_62b41.dir/testCCompiler.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe
@C:\Users\babel\AppData\Local\Temp\nm7D7D.tmp
testCCompiler.c
Linking C executable cmTC_62b41.exe
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E vs_link_exe
--intdir=CMakeFiles\cmTC_62b41.dir --manifests --
C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo
@CMakeFiles\cmTC_62b41.dir\objects1.rsp
@C:\Users\babel\AppData\Local\Temp\nm7DDC.tmp
RC Pass 1 failed to run.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake\bin\cmake.exe"' :
return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\bin\nmake.exe"' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "C:/Users/babel/workspace/rez/example_packages/hello_world/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/babel/workspace/rez/example_packages/hello_world/build/CMakeFiles/CMakeError.log".
rez: BuildError: The cmake build system failed
However, if I just use cmake
directly to build the hello_world project, I get this successful output from cmake
NOTE: obviously, I have to remove everything except the cmake_minimum_required
command from the build file, but the C compiler tests complete succesfully using cmake and not with rez.
-- Building for: Visual Studio 14 2015
-- 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/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/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/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/babel/workspace/rez/example_packages/hello_world
Issue Analytics
- State:
- Created 7 years ago
- Comments:25 (11 by maintainers)
Top Results From Across the Web
Error using rez on windows · Issue #348 - GitHub
I'm trying to build the hello_world example package provided with rez but I'm getting errors just doing the cmake compiler tests that I ......
Read more >Getting started with rez and windows - Google Groups
I am using the git-bash terminal on windows 7 and I am just trying to get rez up and running to play ......
Read more >rez Changelog - pyup.io
Fix rez executables aren't removed in windows install ... NoneType Error When Using `rez pip` on Windows ...
Read more >Rez - mottosso
Rez lets you describe the environment you want in a natural way. ... You can get around this problem using piping. ... port...
Read more >My Humble Pipeline [MHP] project - Tech-Artists.Org
On Windows we deploy bat file which points to Python.exe and scripts on server path. ... Rez could solve this problem, with either...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey Guys!
This isn’t the most ideal solution yet (running vcvarsall.bat is very slow), but it does fit into rez’s workflow, and cmake works as expected. If this is all fairly obvious, I’m sorry. I am new to both rez and software compilation on windows.
1) Get a Compiler
You can’t compile without a compiler. Firstly, make sure you actually have one. You can install cmake and the microsoft build tools most easily using chocolatey).
2) Create a vscode Rez Package
Add a package for vscode right in your rez package repository. This package will call
vcvarsall.bat
and set up your cmd.exe’s environment variables...\vscode\x64_2017_14.13.2512\package.py
3) Create a 2nd Rez Package (one to compile with cmake)
We’ll build this package normally using rez-build. Create it somewhere other than your rez package repository.
2nd Package Structure
CMakeLists.txt
package.py
4) rez-build
Now you can run rez-build, and both cmake and NMake’s will run
vcvarsall.bat
, so your path and the myriad of other computer-specific variables required to compile in windows.Just a note -
<snip from google group>build_command
is preferrable to bez, as I would like to deprecate bez.I would like to deprecate bez in favor of custom build commands ( https://github.com/nerdvegas/rez/wiki/Building-Packages# custom-build-commands). Fortunately it is trivial to convert a rezbuild.py to a custom build command, like so:
Thx A
On Thu, Sep 20, 2018 at 10:29 PM, Thorsten Kaufmann < notifications@github.com> wrote: