google / usd_from_gltf

Apache License 2.0
547 stars 85 forks source link

[Issue] arm64 incompatibility #90

Open mike927 opened 2 years ago

mike927 commented 2 years ago

Device: MacBook Pro M1 (os 12.0.1)

Calling python "${UFG_SRC}/tools/ufginstall/ufginstall.py" -v "${UFG_INSTALL}" "${USD_DIR}" I get the following error:

[ 43%] Linking C shared library libpng16.dylib
ld: warning: ignoring file /Users/michal/Documents/GlbConverterNative/usd_from_gltf/ufg-install/src/zlib-1.2.11/libz.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_adler32", referenced from:
      _png_compare_ICC_profile_with_sRGB in png.c.o
  "_crc32", referenced from:
      _png_reset_crc in png.c.o
      _png_calculate_crc in png.c.o
      _png_compare_ICC_profile_with_sRGB in png.c.o
  "_deflate", referenced from:
      _png_compress_IDAT in pngwutil.c.o
      _png_text_compress in pngwutil.c.o
  "_deflateEnd", referenced from:
      _png_write_destroy in pngwrite.c.o
      _png_deflate_claim in pngwutil.c.o
  "_deflateInit2_", referenced from:
      _png_deflate_claim in pngwutil.c.o
  "_deflateReset", referenced from:
      _png_deflate_claim in pngwutil.c.o
  "_inflate", referenced from:
      _png_zlib_inflate in pngrutil.c.o
     (maybe you meant: _png_zlib_inflate)
  "_inflateEnd", referenced from:
      _png_read_destroy in pngread.c.o
  "_inflateInit2_", referenced from:
      _png_inflate_claim in pngrutil.c.o
  "_inflateReset", referenced from:
      _png_reset_zstream in png.c.o
      _png_decompress_chunk in pngrutil.c.o
  "_inflateReset2", referenced from:
      _png_inflate_claim in pngrutil.c.o
  "_inflateValidate", referenced from:
      _png_inflate_claim in pngrutil.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libpng16.16.37.0.dylib] Error 1
make[1]: *** [CMakeFiles/png.dir/all] Error 2
make: *** [all] Error 2
calebrunion commented 1 year ago

This is also my issue. I'd love some instruction on how to build on ARM64.

aleyooop commented 1 year ago

You should use x86_64 version of Python 3.7.x to build both USD and this lib. To install Python, you can use Rosetta Terminal with x86_64 Homebrew. BTW, I've used this fork.