Library changes for Blender 3.5 #99618

Closed
opened 2022-07-11 20:55:16 +02:00 by Ray molenkamp · 85 comments
Member

Here is the list of all changes to our libraries for the Blender 3.5 release.

Summary

  • Update library versions to VFX platform 2023
  • Switch from static to shared for various libraries (OpenVDB, USD, TBB, Boost, OIIO, OCIO, OpenEXR, Imath)
  • Python bindings for OpenVDB, USD, OIIO, OCIO
  • 2 new libraries Harfbuzz + Fribidi to support the UI's team efforts for better font/text support in blender
  • new library MaterialX
  • Upgrade libspnav from v0.2.3 to v1.1.0
  • #102440 (Rocky Linux 8 builder for VFX platform 2023)

Preliminary Libraries

New Libraries

  • ShaderC v2022.3

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 25e28f518c
  • Vulkan Loader v1.2.198

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 25e28f518c
  • Harfbuzz 5.1.0 (support for bidirectional text, Requested by UI team)

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 25e28f518c
  • Fribidi v1.0.12 (support for bidirectional text, Requested by UI team)

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 25e28f518c
  • meson 0.63 pip module (build time dep required for Fribidi/Harfbuzz, standalone meson will not suffice on windows due to missing python)

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps scriptN/A, we only use distro packages for fribidi/harfbuzz.
  • matarialX 1.38.6

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script b099e9924e
  • pybind11 (buildtime dep for ocio/oiio/materialx)

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows (NA, build time only)
      • Linux (NA, build time only)
      • macOS Intel (NA, build time only)
      • macOS Arm (NA, build time only)
    • Update install_deps script a318f3b8d6

Updated Libraries

  • OpenImageIO 2.4.9.0 (updated from 2.4.6.0)

    • Update CMake deps builder (#105958) (388bbc3290)
    • Add Package file to SVN {rBL63297} {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63302}
      • Linux {rBL63306}
      • macOS Intel {rBL63296}
      • macOS Arm {rBL63296}
    • Update install_deps script (#105958) 9e332b113b, a318f3b8d6
  • OpenVDB 10.0.0

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 9e332b113b, a318f3b8d6
  • Boost 1.80.0

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 6347562fb, a318f3b8d6
  • Python 3.10.9

    • Update CMake deps builder 3494ba3815
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 6347562fb, a318f3b8d6
  • Numpy 1.23.5

    • Update CMake deps builder bcbd13201a
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 6347562fb
  • OpenSubDiv 3.5.0

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 9e332b113b
  • OpenColorIO 2.2.0

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 9e332b113b, a318f3b8d6
  • OSL 1.13-dev-1a7670600c8b08c2443a78d03c8c27e9a1149140

    • Update CMake deps builder 31ba4dd82e
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63147}
      • Linux {rBL63154}
      • macOS Intel {rBL63162}
      • macOS Arm {rBL63162}
    • Update install_deps script 4e027fdde6, 9cef74f58b
  • llvm 12.0.0 (no version change, but rebuild with NVPTX support for OSL/GPU support)

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN -NA - rebuild only
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 9cef74f58b
  • Yaml-cpp 0.7.0

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script N/A, using distro packages
  • SQLite 3.39.4

    • Update CMake deps builder bcbd13201a
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script N/A, using distro packages
  • USD 22.11

    • Update CMake deps builder 388bbc3290
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows {rBL63144}
      • Linux {rBL63154}
      • macOS Intel
      • macOS Arm
    • Update install_deps script 4e027fdde6, a318f3b8d6
  • SPNAV 1.1

    • Update CMake deps builder 396816faac
    • Add Package file to SVN {rBL63160}
    • Add precompiled libraries
      • Windows (N/A)
      • Linux {rBL63154}
      • macOS Intel (N/A)
      • macOS Arm (N/A)
    • Update install_deps script N/A, using distro packages
  • IGC 1.0.13064.7

  • gmmlib 22.3.0

  • ocloc 22.49.25018.21

Here is the list of all changes to our libraries for the Blender 3.5 release. ### Summary * Update library versions to [VFX platform 2023 ](https://vfxplatform.com) * Switch from static to shared for various libraries (OpenVDB, USD, TBB, Boost, OIIO, OCIO, OpenEXR, Imath) * Python bindings for OpenVDB, USD, OIIO, OCIO * 2 new libraries Harfbuzz + Fribidi to support the UI's team efforts for better font/text support in blender * new library MaterialX * Upgrade libspnav from v0.2.3 to v1.1.0 * #102440 (Rocky Linux 8 builder for VFX platform 2023) ### Preliminary Libraries ### New Libraries - [x] ShaderC v2022.3 - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 25e28f518c - [x] Vulkan Loader v1.2.198 - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 25e28f518c - [x] Harfbuzz 5.1.0 (support for bidirectional text, Requested by UI team) - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 25e28f518c - [x] Fribidi v1.0.12 (support for bidirectional text, Requested by UI team) - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 25e28f518c - [x] meson 0.63 pip module (build time dep required for Fribidi/Harfbuzz, standalone meson will not suffice on windows due to missing python) - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] ~~Update `install_deps` script~~N/A, we only use distro packages for fribidi/harfbuzz. - [x] matarialX 1.38.6 - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script b099e9924e - [x] pybind11 (buildtime dep for ocio/oiio/materialx) - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows (NA, build time only) - [x] Linux (NA, build time only) - [x] macOS Intel (NA, build time only) - [x] macOS Arm (NA, build time only) - [x] Update `install_deps` script a318f3b8d6 ### Updated Libraries - [x] OpenImageIO 2.4.9.0 (updated from 2.4.6.0) - [x] Update CMake deps builder (#105958) ~~(388bbc3290)~~ - [x] Add Package file to SVN {rBL63297} ~~{rBL63160}~~ - [x] Add precompiled libraries - [x] Windows {rBL63302} - [x] Linux {rBL63306} - [x] macOS Intel {rBL63296} - [x] macOS Arm {rBL63296} - [x] Update `install_deps` script (#105958) ~~9e332b113b, a318f3b8d6~~ - [x] OpenVDB 10.0.0 - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 9e332b113b, a318f3b8d6 - [x] Boost 1.80.0 - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 6347562fb, a318f3b8d6 - [x] Python 3.10.9 - [x] Update CMake deps builder 3494ba3815 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 6347562fb, a318f3b8d6 - [x] Numpy 1.23.5 - [x] Update CMake deps builder bcbd13201a - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 6347562fb - [x] OpenSubDiv 3.5.0 - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 9e332b113b - [x] OpenColorIO 2.2.0 - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 9e332b113b, a318f3b8d6 - [x] OSL 1.13-dev-1a7670600c8b08c2443a78d03c8c27e9a1149140 - [x] Update CMake deps builder 31ba4dd82e - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63147} - [x] Linux {rBL63154} - [x] macOS Intel {rBL63162} - [x] macOS Arm {rBL63162} - [x] Update `install_deps` script 4e027fdde6, 9cef74f58b - [x] llvm 12.0.0 (no version change, but rebuild with NVPTX support for OSL/GPU support) - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN -NA - rebuild only - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 9cef74f58b - [x] Yaml-cpp 0.7.0 - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] ~~Update `install_deps` script~~ N/A, using distro packages - [x] SQLite 3.39.4 - [x] Update CMake deps builder bcbd13201a - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] ~~Update `install_deps` script~~ N/A, using distro packages - [x] USD 22.11 - [x] Update CMake deps builder 388bbc3290 - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows {rBL63144} - [x] Linux {rBL63154} - [x] macOS Intel - [x] macOS Arm - [x] Update `install_deps` script 4e027fdde6, a318f3b8d6 - [x] SPNAV 1.1 - [x] Update CMake deps builder 396816faac - [x] Add Package file to SVN {rBL63160} - [x] Add precompiled libraries - [x] Windows (N/A) - [x] Linux {rBL63154} - [x] macOS Intel (N/A) - [x] macOS Arm (N/A) - [x] ~~Update `install_deps` script~~ N/A, using distro packages - [x] IGC 1.0.13064.7 - [x] Update CMake deps builder [D16984: Cycles: update Intel Graphics compiler to driver 101.4032](https://archive.blender.org/developer/D16984) - [x] Add Package file to SVN {rBL63288} - [x] Add precompiled libraries - [x] Windows - N/A Linux only - [x] Linux - [x] macOS Intel - N/A Linux only - [x] macOS Arm - N/A Linux only - [x] Update `install_deps` script (N/A) - [x] gmmlib 22.3.0 - [x] Update CMake deps builder [D16984: Cycles: update Intel Graphics compiler to driver 101.4032](https://archive.blender.org/developer/D16984) - [x] Add Package file to SVN {rBL63288} - [x] Add precompiled libraries - [x] Windows - N/A Linux only - [x] Linux - [x] macOS Intel - N/A Linux only - [x] macOS Arm - N/A Linux only - [x] Update `install_deps` script (N/A) - [x] ocloc 22.49.25018.21 - [x] Update CMake deps builder [D16984: Cycles: update Intel Graphics compiler to driver 101.4032](https://archive.blender.org/developer/D16984) - [x] Add Package file to SVN {rBL63288} - [x] Add precompiled libraries - [x] Windows - N/A Linux only , uses binary on the build bots - [x] Linux - [x] macOS Intel - N/A Linux only - [x] macOS Arm - N/A Linux only - [x] Update `install_deps` script (N/A)
Ray molenkamp self-assigned this 2022-07-11 20:55:16 +02:00
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscribers: @LazyDodo, @brecht, @dr.sybren

Added subscribers: @LazyDodo, @brecht, @dr.sybren

I committed changes tmp_libupdate_34 branch. See commit logs for details. There were many more issues to solve that I expected, and still some remain.

Notes:

  • Two things to check for Windows:
    Meson is probably being bundled in Blender site packages? I filtered it out for Linux/macOS. I modified the Python executable rpath so it can successfully do from pxr import Usd and import pyopenvdb outside of Blender. I'm not sure how Windows would handle this. I also had to workaround the static Python library getting embedded into the USD library leading to duplicate Python interpreter symbols that caused issues for this case.
  • USD: for complete Hydra viewport we probably need OpenGL and OpenColorIO support, but both have issues as noted in usd.cmake. I'm inclined to leave them out of this iteration.
  • I have not checked install deps, WITH_PYTHON_MODULE or separate build and install folders as on buildbot.
  • I disabled static libstdc++ linking since it's not practical with shared libraries. Hopefully we don't need it anymore but we'll have to find out.
  • There is code missing to install USD and OpenVDB python modules when building with system libraries, which gets complicated. To be honest I'm not sure what the purpose is of WITH_PYTHON_INSTALL when building against system libraries.
I committed changes `tmp_libupdate_34` branch. See commit logs for details. There were many more issues to solve that I expected, and still some remain. Notes: * Two things to check for Windows: **Meson is probably being bundled in Blender site packages? I filtered it out for Linux/macOS.** I modified the Python executable rpath so it can successfully do `from pxr import Usd` and `import pyopenvdb` outside of Blender. I'm not sure how Windows would handle this. I also had to workaround the static Python library getting embedded into the USD library leading to duplicate Python interpreter symbols that caused issues for this case. * USD: for complete Hydra viewport we probably need OpenGL and OpenColorIO support, but both have issues as noted in usd.cmake. I'm inclined to leave them out of this iteration. * I have not checked install deps, `WITH_PYTHON_MODULE` or separate build and install folders as on buildbot. * I disabled static libstdc++ linking since it's not practical with shared libraries. Hopefully we don't need it anymore but we'll have to find out. * There is code missing to install USD and OpenVDB python modules when building with system libraries, which gets complicated. To be honest I'm not sure what the purpose is of `WITH_PYTHON_INSTALL` when building against system libraries.
Author
Member

In #99618#1404702, @brecht wrote:
Notes:

  • Two things to check for Windows:
    ** Meson is probably being bundled in Blender site packages? I filtered it out for Linux/macOS.

it is, there's really no neat way around that, i initially used standalone meson for libepoxy but standalone misses the python components and either harfbuzz or fridibi really wants to run some python, I don't have python in my path since deps will try to use and build/link against a version we don't want (cmake's findpython is ruthless, if there's a trace of python... it will find it...). Putting meson in at least the build version of python was needed , should probably be filtered out for shipping.

** I modified the Python executable rpath so it can successfully do from pxr import Usd and import pyopenvdb outside of Blender. I'm not sure how Windows would handle this. I also had to workaround the static Python library getting embedded into the USD library leading to duplicate Python interpreter symbols that caused issues for this case.

I have not tested importing from the python.exe we ship with blender, a quick test confirmed it to be failing, will add to my todo list

Static python is luckily not a thing on windows, so whatever bit you there won't be an issue on windows.

  • USD: for complete Hydra viewport we probably need OpenGL and OpenColorIO support, but both have issues as noted in usd.cmake. I'm inclined to leave them out of this iteration.

seems fair enough, some OCIO v2 support has been merged, but i'm not entirely sure what release that'll be in, and there's unmerged fixes on top of that to make mac happy, it just doesn't seem quite ready yet.

  • blender_test is failing to run on Linux.
    ** We set this executable's runpath to include all the original lib folders so no install step is required. This works fine for direct dependencies, but for indirect dependencies it fails. For example boost libraries used by openvdb will only be searched for in the directory where the openvdb library is located.

How important is the no-install scenario? does it work when you do install? At-least on windows install is required for any test involving blender.exe to pass

  • I have not checked install deps, WITH_PYTHON_MODULE or separate build and install folders as on buildbot.

We probably at one point need to sit down with the python team and discuss WITH_PYTHON_MODULE there's no official support for it, yet every-time anyone tries to build it runs into trouble, the platform team still sinks in hours helping them since telling people to go pound sand is just not something we do. We as a group need to either step up and support and CI it or shoot it in the face, this limbo state is not working for me.

> In #99618#1404702, @brecht wrote: > Notes: > * Two things to check for Windows: > ** Meson is probably being bundled in Blender site packages? I filtered it out for Linux/macOS. it is, there's really no neat way around that, i initially used standalone meson for libepoxy but standalone misses the python components and either harfbuzz or fridibi really wants to run some python, I don't have python in my path since deps will try to use and build/link against a version we don't want (cmake's findpython is ruthless, if there's a trace of python... it will find it...). Putting meson in at least the build version of python was needed , should probably be filtered out for shipping. > ** I modified the Python executable rpath so it can successfully do `from pxr import Usd` and `import pyopenvdb` outside of Blender. I'm not sure how Windows would handle this. I also had to workaround the static Python library getting embedded into the USD library leading to duplicate Python interpreter symbols that caused issues for this case. I have not tested importing from the python.exe we ship with blender, a quick test confirmed it to be failing, will add to my todo list Static python is luckily not a thing on windows, so whatever bit you there won't be an issue on windows. > * USD: for complete Hydra viewport we probably need OpenGL and OpenColorIO support, but both have issues as noted in usd.cmake. I'm inclined to leave them out of this iteration. seems fair enough, some OCIO v2 support has been merged, but i'm not entirely sure what release that'll be in, and there's [unmerged fixes](https://github.com/PixarAnimationStudios/USD/pull/1936) on top of that to make mac happy, it just doesn't seem quite ready yet. > * `blender_test` is failing to run on Linux. > ** We set this executable's runpath to include all the original lib folders so no install step is required. This works fine for direct dependencies, but for indirect dependencies it fails. For example boost libraries used by openvdb will only be searched for in the directory where the openvdb library is located. How important is the no-install scenario? does it work when you do install? At-least on windows install is required for any test involving blender.exe to pass > * I have not checked install deps, `WITH_PYTHON_MODULE` or separate build and install folders as on buildbot. We probably at one point need to sit down with the python team and discuss `WITH_PYTHON_MODULE` there's no official support for it, yet every-time anyone tries to build it runs into trouble, the platform team still sinks in hours helping them since telling people to go pound sand is just not something we do. We as a group need to either step up and support and CI it or shoot it in the face, this limbo state is not working for me.

How important is the no-install scenario? does it work when you do install? At-least on windows install is required for any test involving blender.exe to pass

I just thought of a workaround and committed it, so hopefully that holds up.

The issue is not really a no-install case, but that some executables that are run as part of the build process need these libraries, so they need to be available before the install step. Though probably I can avoid linking to these libraries and simplify things further.

We probably at one point need to sit down with the python team and discuss WITH_PYTHON_MODULE there's no official support for it, yet every-time anyone tries to build it runs into trouble, the platform team still sinks in hours helping them since telling people to go pound sand is just not something we do. We as a group need to either step up and support and CI it or shoot it in the face, this limbo state is not working for me.

Agreed.

> How important is the no-install scenario? does it work when you do install? At-least on windows install is required for any test involving blender.exe to pass I just thought of a workaround and committed it, so hopefully that holds up. The issue is not really a no-install case, but that some executables that are run as part of the build process need these libraries, so they need to be available before the install step. Though probably I can avoid linking to these libraries and simplify things further. > We probably at one point need to sit down with the python team and discuss WITH_PYTHON_MODULE there's no official support for it, yet every-time anyone tries to build it runs into trouble, the platform team still sinks in hours helping them since telling people to go pound sand is just not something we do. We as a group need to either step up and support and CI it or shoot it in the face, this limbo state is not working for me. Agreed.
Author
Member

I have not tested importing from the python.exe we ship with blender, a quick test confirmed it to be failing, will add to my todo list

This one is tricky, i can get it to work if i run os.add_dll_directory(os.getcwd()) (when run from the blender bin folder) before import pyopenvdb as the path and current directory are no longer used by python.

not entirely sure what we can do to make it work out of the box, maybe symlink the dlls into pythons dll folder will work but that feels hacky and will fail on FAT32 volumes....doesn't feel like the way to go

> I have not tested importing from the python.exe we ship with blender, a quick test confirmed it to be failing, will add to my todo list This one is tricky, i can get it to work if i run `os.add_dll_directory(os.getcwd())` (when run from the blender bin folder) before `import pyopenvdb` as the [path and current directory](https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew) are no longer used by python. not entirely sure what we can do to make it work out of the box, maybe symlink the dlls into pythons dll folder will work but that feels hacky and will fail on FAT32 volumes....doesn't feel like the way to go

Maybe a patch like this (untested)?

Index: python/lib/python3.10/site.py
===================================================================
--- python/lib/python3.10/site.py	(revision 63003)
+++ python/lib/python3.10/site.py	(working copy)
@@ -611,6 +611,14 @@
     if ENABLE_USER_SITE:
         execusercustomize()
 
+    # Blender: make dlls needed by modules available in standalone Python exe
+    if sys.platform == 'win32':
+        exe_dir, exe_file = os.path.split(sys.executable)
+        if exe_file.startswith('python'):
+            blender_dir = os.path.abspath(os.path.join(exe_dir, '..', '..', '..'))
+            os.add_dll_directory(blender_dir)
+
+
 - Prevent extending of sys.path when python was started with -S and
 - site is imported later.
 if not sys.flags.no_site:

It's not pretty but not sure what the better solution would be.

Maybe a patch like this (untested)? ``` Index: python/lib/python3.10/site.py =================================================================== --- python/lib/python3.10/site.py (revision 63003) +++ python/lib/python3.10/site.py (working copy) @@ -611,6 +611,14 @@ if ENABLE_USER_SITE: execusercustomize() + # Blender: make dlls needed by modules available in standalone Python exe + if sys.platform == 'win32': + exe_dir, exe_file = os.path.split(sys.executable) + if exe_file.startswith('python'): + blender_dir = os.path.abspath(os.path.join(exe_dir, '..', '..', '..')) + os.add_dll_directory(blender_dir) + + - Prevent extending of sys.path when python was started with -S and - site is imported later. if not sys.flags.no_site: ``` It's not pretty but not sure what the better solution would be.

I did some further changes:

  • Set rpath on Python module libs instead of Python executable, solving issues on Linux with indirect dependencies.
  • Fix the Python module and separate install folder work on Linux/macOS.
  • Keep Blender building with 3.3 libraries on Linux/macOS, to make landing this easier.

Testing the branch on the buildbot (so using the 3.3 libs), I noticed on Windows there's an error in the ffmpeg test:
https://builder.blender.org/admin/#/builders/57/builds/1465

I'm done with Linux/macOS unless new issues come up. I would like to land static libstdc++ and adding $ORIGIN/lib rpath as separate commits.

I did some further changes: * Set rpath on Python module libs instead of Python executable, solving issues on Linux with indirect dependencies. * Fix the Python module and separate install folder work on Linux/macOS. * Keep Blender building with 3.3 libraries on Linux/macOS, to make landing this easier. Testing the branch on the buildbot (so using the 3.3 libs), I noticed on Windows there's an error in the ffmpeg test: https://builder.blender.org/admin/#/builders/57/builds/1465 I'm done with Linux/macOS unless new issues come up. I would like to land static libstdc++ and adding $ORIGIN/lib rpath as separate commits.
Author
Member

I'll get ffmpeg test sorted out, somewhat odd : there's 2 tests named ffmpeg , we should probably rename one of them?

I'll get ffmpeg test sorted out, somewhat odd : there's 2 tests named `ffmpeg` , we should probably rename one of them?
Author
Member

I could not reproduce the issue locally, a bit on a hunch I stuck it into the blender_test executable hoping that would fix it, since that had no issues, and renamed it to ffmpeg_codecs while i was at it.

All platforms pass now with the 3.3 libs

https://builder.blender.org/admin/#/builders/57/builds/1467

I could not reproduce the issue locally, a bit on a hunch I stuck it into the blender_test executable hoping that would fix it, since that had no issues, and renamed it to ffmpeg_codecs while i was at it. All platforms pass now with the 3.3 libs https://builder.blender.org/admin/#/builders/57/builds/1467
Author
Member

In #99618#1405124, @brecht wrote:
Maybe a patch like this (untested)?
It's not pretty but not sure what the better solution would be.

That actually works (but... *1), while i was mucking about in site.py, I noticed some callback system in-place

if you place a usercustomize.py in the site-packages folder with the contents of your patch it also works, bonus we don't have to hack around in the stock site.py

*1 we internally hint USD to where it can find its metadata, while this fix lets you import Usd when you try to use it it'll shit the bed and crash python when it can't find it's files

import sys
import os
# Blender: make dlls needed by modules available in standalone Python exe
if sys.platform == 'win32':
    exe_dir, exe_file = os.path.split(sys.executable)
    if exe_file.startswith('python'):
        blender_dir = os.path.abspath(os.path.join(exe_dir, '..', '..', '..'))
        os.add_dll_directory(blender_dir)
        from pxr import Plug
        Plug.Registry().RegisterPlugins(os.path.abspath("k:\\BlenderGit\\2022_master_ninja\\bin\\3.4\\datafiles\\usd\\"))

using this as my usercustomize.py solves all issues and i can run HelloWorld.py from the python binary... but....yeah... that absolute path there.... i'm not entirely sure how to find the data folder from stock python... maybe we can generate this file from cmake which does know the major blender version?

i suspect Linux/Mac also need this.....

> In #99618#1405124, @brecht wrote: > Maybe a patch like this (untested)? > It's not pretty but not sure what the better solution would be. That actually works (but... *1), while i was mucking about in site.py, I noticed some callback system in-place if you place a `usercustomize.py` in the `site-packages` folder with the contents of your patch it also works, bonus we don't have to hack around in the stock site.py *1 we internally hint USD to where it can find its metadata, while this fix lets you import `Usd` when you try to use it it'll shit the bed and crash python when it can't find it's files ``` import sys import os # Blender: make dlls needed by modules available in standalone Python exe if sys.platform == 'win32': exe_dir, exe_file = os.path.split(sys.executable) if exe_file.startswith('python'): blender_dir = os.path.abspath(os.path.join(exe_dir, '..', '..', '..')) os.add_dll_directory(blender_dir) from pxr import Plug Plug.Registry().RegisterPlugins(os.path.abspath("k:\\BlenderGit\\2022_master_ninja\\bin\\3.4\\datafiles\\usd\\")) ``` using this as my usercustomize.py solves all issues and i can run [HelloWorld.py](https://raw.githubusercontent.com/PixarAnimationStudios/USD/release/extras/usd/tutorials/helloWorld/helloWorld.py) from the python binary... but....yeah... that absolute path there.... i'm not entirely sure how to find the data folder from stock python... maybe we can generate this file from cmake which does know the major blender version? i suspect Linux/Mac also need this.....

Indeed that needs to be solved for macOS and Linux too.

Finding the path is not so difficult, it can be done with os.abspath(os.path.join(exe_dir, '..', '..', 'datafiles', 'usd')). However it's not ideal to load the USD library every time Python starts.

It seems that by default USD looks for a usd folder next to the USD shared library (which is how it gets installed). So maybe it's easiest to just follow that layout and put the folder in lib/usd instead of 3.4/datafiles/usd.

Indeed that needs to be solved for macOS and Linux too. Finding the path is not so difficult, it can be done with `os.abspath(os.path.join(exe_dir, '..', '..', 'datafiles', 'usd'))`. However it's not ideal to load the USD library every time Python starts. It seems that by default USD looks for a `usd` folder next to the USD shared library (which is how it gets installed). So maybe it's easiest to just follow that layout and put the folder in `lib/usd` instead of `3.4/datafiles/usd`.
Author
Member

That was a choice by @dr.sybren i have honestly no opinion on it but he seemingly found it worth doing to the point of patching the USD library (no longer needed, but was when it landed) to get it done so i suspect he may have some strong feelings there.

i do have to note on windows it doesn't sit in /lib but right next to blender.exe since rpath isn't a thing on windows, we may be able to get it in /lib with a second manifest like we did for the CRT, it'll require some fiddling, but i think it's doable.

That was a choice by @dr.sybren i have honestly no opinion on it but he seemingly found it worth doing to the point of patching the USD library (no longer needed, but was when it landed) to get it done so i suspect he may have some strong feelings there. i do have to note on windows it doesn't sit in `/lib` but right next to `blender.exe` since rpath isn't a thing on windows, we may be able to get it in `/lib` with a second manifest like we did for the CRT, it'll require some fiddling, but i think it's doable.

From D6287#149291, it appears the reason was that we were statically linking USD and you can't have a usd folder next to the Blender binary in a macOS app bundle. But now that we have a shared library in another folder, that's not a problem anymore. So I think it's fine to change.

i do have to note on windows it doesn't sit in /lib but right next to blender.exe since rpath isn't a thing on windows, we may be able to get it in /lib with a second manifest like we did for the CRT, it'll require some fiddling, but i think it's doable.

It would be nice to put all our dlls in lib folder on Windows but not sure it's worth sinking much time in if it's complicated. I think a usd folder at the top level would be acceptable.

From [D6287](https://archive.blender.org/developer/D6287)#149291, it appears the reason was that we were statically linking USD and you can't have a `usd` folder next to the Blender binary in a macOS app bundle. But now that we have a shared library in another folder, that's not a problem anymore. So I think it's fine to change. > i do have to note on windows it doesn't sit in /lib but right next to blender.exe since rpath isn't a thing on windows, we may be able to get it in /lib with a second manifest like we did for the CRT, it'll require some fiddling, but i think it's doable. It would be nice to put all our dlls in lib folder on Windows but not sure it's worth sinking much time in if it's complicated. I think a `usd` folder at the top level would be acceptable.

This issue was referenced by a87d3edb98

This issue was referenced by a87d3edb9898bc6b285e5b3742566f6783ea6d92

Added subscriber: @BrianSavery

Added subscriber: @BrianSavery

@LazyDodo are you building the USD library with their "Shared Monolithic" method?

@LazyDodo are you building the USD library with their "Shared Monolithic" method?
Author
Member

Windows Only update:

  • All dll's are now in blender.shared folder (not married to the name, but it will have to be in the blender.[something] naming scheme. ) except ucrtbase.dll (#88813) and BlendThumb.dll (could move but we'll have to change the registration code to account for it)
  • The USD json now lives in blender.shared/usd so no more path hinting is required
  • A customsite.py will be installed to site-packages to tell python about our shared library folder. The source file for this is currently in release\scripts\usercustomize.py which i'm not super thrilled about, but couldn't find a more appropriate place, open to suggestions here
  • Both pyopenvdb and USD can be imported and used now from the python binary we ship
Windows Only update: - All dll's are now in `blender.shared` folder (not married to the name, but it will have to be in the `blender.[something]` naming scheme. ) *except* `ucrtbase.dll` (#88813) and `BlendThumb.dll` (could move but we'll have to change the registration code to account for it) - The USD json now lives in `blender.shared/usd` so no more path hinting is required - A `customsite.py` will be installed to site-packages to tell python about our shared library folder. The source file for this is currently in `release\scripts\usercustomize.py` which i'm not super thrilled about, but couldn't find a more appropriate place, open to suggestions here - Both pyopenvdb and USD can be imported and used now from the python binary we ship
Author
Member

Added subscriber: @ray-1

Added subscriber: @ray-1
Author
Member

@LazyDodo are you building the USD library with their "Shared Monolithic" method?

Correct, you can find the exact build flags we will use over here

> @LazyDodo are you building the USD library with their "Shared Monolithic" method? Correct, you can find the exact build flags we will use [over here](https://developer.blender.org/diffusion/B/browse/tmp_libupdate_34/build_files/build_environment/cmake/usd.cmake)
Author
Member

Removed subscriber: @ray-1

Removed subscriber: @ray-1

The main issue for #100569 is that we are building without OpenGL support currently. We could look into enabling that if Hydra support is going to be worked on soon.

The main issue for #100569 is that we are building without OpenGL support currently. We could look into enabling that if Hydra support is going to be worked on soon.

In #99618#1407203, @LazyDodo wrote:

  • A customsite.py will be installed to site-packages to tell python about our shared library folder. The source file for this is currently in release\scripts\usercustomize.py which i'm not super thrilled about, but couldn't find a more appropriate place, open to suggestions here

Maybe release/windows/python/usercustomize.py.

> In #99618#1407203, @LazyDodo wrote: > - A `customsite.py` will be installed to site-packages to tell python about our shared library folder. The source file for this is currently in `release\scripts\usercustomize.py` which i'm not super thrilled about, but couldn't find a more appropriate place, open to suggestions here Maybe `release/windows/python/usercustomize.py`.

In #99618#1407210, @brecht wrote:
The main issue for #100569 is that we are building without OpenGL support currently. We could look into enabling that if Hydra support is going to be worked on soon.

Indeed it is. It would likely be added for 3.5. You mean you're not building the "USD Imaging" module which builds hydra and the GL Storm delegate I think?

> In #99618#1407210, @brecht wrote: > The main issue for #100569 is that we are building without OpenGL support currently. We could look into enabling that if Hydra support is going to be worked on soon. Indeed it is. It would likely be added for 3.5. You mean you're not building the "USD Imaging" module which builds hydra and the GL Storm delegate I think?

It's building with USD imaging but PXR_ENABLE_GL_SUPPORT=OFF.

It's building with USD imaging but `PXR_ENABLE_GL_SUPPORT=OFF`.
Author
Member

think with this last round of changes my plate is empty lib wise, I can do the work, however I'm not very familiar with USD's internals, for broader support would we also need to build with PXR_ENABLE_VULKAN_SUPPORT and/or PXR_ENABLE_METAL_SUPPORT or will just GL cover us?

think with this last round of changes my plate is empty lib wise, I can do the work, however I'm not very familiar with USD's internals, for broader support would we also need to build with `PXR_ENABLE_VULKAN_SUPPORT` and/or `PXR_ENABLE_METAL_SUPPORT` or will just GL cover us?

PXR_ENABLE_GL_SUPPORT should be enough for Hydra right now, but if it doesn't interfere with anything I'll enable PXR_ENABLE_METAL_SUPPORT as well since work on a Metal backend is ongoing.

PXR_ENABLE_VULKAN_SUPPORT I don't think matters until we have a Vulkan backend in Blender, and that's a while off. It think it would also require Vulkan headers. I would not bother.

`PXR_ENABLE_GL_SUPPORT` should be enough for Hydra right now, but if it doesn't interfere with anything I'll enable `PXR_ENABLE_METAL_SUPPORT` as well since work on a Metal backend is ongoing. `PXR_ENABLE_VULKAN_SUPPORT` I don't think matters until we have a Vulkan backend in Blender, and that's a while off. It think it would also require Vulkan headers. I would not bother.
Author
Member

looking at usd.cmake

  - GL support on Linux also links to X11 libraries. Enabling it would break
  - headless or Wayland-only builds. OpenGL support would be useful if someone
  - wants to work on a Hydra viewport in Blender; when that's actually being
  - worked on, we could patch in a new PXR_ENABLE_X11_SUPPORT option (to
  # separate OpenGL from X11) and contribute it upstream.
  -DPXR_ENABLE_GL_SUPPORT=ON
  # Disable Metal since USD fails to build this when OpenGL is disabled.
  -DPXR_ENABLE_METAL_SUPPORT=OFF
  - OIIO is used for loading image textures in Hydra Storm / Embree renderers,
  - which we don't use.
  -DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF

Seems like :

  1. we'd need oiio as well? not super thrilled about statically linking that, but even if we moved that dynamic, blenders imbuf would still link most of the image libs so it'll be duplicating quite a bit code regardless..... (edit just to clarify: shared oiio+static img libs be my preferred way to go at this point if we want to enable this)
  2. Linux is problematic, I guess the plan is to stick epoxy in? I don't have a linux desktop, so you'll have to put in the time there...
looking at `usd.cmake` ``` - GL support on Linux also links to X11 libraries. Enabling it would break - headless or Wayland-only builds. OpenGL support would be useful if someone - wants to work on a Hydra viewport in Blender; when that's actually being - worked on, we could patch in a new PXR_ENABLE_X11_SUPPORT option (to # separate OpenGL from X11) and contribute it upstream. -DPXR_ENABLE_GL_SUPPORT=ON # Disable Metal since USD fails to build this when OpenGL is disabled. -DPXR_ENABLE_METAL_SUPPORT=OFF - OIIO is used for loading image textures in Hydra Storm / Embree renderers, - which we don't use. -DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF ``` Seems like : 1) we'd need oiio as well? not super thrilled about statically linking that, but even if we moved that dynamic, blenders imbuf would still link most of the image libs so it'll be duplicating quite a bit code regardless..... (edit just to clarify: shared oiio+static img libs be my preferred way to go at this point if we want to enable this) 2) Linux is problematic, I guess the plan is to stick epoxy in? I don't have a linux desktop, so you'll have to put in the time there...

