I've been trying to build and use the USD command line toolchain pieces from source on an M1/arm64 Mac - and while I've gotten it to compile, I get a crash as python attempts to load up the USD internals:
------------------------------ python terminated -------------------------------
python crashed. FATAL ERROR: Failed axiom: ' Py_IsInitialized() '
in operator() at line 148 of /Users/heckj/src/USD/pxr/base/tf/pyTracing.cpp
writing crash report to [ Sparrow.local:/var/folders/8t/k6nw7pyx2qq77g8qq_g429080000gn/T//st_python.79467 ] ... done.
--------------------------------------------------------------------------------
I found a number of issues at Github, which hints that this is a potentially known and ongoing problem:
- https://github.com/PixarAnimationStudios/USD/issues/1620
- referenced issue: https://github.com/PixarAnimationStudios/USD/issues/1466
- referenced issue: https://github.com/PixarAnimationStudios/USD/issues/1736
With some suggestions, but no clear resolutions.
I tried the build commands that are referenced in the release details for USDPython as available on developer downloads, and fiddling it a bit got it to compile:
python build_scripts/build_usd.py \
--build-args TBB,arch=arm64 \
--python --no-imaging --no-usdview \
--prefer-safety-over-speed \
--build-monolithic /opt/local/USD
But I'm repeatedly hitting the crash where python isn't initializing. I've tried Python 3 from home-brew, an Anaconda version of python (intel through Rosetta), the basing it on the python included with Xcode (universal binary), and the most recent trial was with miniforge3 arm-native python that's recommended from the Metal for Tensorflow marketing page.
WIth the warnings about Python disappearing from the default install, I'd like to get a mechanism in place that I'm comfortable with to get an install of USDtools, and ideally that are native to the M1 processor.