Building on M1 mac

When building Mac m1 I get the following issue for incorrect architecture:
[ 81%] Linking CXX shared library libusd_ms.dylib
ld: warning: ignoring file ‘/opt/homebrew/Cellar/tbb/2022.1.0/lib/libtbb.12.15.dylib’: found architecture ‘arm64’, required architecture ‘x86_64’
Undefined symbols for architecture x86_64:
"PyArg_ParseTupleAndKeywords", referenced from:
pxrInternal_v0_25_5__pxrReserved
_::pxr_boost::python::property_init(_object*, _object*, _object*) in libusd_m.a16

The command I use is:
python ./build_scripts/build_usd.py --build-args TBB,arch=arm64 --python --no-imaging --no-usdview --prefer-safety-over-speed --build-monolithic ./build

Does anyone know how to fix this?
log.txt (276.2 KB)

Hi Aleksandr

It seems like you are specifying arch=arm64 for TBB but USD build will be picking up the native architecture, which in your case is x86_64. Could you please try the following instead:

python ./build_scripts/build_usd.py --build-target arm64 --python --no-imaging --no-usdview --prefer-safety-over-speed --build-monolithic ./build

Refer the following:

Hope this helps.
Thanks

Hey, thx for the help. It got me forward a little bit in the building process. Unfortunately running

python ./build_scripts/build_usd.py --build-target arm64 --build-args TBB,arm64 --python --no-imaging --no-usdview --prefer-safety-over-speed --no-materialx --build-monolithic ./build

leads to the following error in the log:
log.txt (276.2 KB)

I’ve narrowed it down to python support, but still not sure what is causing the incorrect architecture issue.

python version Python 3.9.0

seems like libusd_ms.dylib is complaining.

[ 87%] Linking CXX shared library libusd_ms.dylib

Undefined symbols for architecture arm64: