"Quickstart" on windows / some questions

662 views
Skip to first unread message

Thorsten Kaufmann

unread,
Apr 11, 2016, 10:52:10 AM4/11/16
to rez-config
Hi there,

so here i am after a long time getting back to evaluating rez. We are currently looking into the current state of rez and rez-like systems to chosse our future path.
From what i can tell there has been quite a lot of progress since i last played and there has been significant windows work especially. Which is our main platform.
While trying to get up to cruise speed i hit some walls pretty early and think i may be doing things wrong in the first place.

So here are a bunch of questions and issues:

1. Is there a quickstart for windows out there somewhere?
2. Are the docs at http://nerdvegas.github.io/rez/ uptodate? Are there any uptodate docs if not? It seems that targets yaml, while recent example seem to be python package files?
3. It seems there are some people using rez on windows. How ready for primetime would you consider rez?
4. I went ahead and tried to get a minimal sample working. Here is what happend:

  • Grabbed the source (tried both master and the last release from github)
  • ran "python install.py -v TARGETFOLDER" to install rez
  • created a small bat file to set up PATH etc. ran it to set both PATH and REZ_PACKAGES_PATH accordingly
  • rez-bind errored out due to lockfile directory missing (seemed like a wrong use of tilde). Used --install-path to set target accordingly. Trying now, it seems to just work *scratches head*
  • as per the readme i tried to run rez-bind yielding an error that the platform family is missing
  • Googled and found out that some base packages need to be set up
  • Grabbed "repository" from the source dir.
  • Went into platform. Made a copy of the "linux" folder and named it "windows"
  • Edited package.py (replaced version = "linux" with version = "windows")
  • went into the windows folder and ran rez-build -i
  • CMake errors :
D:\_RESEARCH\rez\base_repository\platform\windows>rez-build -i

--------------------------------------------------------------------------------
Building platform-windows...
--------------------------------------------------------------------------------
Resolving build environment:
resolved by tkau...@host.lan , on Mon Apr 11 16:49:30 2016, using Rez v2.0.rc1.39

requested packages:
~platform==windows         (implicit)
~arch==AMD64               (implicit)
~os==windows-6.1.7601.SP1  (implicit)

resolved packages:

Invoking cmake build system...
Executing: c:\program files (x86)\cmake\bin\cmake.exe -d D:\_RESEARCH\rez\base_repository\platform\windows -Wno-dev -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE -D_ECLIPSE_VERSION=4.3 --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX=C:/Users/tkaufmann/AppData/Roaming/packages\platform\windows -DCMAKE_MODULE_PATH=%CMAKE_MODULE_PATH% -DCMAKE_BUILD_TYPE=Release -DREZ_BUILD_TYPE=local -DREZ_BUILD_INSTALL=1 -G NMake Makefiles
16:49:31 ERROR    Error detecting physical core count, defaulting to 1: invalid literal for int() with base 10: '8\r\r\n\r\r\n\r\r\nNumberOfCores'
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in :
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  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.


CMake Error in :
  The CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  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.


-- Configuring incomplete, errors occurred!
See also "D:/_RESEARCH/rez/base_repository/platform/windows/build/CMakeFiles/CMakeOutput.log".
See also "D:/_RESEARCH/rez/base_repository/platform/windows/build/CMakeFiles/CMakeError.log".
rez: BuildError: The cmake build system failed

D:\_RESEARCH\rez\base_repository\platform\windows>

I ran rez-build from a VS2015 x86 x64 Cross Tools Command Prompt. So i am unsure what to try next.

Thanks for any input in advance,
Thorsten

Allan Johns

unread,
Apr 11, 2016, 12:58:05 PM4/11/16
to rez-c...@googlegroups.com
Hey Thorsten, see below:

On Mon, Apr 11, 2016 at 7:52 AM, Thorsten Kaufmann <insti...@gmail.com> wrote:
Hi there,

so here i am after a long time getting back to evaluating rez. We are currently looking into the current state of rez and rez-like systems to chosse our future path.
From what i can tell there has been quite a lot of progress since i last played and there has been significant windows work especially. Which is our main platform.
While trying to get up to cruise speed i hit some walls pretty early and think i may be doing things wrong in the first place.

So here are a bunch of questions and issues:

1. Is there a quickstart for windows out there somewhere?

I have a rez-bind --quickstart option in the pip branch atm but I haven't been able to finish that off just yet. In any case all it does is rez-bind a set of necessary packages to get you started (platform, os, arch, python etc).
 
2. Are the docs at http://nerdvegas.github.io/rez/ uptodate? Are there any uptodate docs if not? It seems that targets yaml, while recent example seem to be python package files?

While still good for a lot of the general gist of things, and for the cmake/build stuff, these docs are quite old. I'm working on the new ones when I can (see github wiki) but it's slow going right now. The code itself is well documented though, and there's probably a good amount of info in the forum by now. There's also a tool - rez-yaml2py - that will convert a package.yaml for you.
 
3. It seems there are some people using rez on windows. How ready for primetime would you consider rez?

Windows specifics aside, I would say that Rez is very stable. My current studio (Method) rely on it 100% and very rarely do we come across bugs (in fact I can't recall the last time). Of course there are still features to be added but there isn't anything that's going to stop you from getting a lot out of it as of today.

Windows - issues do still come up, and I don't develop on it so I'm leaning on the other contributors to help on that platform. But I know that it is actively in use on Windows by some other studios. There are a couple of active PRs that address various Windows issues too.
You can also use rez-bind to create the platform etc packages. The purpose of rez-bind is to create packages that point at already installed software on the system. So a lot of times it's useful just to get up and running, but longer term you would want to be properly building and installing most packages. Platform is a special case, as it's not really software - the package is mostly just a stub that represents the platform. So you could just "rez-bind platform" instead.

I don't know much about the cmake error you get above, but it looks like a general cmake issue - cmake cannot find a c compiler. You will probably find that you have this error even if you try to use cmake outside of Rez. I would search for help on cmake as to why you'd be getting this issue, it may just be that you need to set CXX as the help states.
 

Thanks for any input in advance,
Thorsten

Hth,
A
 

--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.

Marcin Klusek

unread,
Apr 11, 2016, 1:17:11 PM4/11/16
to rez-config
I'm lately trying to setup rez on windows. I did some basic setup

re1
I besed on 
 - https://github.com/nerdvegas/rez/issues/291   (lots of explanation)
 - https://github.com/nerdvegas/rez/issues/233    (easy to fix little issue on windows )
 - http://nerdvegas.github.io/rez/   (old manual )
 - https://github.com/nerdvegas/rez/wiki   ( beginning of new manual )
 
re2
Exept those above I don't have any idea about others. Anyone ?  Current rez afaik can use both yaml and py packages but i think py is recommended now


re4

add rez to PATH env
set PATH=%PATH%;\\server\rez\Scripts\rez
configure REZ_DIFFTOOL
configure REZ_PACKAGES_PATH env 
set REZ_PACKAGES_PATH=\\server\tools\packages


my sample dir structure
-----------------------------------
\\server\tools\packages\
                       
\platform
                               
\linux\package.py
                               
\windows\package.py
                               
                       
\maya
                               
\2014\package.py
                                     
\platform-linux\maya.sh  (simple maya 2014 wrapper)
                                     \platform-windows\maya.bat
                               
\2016\package.py
                                     
\platform-linux\maya.sh  (simple maya 2014 wrapper)
                                     
\platform-windowsmaya.bat
                       
\mayatomr
                               
\3.11.1.13\package.py
                                         
\platform-linux\maya-2014\mentalRayFilesHere
                                         
\platform-windows\maya-2014\mentalRayFilesHere
                               
\3.13.1.2\package.py
                                         
\platform-linux\maya-2016\mentalRayFilesHere
                                         
\platform-windows\maya-2016\mentalRayFilesHere

platform-windows package
name = "platform"

version
= "windows"

authors
= [
   
"ajohns"
]

description
= \
   
"""
    Package representing the platform.
    """


uuid
= "repository.platform"

def commands():
    env
.PATH.append("justTestString")



maya-2014 package

name = "maya"


version
= "2014"


variants
= [
   
['platform-windows'],
   
['platform-linux'],
]


def commands():
    env
.PATH.append('{root}')


mentalray package (export only maya_module_path because of using mentalray.mod file)

name = "mayatomr"


version
= "3.13.1.2"


variants
= [
   
['platform-windows', 'maya-2016'],
   
['platform-linux'  , 'maya-2016'],
]


def commands():
    env
.MAYA_MODULE_PATH.append('{root}')
    env
.PATH.append('{root}')
   

Then by simply rez-env maya mayatomr rez gives you latest possible versions of packages .
Or you can use hyphen-separated names to use versions you want e.g
rez-env maya-2016 mayatomr   or    rez-env maya mayatomr==3.13.1.2

Hope that helps somehow.
Best

Sebastian Kral

unread,
Apr 11, 2016, 11:15:43 PM4/11/16
to rez-config
Hi Thorsten,

I went through the same adventure a couple of weeks ago. I committed all my Windows related fixes into this branch windows_ready

# Clone source and install rez into a location of your choice
cd rez_clone
python .\install.py <dest_dir>

# Add Scripts\rez to %PATH%
set PATH=<dest_dir>;%PATH%

# Create packages directory
mkdir %USERPROFILE%\packages

# Bind all necessary packages
rez-bind os
rez-bind arch
rez-bind platform
rez-bind target
rez-bind python

# Pseudo build cmake, msvc and pip
# Pseudo because you are not building the packages but unpacking the prebuilt stuff.
# This gives you the most basic cmake/msvc build environment that is needed to create rez packages from pip packages on Windows.

# Download cmake Windows ZIP
# Place it beside the rezbuild.py in here
cd rez_clone/repository/cmake
rez-build -i

# MSVC 9 is the only MSVC that comes as a standalone installer. All the newer builds are an addition to Visual Studio.
# I thought it might be handy to have one MSVC which is a standalone rez package instead of relying on MSVC being installed on every developers machine.
# I included a rez-bind msvc which I copied from holofermes. Which creates packages for higher versions which are installed on your local system.
# Download VCForPython27.msi
# Place it beside the rezbuild.py in here
cd rez_clone/repository/msvc
rez-build -i

# I included get-pip.py already in here so you only need to run rez-build to get the latest pip as a rez package.
cd rez_clone/repository/pip
rez-build -i

# A simple pip package to try and test the rez_pip_install cmake macro.
# Download ordereddict-1.1.tar.gz place it in here
cd rez_clone/repository/ordereddict
rez-build -i

# To test the new packages just invoke an environment with all of them
# Running all the following commands should work
rez-env msvc cmake python pip ordereddict
> cl
> cmake
> pip
> python
>>> import ordereddict

A couple of side notes:
- It's probably better to use CMake wherever you can, i.e. the rezbuild.py scripts I created for cmake and msvc. I am new to cmake and wanted to have something working as soon as possible, I will have to revisit these scripts again later.
- You can't move a rez installation because the virtual environment uses absolute paths to point to the Python used by rez (./Scripts/python.exe). The shebang line in ./Scripts/rez/rez.exe, etc. points to that python.exe. Installing rez is rather fast so I don't see a problem with that.
- We had some issues with releasing a package via git because rez is using a Linux specific Python package to help with that (i.e. "sh"). Issue #308. I worked around that by replacing sh with pbs but that was more of a prove of concept than a real fix, that's why I haven't committed it in the branch.

Hope that gets you up and running in no time.

Cheers,
Sebastian

Thorsten Kaufmann

unread,
Apr 12, 2016, 3:26:35 AM4/12/16
to rez-config
Thanks a lot everybody, that's a lot of very useful information!

I will need a bit to go through all that, so bear with if i am not replying right away. One  thing though @Allan rez-bind quickstart sounds really nice! I actually meant a quick start documentation though! Two birds with one stone. Thanks!

Cheers,
Thorsten

Thorsten Kaufmann

unread,
Apr 12, 2016, 4:30:03 AM4/12/16
to rez-config
So this helped a LOT. Thanks again. Few remarks:

  • The package directory that rez expects without setting it seems to be %APPDATA%\packages rather then %USERPROFILE%\packages
  • The pip package build failes if the sources are not on c:\ (or judging by the error not on the same drive as the target). I will definitely need to investigate that.
  • Minor: In the ordereddict sample i replaced the set(url) line with the following to make it work regardless of the source location: set(url "${CMAKE_CURRENT_SOURCE_DIR}/${name}-${version}.tar.gz")
I also have a first nuke plugin package up and running. Even though this is a grouped example that has all supported nuke versions in a single package. Next up: Variants :)

Cheers,
Thorsten




On Tuesday, April 12, 2016 at 5:15:43 AM UTC+2, Sebastian Kral wrote:

Thorsten Kaufmann

unread,
Apr 12, 2016, 4:39:23 AM4/12/16
to rez-config
Oh, one more thing:

"rez-bind python" requires admin priviledges

Sebastian Kral

unread,
Apr 12, 2016, 11:18:51 PM4/12/16
to rez-config
Thanks for sharing back your findings.

"${CMAKE_CURRENT_SOURCE_DIR}" that's a nice one.
Didn't stumble upon the other things but good to know for the future I am sure it will come in handy.
Reply all
Reply to author
Forward
0 new messages