Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to SPI custom build scripts, versioning/disting policy changes #2313

Merged
merged 1 commit into from
Aug 19, 2019

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Aug 15, 2019

This mostly concerns builds at SPI, but a tiny bit touches the generic
build scripts. Most of you will want to tune out now, unless you're
especially curious.

Changes for everybody:

  • Switching to a 4-part formal version number (e.g. 2.1.3.0), so there
    is an additional (rarely used) CMake variable
    OPENIMAGEIO_VERSION_TWEAK. This gives me a little more flexibility
    with certain tags and releases in the master branch but there are
    very few contexts in which anybody will care about or refer to the
    last tweak number, and in practice we may rarely or never use it.

  • New CMake option OIIO_NAMESPACE_INCLUDE_PATCH, if turned on, will
    make the "inner namespace" include the patch number (such as
    namespace OpenImageIO_v2_1_3), whereas the default is the usual
    major/minor (OpenImageIO_v2_1). In general, for external/supported
    releases, we want just major/minor, since within a major/minor
    family we guarantee link compatibility and specifically DON'T want
    to force a recompile for patch updates only. But for studios like
    ours who build for production directly from master, link
    compatibility is not guaranteed at any time, so we make sure even
    down to the patch level is carefully namespaced.

Changes that only have an effect if you're building at SPI:

  • The default build (regular old "make") now uses the generic
    default namespace. If you want to make the special namespaced
    version we use for Arnold, build with make OIIO_ARNOLD=1.

  • Change SpComp2 versioning from consecutive low integer SpComp2
    versions (like v47, v48) to canonical multidigit numbers
    corresponding to external releases, such as v20101 for OIIO 2.1.1.
    Also install the bins in the same place (even though it's
    nonstandard SpComp2 practice).

  • A new build mode enabled by make OIIO_SPIREZ=1 does the kind of
    build we want for an experimental Rez packaging. Some notable details
    and options:

    • REZ_PACKAGE_ROOT=path overrides the usual root area where we
      store the packages.
    • OIIO_REZ_NAME=name overrides the default package name for the
      Rez distribution (default is "OpenImageIO").
    • An appropriate package.py is automatically generated.
    • The Rez variants fold in the SPI compiler compatibility platform,
      Python major/minor version, and Boost version.
    • The build automatically sets the Rpath for the Rez install area
      so that nobody needs to mess with their LD_LIBRARY_PATH to get
      the libraries to be found (especially if you're just importing the
      Python module).

@lgritz
Copy link
Collaborator Author

lgritz commented Aug 15, 2019

Would love comments/review, @jware-vc

Copy link

@jware-vc jware-vc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

site/spi/Makefile-bits Outdated Show resolved Hide resolved
site/spi/Makefile-bits Show resolved Hide resolved

# Uncomment if you have executables under bin/
env.PATH.append("{root}/bin")
env.LD_LIBRARY_PATH.append("{root}/lib")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are properly building the rpath into the so's, i think we can comment or remove this line.

@lgritz
Copy link
Collaborator Author

lgritz commented Aug 19, 2019

I've updated again. Addressed some of Jon's comments. Also a little cleanup, addition of generating the bit of xml that makes appcfg understand where it lives (we will no longer update the appwrapped command line version as part of the Arnold build), and addition of a README-SPI.md that spells it all out in case somebody needs to do it other than me.

This mostly concerns builds at SPI, but a tiny bit touches the generic
build scripts. Most of you will want to tune out now, unless you're
especially curious.

Changes for everybody:

* Switching to a 4-part formal version number (e.g. 2.1.3.0), so there
  is an additional (rarely used) CMake variable
  OPENIMAGEIO_VERSION_TWEAK. This gives me a little more flexibility
  with certain tags and releases in the master branch but there are
  very few contexts in which anybody will care about or refer to the
  last tweak number, and in practice we may rarely or never use it.

* New CMake option `OIIO_NAMESPACE_INCLUDE_PATCH`, if turned on, will
  make the "inner namespace" include the patch number (such as
  namespace OpenImageIO_v2_1_3), whereas the default is the usual
  major/minor (OpenImageIO_v2_1). In general, for external/supported
  releases, we want just major/minor, since within a major/minor
  family we guarantee link compatibility and specifically DON'T want
  to force a recompile for patch updates only. But for studios like
  ours who build for production directly from master, link
  compatibility is not guaranteed at any time, so we make sure even
  down to the patch level is carefully namespaced.

Changes that only have an effect if you're building at SPI:

* The *default* build (regular old "make") now uses the generic
  default namespace. If you want to make the special namespaced
  version we use for Arnold, build with `make OIIO_ARNOLD=1`.

* Change SpComp2 versioning from consecutive low integer SpComp2
  versions (like v47, v48) to canonical multidigit numbers
  corresponding to external releases, such as v20101 for OIIO 2.1.1.
  Also install the bins in the same place (even though it's
  nonstandard SpComp2 practice).

* A new build mode enabled by `make OIIO_SPIREZ=1` does the kind of
  build we want for an experimental Rez packaging. Some notable details
  and options:

    - `REZ_PACKAGE_ROOT=path` overrides the usual root area where we
      store the packages.
    - `OIIO_REZ_NAME=name` overrides the default package name for the
      Rez distribution (default is "OpenImageIO").
    - An appropriate package.py is automatically generated.
    - The Rez variants fold in the SPI compiler compatibility platform,
      Python major/minor version, and Boost version.
    - The build automatically sets the Rpath for the Rez install area
      so that nobody needs to mess with their LD_LIBRARY_PATH to get
      the libraries to be found (especially if you're just importing the
      Python module).

* Make the appcfg xml for releasing the binaries to the facility.

* Instructions for building for the facility are now in
  site/spi/README-SPI.md
@lgritz lgritz merged commit 0c386b5 into AcademySoftwareFoundation:master Aug 19, 2019
@lgritz lgritz deleted the lg-spi branch August 19, 2019 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants