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
USD release 22.08 compiles, but any CLI invocation crashes on an M1 Mac #1996
Comments
|
I just did a test of using |
Thank you, I'll give it a shot. is that additional element needed for the M1 build? It wasn't explicitly stated, but i saw it referenced in other issues, and tried it blindly without knowing even what it was meant to do. |
No, this isn't a requirement for M1 builds. This flag wouldn't be needed if USD was built using the Python that ships with macOS, for example. My understanding from #1620 is that this is specific to building USD with the Python interpreter provided by conda, which statically links against Python and causes duplicate symbol issues since USD also links against Python. |
To add to what Sunya said, the flag is specific to statically linked Python distributions, it's independent of processor architecture and operating system - the same problem also occurs with conda on linux and windows on both aarch64 and x64. Conda distributed Pythons are statically linked as a way to reduce unexpected system and installation coupling, but Python isn't, to my knowledge, built in such a way that an external build system can robustly discover whether you are targeting a static or dynamically linked Python so we are forced to deal with it manually. |
@sunyab @meshula Thank you both, this helps my understanding tremendously. @sunyab Part of the issue, and why I'm even using the conda/miniforge version of Python3, is that Apple is no longer including an updated Python as an "installed thing" within it's operating systems. There's a version of python3 that's now embedded within Xcode, but with even less header access, and really looks to be for Xcode's (Apple Developer Tools) own internal use. A fresh install of macOS 12.5 (Monterey) trying to use Python3 results:
So if you install Xcode, it'll drop a Python 3.8.9 into place, but I'm uncertain if that has all the pieces (headers, specifically, as well as library additions) to support USD. I don't expect USD to provide the guidance there, but having a very clear way for a developer w/ macOS to get the USD tooling up and running on their current hardware would be super helpful in the docs or README, including a tidbit about this additional CLI option. I'll post something on a my blog to at least get it out there. The only reference prior to this version's release that I found related to the M1 was https://simo.virokannas.fi/2022/04/compiling-pixars-usd-natively-on-apple-m1/ from April 2021. And thank you again - getting the |
Description of Issue
I've tried multiple variations of
build_scripts/build_usd.py
with python3 to get USD compiled and installed. In each of the cases, when I try to test the installation (eitherusdcat
orusdview
, depending on if I enabled USDView to be built), the result matches #1620:Steps to Reproduce
pip install PySide6
release
branch, got latest, and built:build completes without issue: https://gist.github.com/heckj/12fd07859b5e8f80babb62281ef98cb6
Then attempting to use either usdview or usdcat on a the Kitchen Set sample USD results in the crash:
System Information (OS, Hardware)
macOS Monterey, 12.5. M1 chip, 16GB ram.
uname -a
:Package Versions
Details above in setup, and git head reported as:
Build Flags
I tried exactly as above, and I've tried with the following environment variable set - with the same result:
export PXR_PY_UNDEFINED_DYNAMIC_LOOKUP=ON
The text was updated successfully, but these errors were encountered: