rez 2 first package fail

1,131 views
Skip to first unread message

pauloc...@gmail.com

unread,
Dec 28, 2014, 12:05:48 PM12/28/14
to rez-c...@googlegroups.com

Hi Allan,

Just installed REZ 2.0 on OS X, along with make

I modified the rez/rezconfig file in reinstall folder to set target packages path  


packages_path:

- '~/packages'           # locally installed pkgs, not yet deployed

- '/myprods/packages/int'  # internally developed pkgs, deployed

- '/myprods/packages/ext'  # external (3rd party) pkgs, such as houdini, boost


then in my home I created a packages folder (thru the res-bind python, os, arch etc as explained in a previous post)

then i tried to create a package with a package.py and run into trouble

~/packages/test/0.0.1/package.py

and put this 


version = '0.0.1'

name = 'test'

requires = ['python']


when i run res-build, i get this

rez: BuildSystemError: No build system is associated with the path /Users/pochon/packages/test/0.0.1


thx

Paul



pauloc...@gmail.com

unread,
Dec 28, 2014, 12:07:30 PM12/28/14
to rez-c...@googlegroups.com
**read

Just installed REZ 2.0 on OS X, along with cmake

I modified the rez/rezconfig file in rez install folder to set target packages path 

Allan Johns

unread,
Dec 28, 2014, 12:55:03 PM12/28/14
to rez-c...@googlegroups.com
Hi Paul,

What you've done here is effectively created a package manually, and you've skipped the build step. You should find that you can 'rez-env test' already, and that will work.

You use rez-build to build a package from source. In this case, you have a package.yaml, some source files, and a build file (CMakeLists.txt, in the case of cmake). These are all in some working directory, which is not a Rez package path. You would then run 'rez-build -i', which would perform a cmake build, then install the package to ~/packages - the same location where you've made the package directly.

When I'm back in the office I'll add a 'getting started' section to the repo with a simple package that can be built with Rez-build. But in the meantime you could go ahead and try a simple cmake based build. Please note though, Rez hasn't been fully tested on OS X and you may run into bugs!

Please refer to the Rez 1 user manual to see how to write a cmake build file. Even though a lot of the finer details of this manual are out of date, I believe that the cmake examples are still relevant.

Hth,
Allan

--
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 http://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.

pauloc...@gmail.com

unread,
Dec 28, 2014, 9:37:44 PM12/28/14
to rez-c...@googlegroups.com
Hi Allan
I tried the rez-env with the manually built package and it worked.
then i tried to start from a package.yaml file and CMakeList.txt and was able to run rez-build -i
the tool incremented the version in my local packages.
Then it failed on rez-release with the same error message

21:29:31 WARNING  /Users/pochon/packages/test/0.0.2/package.yaml: package is using old-style commands.

rez: BuildSystemError: No build system is associated with the path /Users/pochon/packages/test/0.0.2

Any idea ?
Thx in advance
Paul

Allan Johns

unread,
Dec 28, 2014, 10:10:42 PM12/28/14
to rez-c...@googlegroups.com
You are missing a build file. Cmake expects a 'CMakeLists.txt', not 'CMakeList.txt'.

Hth
A


On Sunday, December 28, 2014, <pauloc...@gmail.com> wrote:
--

Allan Johns

unread,
Dec 28, 2014, 10:12:52 PM12/28/14
to rez-c...@googlegroups.com
Also, Rez-build will not increment the package version for you, this must have been done manually. This is deliberate - the type of version increment is important and cannot be automated. It is up to a developer to termine if a patch, minor, major or other update has occurred, and what that means.

Thx
A

allan.johns

unread,
Jan 6, 2015, 12:18:58 PM1/6/15
to rez-c...@googlegroups.com
Hi Paul,

As per a previous message, please see here for a full example of a simply python-based rez package that can be built and installed from source:

https://github.com/nerdvegas/rez/tree/resources2/src/projects/hello_world

Hth,
A




On Sunday, December 28, 2014 7:12:52 PM UTC-8, allan.johns wrote:
Also, Rez-build will not increment the package version for you, this must have been done manually. This is deliberate - the type of version increment is important and cannot be automated. It is up to a developer to termine if a patch, minor, major or other update has occurred, and what that means.

Thx
A


On Sunday, December 28, 2014, Allan Johns <nerd...@gmail.com> wrote:
You are missing a build file. Cmake expects a 'CMakeLists.txt', not 'CMakeList.txt'.

Hth
A

On Sunday, December 28, 2014, <pauloc...@gmail.com> wrote:
Hi Allan
I tried the rez-env with the manually built package and it worked.
then i tried to start from a package.yaml file and CMakeList.txt and was able to run rez-build -i
the tool incremented the version in my local packages.
Then it failed on rez-release with the same error message

21:29:31 WARNING  /Users/pochon/packages/test/0.0.2/package.yaml: package is using old-style commands.

rez: BuildSystemError: No build system is associated with the path /Users/pochon/packages/test/0.0.2

Any idea ?
Thx in advance
Paul

--
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+unsubscribe@googlegroups.com.

Paul Ochon

unread,
Mar 7, 2015, 2:33:04 PM3/7/15
to rez-c...@googlegroups.com
Thx Allan
I am back on rez
i got rez (ressources2 branch ) installed (python2.7 setup.py install ) on the raspberry Pi 2  raspbian ;))
i got cmake installed too
i got the hello_world app deployed (and did a package python pointing on my legacy python)
was able to rez on the hello_world package
was also able to tweak the hello_world package and do a rez release (it worked) . I tweak the plugins config  to set allow_no_upstream to true (just testing so no need of version control)

Just to let u know I am super happy with rez ;))

just few questions :
1- rez 2.0 vs resources2 (which branch better to clone ? i took the later for testing)
2- also since I set the flag allow_no_upstream to true, i got an error message (no consequence for the relase) "Error retrieving fetch url: 'Nonetype has no attribute split'" of course. Just wonder if this error could prevent a bash script from doing the rez release.
3- During the rez release , saw cmake doing stuff, so not sure what rez-build is doing compared to rez release ?
4- saw a bez bin, what is it for, how to use it ?
5- last, all the rez python stuff has been installed to /usr/local/lib/python2.7/dist-packages/rez-2.0.BETA.....egg/ , just wonder if it could be possible to move this in a more common place than python2.7/dist-packages. Could i set the destination path at install , like python setup.py install my/path (did not try that yet)
thus not attached to a particular python version. and if yes, do i have to set a PYTHONPATH for that

Thx again 
Paul

Paul Ochon

unread,
Mar 7, 2015, 7:31:24 PM3/7/15
to rez-c...@googlegroups.com
ok self answered point 5-
with python install.py -v <destdir>

Mark Streatfield

unread,
Mar 8, 2015, 7:06:11 PM3/8/15
to rez-c...@googlegroups.com
Hi Paul,

3- During the rez release , saw cmake doing stuff, so not sure what rez-build is doing compared to rez release ?

The intended workflow is to use rez build for locally development, build and testing, and rez release when it comes to the final build.  Under the hood, both are calling the equivalent of 'cmake; make; make install'.  The main differences are:

* the install prefix: with rez build this is your local packages path (or path given with --prefix).  With rez release this is the release packages path (see rezconfig for where these are defined).
* vcs validation: rez release performs vcs validation to check for uncommitted work, the branch name etc, as well as creating a tag with the name package name-version.

Given these differences, rez release also doesn't know if rez build has already been run/completed successfully.  Therefore it triggers it's own build to ensure all the targets are up-to-date and build any that might be missing. 

4- saw a bez bin, what is it for, how to use it ?

Bez is a custom, alternative build system that was created primarily for unit testing.  This allows us to unit test the build/release components of rez without needing cmake installed.  

That said it is possible to use bez instead of cmake for some very simple cases (e.g. just copying files, no compilation).  I think others have done this.

Mark.


To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.

Paul Ochon

unread,
Mar 8, 2015, 8:12:20 PM3/8/15
to rez-c...@googlegroups.com
Thx Mark for Helping

I played a bit with the build but failed to do a simple wrapper around your hello_word packages. I am not sure it s me or the version 2.0 not up to date on this subject.
i have this CMakeLists.txt
>>>
cmake_minimum_required(VERSION 2.8)

# You must include this line
include(RezBuild)
include(RezInstallWrappers)

rez_install_wrappers(
    hello_wrapper_wrapper
    hello_wrapper.context
    hello_wrapper
    PACKAGES
      hello_world
    WRAPPERS
      test:hello
    DESTINATION .
)
<<<

when running rez build, get this error

--------------------------------------------------------------------------------
Building hello_wrapper...
--------------------------------------------------------------------------------
Resolving build environment: 
resolved by pi@raspberrypi, on Mon Mar 09 00:00:25 2015, using Rez v2.0.BETA.30

requested packages:
~platform==linux  (implicit)
~arch==armv7l     (implicit)
~os==debian-7.8   (implicit)

resolved packages:

Invoking cmake build system...
Executing: /usr/bin/cmake -d /home/pi/datas/hello_wrapper/dev -DCMAKE_SKIP_RPATH=1 -DCMAKE_INSTALL_PREFIX=/home/pi/datas/build/hello_wrapper -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DCMAKE_BUILD_TYPE=Release -DREZ_BUILD_TYPE=local -G Unix Makefiles
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_SKIP_RPATH
    REZ_BUILD_TYPE


-- Build files have been written to: /home/pi/datas/hello_wrapper/dev/build

Executing: make
Scanning dependencies of target hello_wrapper_wrapper
[ 50%] Building wrapper script ./test
cat: /template/wrapper.sh: No such file or directory
[ 50%] Built target hello_wrapper_wrapper
Scanning dependencies of target hello_wrapper_wrapper-context
[100%] Building context file ./hello_wrapper.context for package request:  hello_world
usage: rez [-h] [-i] [-V] [-v] COMMAND ...
rez: error: unrecognized arguments: --print-env --no-path-append --wrapper --mode=latest --meta-info=tools --meta-info-shallow=tools --dot-file=./hello_wrapper.context.dot
CMakeFiles/hello_wrapper_wrapper-context.dir/build.make:52: recipe for target 'hello_wrapper.context' failed
make[2]: *** [hello_wrapper.context] Error 2
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/hello_wrapper_wrapper-context.dir/all' failed
make[1]: *** [CMakeFiles/hello_wrapper_wrapper-context.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2
rez: BuildError: The cmake build system failed


Any idea ?

Allan Johns

unread,
Mar 8, 2015, 11:10:31 PM3/8/15
to rez-c...@googlegroups.com
Hi Paul,

rez_install_wrappers is very old and does not exist in Rez-2. You must be referring to the user manual, which is *way* out of date. I have not had a chance to write the new documentation, which is a fairly big job at this point.

Rez-2 has something called "suites" which replace Rez-1's wrappers.

You can resolve an environment and store it into a rez 'context' file (.rxt):

]$ rez-env hello_world -o test.rxt

This file now stores the resolve. You can run a command inside of it like so:

]$ rez-env -i test.rxt -- hello_world

Once you've created rxt files, you can store them into a "suite" (see the 'rez-suite' tool -h for help). A suite is stored under a directory - a 'bin' subdirectory will be created within this dir. After you add an rxt file to your suite, all you need to to is add your suite's ./bin dir to PATH, and voila, you can run any tool from your suite. The tool's environment is loaded when the tool is run.

Let me know if you have any problems. And apologies for the dated state of documentation. Something I'd love to fix but am very busy on another project right now unfortunately.

Thx
Allan





Reply all
Reply to author
Forward
0 new messages