Yeah, I guess we also need OIO dynamic then to have texture in Hydra Storm. Also not happy about duplicating those image libs but agree dynamic OIIO + static image libs makes sense. I would try to make OpenEXR dynamic also since it seems to be the biggest, and I'd like to avoid having two OpenEXR thread pools. Maybe in the future we can replace most of our image reading code with OpenImageIO, but that's not going to happen overnight.

For Linux, I'll look into it.

Yeah, I guess we also need OIO dynamic then to have texture in Hydra Storm. Also not happy about duplicating those image libs but agree dynamic OIIO + static image libs makes sense. I would try to make OpenEXR dynamic also since it seems to be the biggest, and I'd like to avoid having two OpenEXR thread pools. Maybe in the future we can replace most of our image reading code with OpenImageIO, but that's not going to happen overnight. For Linux, I'll look into it.
Author
Member

Added subscriber: @deadpin

Added subscriber: @deadpin
Author
Member

Historically oiio's support for packed textures is what has been preventing that, however oiio's ioproxy support should line up with most if not all the formats we care about (@deadpin has a list somewhere, edit: P2981) for oiio 2.4.x so that be an option for probably 3.5 or 3.6 depending on when that's coming out.

Historically oiio's support for packed textures is what has been preventing that, however oiio's ioproxy support should line up with most if not all the formats we care about (@deadpin has a list somewhere, edit: [P2981](https://archive.blender.org/developer/P2981.txt)) for oiio 2.4.x so that be an option for probably 3.5 or 3.6 depending on when that's coming out.

OIIO and OpenEXR are now dynamically linked on all platforms in the branch. I also enabled OpenGL support for USD, but did not test that on Windows.

On Linux the problem where USD links to libGL and libX11 remains, as well as only working with GLX. Ideally we'd solve that, I created an issue regarding that here:
https://github.com/PixarAnimationStudios/USD/issues/2011

Linking to those libraries is not really any worse than what Blender still does for official release builds, except if you're doing a Wayland only build with our precompiled libraries. Hydra not working on Wayland would be a bigger problem. Neither seems blocking for using the libs in this state for Blender 3.4 in my opinion.

OIIO and OpenEXR are now dynamically linked on all platforms in the branch. I also enabled OpenGL support for USD, but did not test that on Windows. On Linux the problem where USD links to libGL and libX11 remains, as well as only working with GLX. Ideally we'd solve that, I created an issue regarding that here: https://github.com/PixarAnimationStudios/USD/issues/2011 Linking to those libraries is not really any worse than what Blender still does for official release builds, except if you're doing a Wayland only build with our precompiled libraries. Hydra not working on Wayland would be a bigger problem. Neither seems blocking for using the libs in this state for Blender 3.4 in my opinion.
Author
Member

Did a rebuild, needed a small fix for building with openvdb in USD, but beyond that building was all good, when running from blender all is still good, however i can't seem to import from the standalone python anymore, and i have to say, i'm not entirely sure why... i don't see it not finding a dll its looking for when spying with procmon, and when i manually force the usd lib into the python process all is well, so i'm not entirely sure where to start trouble shooting this....

k:\BlenderGit\2022_full_tests_ninja>bin\3.4\python\bin\python.exe
Python 3.10.6 (main, Aug 18 2022, 10:22:36) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pxr import Usd

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "k:\BlenderGit\2022_full_tests_ninja\bin\3.4\python\lib\site-packages\pxr\Usd\__init__.py", line 24, in <module>
    from pxr import Tf
  File "k:\BlenderGit\2022_full_tests_ninja\bin\3.4\python\lib\site-packages\pxr\Tf\__init__.py", line 164, in <module>
    PreparePythonModule()
  File "k:\BlenderGit\2022_full_tests_ninja\bin\3.4\python\lib\site-packages\pxr\Tf\__init__.py", line 89, in PreparePythonModule
    module = importlib.import_module(
  File "k:\BlenderGit\2022_full_tests_ninja\bin\3.4\python\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed while importing _tf: The specified procedure could not be found.
>>> import ctypes
>>> ctypes.WinDLL("usd_usd_ms.dll")

<WinDLL 'usd_usd_ms.dll', handle 7ff85a870000 at 0x23ce9a9e6e0>
>>> from pxr import Usd
>>> from pxr import UsdImagingGL
>>>

Did a rebuild, needed a small fix for building with openvdb in USD, but beyond that building was all good, when running from blender all is still good, however i can't seem to import from the standalone python anymore, and i have to say, i'm not entirely sure why... i don't see it *not* finding a dll its looking for when spying with procmon, and when i manually force the usd lib into the python process all is well, so i'm not entirely sure where to start trouble shooting this.... ``` k:\BlenderGit\2022_full_tests_ninja>bin\3.4\python\bin\python.exe Python 3.10.6 (main, Aug 18 2022, 10:22:36) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from pxr import Usd Traceback (most recent call last): File "<stdin>", line 1, in <module> File "k:\BlenderGit\2022_full_tests_ninja\bin\3.4\python\lib\site-packages\pxr\Usd\__init__.py", line 24, in <module> from pxr import Tf File "k:\BlenderGit\2022_full_tests_ninja\bin\3.4\python\lib\site-packages\pxr\Tf\__init__.py", line 164, in <module> PreparePythonModule() File "k:\BlenderGit\2022_full_tests_ninja\bin\3.4\python\lib\site-packages\pxr\Tf\__init__.py", line 89, in PreparePythonModule module = importlib.import_module( File "k:\BlenderGit\2022_full_tests_ninja\bin\3.4\python\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: DLL load failed while importing _tf: The specified procedure could not be found. >>> import ctypes >>> ctypes.WinDLL("usd_usd_ms.dll") <WinDLL 'usd_usd_ms.dll', handle 7ff85a870000 at 0x23ce9a9e6e0> >>> from pxr import Usd >>> from pxr import UsdImagingGL >>> ```

Let me know when something is available (preferably on windows) we can test the hydra add-on against.

Let me know when something is available (preferably on windows) we can test the hydra add-on against.
Author
Member

unclear why it's needed, but adding

        import_paths = os.getenv('PXR_USD_WINDOWS_DLL_PATH')
        if import_paths is None:
            os.environ["PXR_USD_WINDOWS_DLL_PATH"] = blender_dir

to usercustomize.py seems to sidestep the issue

unclear why it's needed, but adding ``` import_paths = os.getenv('PXR_USD_WINDOWS_DLL_PATH') if import_paths is None: os.environ["PXR_USD_WINDOWS_DLL_PATH"] = blender_dir ``` to usercustomize.py seems to sidestep the issue
Author
Member

In #99618#1408270, @BrianSavery wrote:
Let me know when something is available (preferably on windows) we can test the hydra add-on against.

I'll contact you by email probably tomorrow with a download link for my current 3.4 lib folder, you can use that against the tmp_libupdate_34 branch as master is not ready for this set of libs.

> In #99618#1408270, @BrianSavery wrote: > Let me know when something is available (preferably on windows) we can test the hydra add-on against. I'll contact you by email probably tomorrow with a download link for my current 3.4 lib folder, you can use that against the `tmp_libupdate_34` branch as `master` is not ready for this set of libs.

This issue was referenced by 1e1e9014cf

This issue was referenced by 1e1e9014cfc9f47d8496dd283a1cccae0ce29552

Added subscriber: @mont29

Added subscriber: @mont29

Regarding USD, there is problem with recent Linux distro: starting from glibc 2.34, some deprecated hooks have been removed, which are still used by USD 22.03: https://devtalk.blender.org/t/building-blender-on-linux-using-glibc-2-34-raises-linking-errors-from-the-usd-library/24185

The problem has been fixed in USD 22.08: https:*github.com/PixarAnimationStudios/USD/issues/1592, https:*github.com/PixarAnimationStudios/USD/commit/8b19842ad49d6c3eb439318fefea19cde3e87781

Regarding USD, there is problem with recent Linux distro: starting from glibc 2.34, some deprecated hooks have been removed, which are still used by USD 22.03: https://devtalk.blender.org/t/building-blender-on-linux-using-glibc-2-34-raises-linking-errors-from-the-usd-library/24185 The problem has been fixed in USD 22.08: https:*github.com/PixarAnimationStudios/USD/issues/1592, https:*github.com/PixarAnimationStudios/USD/commit/8b19842ad49d6c3eb439318fefea19cde3e87781

Also FYI I tried using USD 22.08, but it will require some changes in Blender code, some API had some incompatible changes it'd seem :(

Also FYI I tried using USD 22.08, but it will require some changes in Blender code, some API had some incompatible changes it'd seem :(

This issue was referenced by ded4604d71

This issue was referenced by ded4604d7190adef56518dc0b65ddb452beefc16

So 16af35054d (from @brecht patch P3180) solves the issue with USD 22.03 and glibc >= 2.34 for now.

So 16af35054d (from @brecht patch [P3180](https://archive.blender.org/developer/P3180.txt)) solves the issue with USD 22.03 and glibc >= 2.34 for now.
Author
Member

What's the plan for these 3.4 libs, I head something coming out of the admin meeting wanting a separate branch for the dynamic stuff? does that mean 3.4 will receive no updates and will stay on 3.3 level libs ?

What's the plan for these 3.4 libs, I head something coming out of the admin meeting wanting a separate branch for the dynamic stuff? does that mean 3.4 will receive no updates and will stay on 3.3 level libs ?
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

I'd be okay without FriBiDi and Harbbuzz for a while. I've been been getting increasing resistance to small changes, so not optimistic about larger changes in the near term.

I'd be okay without FriBiDi and Harbbuzz for a while. I've been been getting increasing resistance to small changes, so not optimistic about larger changes in the near term.
Author
Member

Yeah i'm not overly worried about those, if push comes to shove i'd be ok just cherry-picking those two out of the patch set and landing them in whatever form the 3.4 libs will take, the resistance is clearly not from the platform module here :)

Yeah i'm not overly worried about those, if push comes to shove i'd be ok just cherry-picking those two out of the patch set and landing them in whatever form the 3.4 libs will take, the resistance is clearly not from the platform module here :)

There is no decision from the admins regarding what to do with dynamic libs, that's up to us platform maintainers. But I feel strongly that we should do the dynamic libs upgrade in 3.5 along with other VFX reference platform changes, to avoid potentially doing two disruptive releases for users and add-on developers. Putting some symbols into public namespaces before matching the VFX reference platform is also risky.

Maybe it turns out there are few to no problems. But I find it hard to predict, and there's few other developers who are even aware of the various obscure issues we've dealt with in the past: symbol conflicts with Python modules and drivers, initialization order issues, conflicts between memory allocators, C++ ABI issues, etc.

@LazyDodo, @dr.sybren, do you agree to postpone it to 3.5?

There is no decision from the admins regarding what to do with dynamic libs, that's up to us platform maintainers. But I feel strongly that we should do the dynamic libs upgrade in 3.5 along with other VFX reference platform changes, to avoid potentially doing two disruptive releases for users and add-on developers. Putting some symbols into public namespaces before matching the VFX reference platform is also risky. Maybe it turns out there are few to no problems. But I find it hard to predict, and there's few other developers who are even aware of the various obscure issues we've dealt with in the past: symbol conflicts with Python modules and drivers, initialization order issues, conflicts between memory allocators, C++ ABI issues, etc. @LazyDodo, @dr.sybren, do you agree to postpone it to 3.5?
Author
Member

I have no objections to delaying to 3.5, that being said if we're going to do a temp SVN branch with the preliminary dynamic libs and update to VFX 2023 as libs become available i would like to do minimal or no changes for 3.4 just to keep it from becoming a time sink for platform maintainers

I have no objections to delaying to 3.5, that being said *if* we're going to do a temp SVN branch with the preliminary dynamic libs and update to VFX 2023 as libs become available i would like to do minimal or no changes for 3.4 just to keep it from becoming a time sink for platform maintainers

I think I mentioned this in the Asset meeting, but my 2 cents is to make the VFX alignment and the dynamic libraries at the same time. So maybe makes sense for 3.5.

I think I mentioned this in the Asset meeting, but my 2 cents is to make the VFX alignment and the dynamic libraries at the same time. So maybe makes sense for 3.5.

In #99618#1415981, @Harley wrote:
I'd be okay without FriBiDi and Harbbuzz for a while. I've been been getting increasing resistance to small changes, so not optimistic about larger changes in the near term.

Where is the resistence coming from? And what exactly are they resisting?

I also have no objection to postponing library updates to 3.5.

> In #99618#1415981, @Harley wrote: > I'd be okay without FriBiDi and Harbbuzz for a while. I've been been getting increasing resistance to small changes, so not optimistic about larger changes in the near term. Where is the resistence coming from? And what exactly are they resisting? I also have no objection to postponing library updates to 3.5.
Ray molenkamp changed title from Library changes for Blender 3.4 to Library changes for Blender 3.5 2022-09-14 16:11:13 +02:00

Added subscriber: @hamza-el-barmaki

Added subscriber: @hamza-el-barmaki
Author
Member

Build system changes for new directory name? (since linux_centos7_x86_64 would be wrong)

I'd probably go with something like linux_glibc_228_x86_64 I mean the glibc version is the most defining characteristic of set of libs, no? you could add CXX11_ABI but i feel like once we switch it really doesn't matter anymore, as all libs will be cxx11

> Build system changes for new directory name? (since linux_centos7_x86_64 would be wrong) I'd probably go with something like `linux_glibc_228_x86_64` I mean the glibc version is the most defining characteristic of set of libs, no? you could add `CXX11_ABI` but i feel like once we switch it really doesn't matter anymore, as all libs will be cxx11

In #99618#1405124, @brecht wrote:
Maybe a patch like this (untested)?

Index: python/lib/python3.10/site.py
===================================================================
--- python/lib/python3.10/site.py	(revision 63003)
+++ python/lib/python3.10/site.py	(working copy)
@@ -611,6 +611,14 @@
     if ENABLE_USER_SITE:
         execusercustomize()
 
+    # Blender: make dlls needed by modules available in standalone Python exe
+    if sys.platform == 'win32':
+        exe_dir, exe_file = os.path.split(sys.executable)
+        if exe_file.startswith('python'):
+            blender_dir = os.path.abspath(os.path.join(exe_dir, '..', '..', '..'))
+            os.add_dll_directory(blender_dir)
+
+
 # Prevent extending of sys.path when python was started with -S and
 # site is imported later.
 if not sys.flags.no_site:

It's not pretty but not sure what the better solution would be.

I would strongly suggest that we stop using strings and os.path for paths. The above can be written as:

from pathlib import Path

exe = Path(sys.executable)
if exe.stem.startswith('python'):

blender_dir = exe.resolve().parent.parent.parent.parent
os.add_dll_directory(blender_dir)

> In #99618#1405124, @brecht wrote: > Maybe a patch like this (untested)? > ``` > Index: python/lib/python3.10/site.py > =================================================================== > --- python/lib/python3.10/site.py (revision 63003) > +++ python/lib/python3.10/site.py (working copy) > @@ -611,6 +611,14 @@ > if ENABLE_USER_SITE: > execusercustomize() > > + # Blender: make dlls needed by modules available in standalone Python exe > + if sys.platform == 'win32': > + exe_dir, exe_file = os.path.split(sys.executable) > + if exe_file.startswith('python'): > + blender_dir = os.path.abspath(os.path.join(exe_dir, '..', '..', '..')) > + os.add_dll_directory(blender_dir) > + > + > # Prevent extending of sys.path when python was started with -S and > # site is imported later. > if not sys.flags.no_site: > ``` > > It's not pretty but not sure what the better solution would be. I would strongly suggest that we stop using strings and `os.path` for paths. The above can be written as: ```lang=python from pathlib import Path exe = Path(sys.executable) if exe.stem.startswith('python'): ``` blender_dir = exe.resolve().parent.parent.parent.parent os.add_dll_directory(blender_dir) ```

Fair point, though this stuff runs quite early and other functions in this file are using os.path. So I'm not sure if using higher level modules is safe here, if that runs the risk of changing initialization order in some way that matters.

Fair point, though this stuff runs quite early and other functions in this file are using `os.path`. So I'm not sure if using higher level modules is safe here, if that runs the risk of changing initialization order in some way that matters.

The branch tmp_libupdate_34 was renamed to tmp-vfx-platform-2023.

The branch `tmp_libupdate_34` was renamed to `tmp-vfx-platform-2023`.

For those working on USD/Hydra in branches, you can now try out building against the new libs, either locally or on the buildbot.

You would need to rebase on or merge with the tmp-vfx-platform-2023 branch for this to work.

This is for Windows only, which I guess the interested developers are using anyway.

For those working on USD/Hydra in branches, you can now try out building against the new libs, either locally or on the buildbot. You would need to rebase on or merge with the `tmp-vfx-platform-2023` branch for this to work. * The change to make the buildbot pick them up in branch builds is here: https://developer.blender.org/rB42ce93a2cbc28836d22b7fa47e99aa3df76e1acc * For local builds you would need to manually `svn switch` to https://svn.blender.org/svnroot/bf-blender/branches/vfx-platform-2023/lib/win64_vc15/ This is for Windows only, which I guess the interested developers are using anyway.

Added subscriber: @SteffenD

Added subscriber: @SteffenD

Added subscriber: @zNight

Added subscriber: @zNight

Removed subscriber: @dr.sybren

Removed subscriber: @dr.sybren

This is still targeted for Blender 3.5? Any update for linux or Mac?

This is still targeted for Blender 3.5? Any update for linux or Mac?

Yes, it's still targeting 3.5.

@LazyDodo did work to upgrade the libs to vfx platform 2023, and committed updated precompiled Windows libs. That can be used for testing as described in my previous comment.

I can commit the precompiled libs for macOS to the branch as well if you want to test on that platform?

For Linux we are a bit further away, we still need to set up Alma/Rocky Linux 8.

That task description still needs to be updated with the current library versions in the branch.

Yes, it's still targeting 3.5. @LazyDodo did work to upgrade the libs to vfx platform 2023, and committed updated precompiled Windows libs. That can be used for testing as described in my previous comment. I can commit the precompiled libs for macOS to the branch as well if you want to test on that platform? For Linux we are a bit further away, we still need to set up Alma/Rocky Linux 8. That task description still needs to be updated with the current library versions in the branch.

This issue was referenced by ebff39d5bb

This issue was referenced by ebff39d5bb3697a767eb3f6c662e29cef326e2ae

This issue was referenced by 70375c96d5

This issue was referenced by 70375c96d5006e33673fe8b813d004e42aa50774

This issue was referenced by 388bbc3290

This issue was referenced by 388bbc32902d5a66ccc13955b810cef12213aeca

This issue was referenced by 20883841c7

This issue was referenced by 20883841c751e1dc28dc9b69ee20c797eeab4ca7

This issue was referenced by 6d27a2ff76

This issue was referenced by 6d27a2ff76444971180ab885fe49745c853de8aa

This issue was referenced by None@63129

This issue was referenced by None@63129

This issue was referenced by None@63130

This issue was referenced by None@63130

This issue was referenced by 3494ba3815

This issue was referenced by 3494ba3815e0703f3e96800a7517c25bc597b9f7

This issue was referenced by None@63132

This issue was referenced by None@63132

This issue was referenced by None@63133

This issue was referenced by None@63133

This issue was referenced by 3552f5d83c

This issue was referenced by 3552f5d83c692228dd13321cdcbf17084e065b60

This issue was referenced by None@63141

This issue was referenced by None@63141

This issue was referenced by None@63142

This issue was referenced by None@63142

there is an update about harfbuzz 6.0.0 see https://github.com/harfbuzz/harfbuzz/releases

there is an update about harfbuzz 6.0.0 see https://github.com/harfbuzz/harfbuzz/releases
Member

In #99618#1463344, @hamza-el-barmaki wrote:
there is an update about harfbuzz 6.0.0 see https://github.com/harfbuzz/harfbuzz/releases

Awesome. I hadn't noticed that.

Not a problem now though. We really won't release a version of Blender that uses Harfbuzz until 4.6 at the earliest. We are just getting a version in the repository now so that we can do some initial work, do testing, and to aid review. So we might do a version bump next release.

> In #99618#1463344, @hamza-el-barmaki wrote: > there is an update about harfbuzz 6.0.0 see https://github.com/harfbuzz/harfbuzz/releases Awesome. I hadn't noticed that. Not a problem now though. We really won't release a version of Blender that uses Harfbuzz until 4.6 at the earliest. We are just getting a version in the repository now so that we can do some initial work, do testing, and to aid review. So we might do a version bump next release.
Member

Added subscriber: @xavierh

Added subscriber: @xavierh
Author
Member

Update install_deps script N/A, not sure how to do that, 388bbc3290 does not seem to add any new parameter when building LLVM, just a dependency?

@mont29 The change is subtle, it adds the NVPTX target something like this would probably work (but I admit, didn't test)

diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
index ed18e563f14..99468ef57ad 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -2453,9 +2453,9 @@ compile_LLVM() {
     mkdir build
     cd build

-    LLVM_TARGETS="X86"
+    LLVM_TARGETS="X86;NVPTX"
     if [ $(uname -m) == "aarch64" ]; then
-      LLVM_TARGETS="AArch64"
+      LLVM_TARGETS="AArch64;NVPTX"
     fi

     cmake_d="-D CMAKE_BUILD_TYPE=Release"
> Update install_deps script N/A, not sure how to do that, 388bbc3290 does not seem to add any new parameter when building LLVM, just a dependency? @mont29 The change is subtle, it adds the `NVPTX` target something like this would probably work (but I admit, didn't test) ``` diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index ed18e563f14..99468ef57ad 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -2453,9 +2453,9 @@ compile_LLVM() { mkdir build cd build - LLVM_TARGETS="X86" + LLVM_TARGETS="X86;NVPTX" if [ $(uname -m) == "aarch64" ]; then - LLVM_TARGETS="AArch64" + LLVM_TARGETS="AArch64;NVPTX" fi cmake_d="-D CMAKE_BUILD_TYPE=Release" ```

Thanks @LazyDodo, afaict it worked (although I do not really have the hardware/software setup here to actually test it ':) ).

Thanks @LazyDodo, afaict it worked (although I do not really have the hardware/software setup here to actually test it ':) ).
Member

Added subscriber: @howardt

Added subscriber: @howardt
Member

I think we need to build the GMP library with --disable-assembly for the MacOS ARM architecture. See https://developer.blender.org/T103423

I think we need to build the GMP library with --disable-assembly for the MacOS ARM architecture. See https://developer.blender.org/T103423

Added subscriber: @Caco-Oportot

Added subscriber: @Caco-Oportot

This issue was referenced by 589cbbf0e3

This issue was referenced by 589cbbf0e382a77b19f90886370682a0feab6fa6

@howardt done.

@howardt done.
Thomas Dinges added this to the 3.5 milestone 2023-02-07 18:55:56 +01:00
Philipp Oeser removed the
Interest
Platforms, Builds & Tests
label 2023-02-10 08:58:22 +01:00
Brecht Van Lommel added
Status
Resolved
and removed
Status
Confirmed
labels 2023-03-30 11:24:57 +02:00

Closing now that 3.5 was released.

Closing now that 3.5 was released.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
13 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#99618
No description provided.