adobe / USD-Fileformat-plugins

A collection of USD fileformat plugins
298 stars 22 forks source link

Unable to build on MacOS 14 #19

Closed fire closed 4 months ago

fire commented 4 months ago

Expected Behaviour

Able to build plugin on the mac so I can publish USD Fileformat plugin builds for Mac/Windows/Linux.

Actual Behaviour

Not able to build plugin on the mac.

Reproduce Scenario (including but not limited to)

See https://github.com/V-Sekai/USD-Fileformat-plugins/blob/macos/.github/workflows/build.yaml

Steps to Reproduce

Run github actions on git branch.

Platform and Version

As of today macos-latest is macOS-14

https://github.com/actions/runner-images

Sample Code that illustrates the problem

See build.yaml.

Logs taken while reproducing problem

3 warnings generated.
[100%] Linking CXX shared library ../../lib/libOpenImageIO.dylib
ld: warning: ignoring duplicate libraries: '-lm'
ld: Undefined symbols:
  _GifLastError, referenced from:
      OpenImageIO_v2_3::GIFInput::read_subimage_metadata(OpenImageIO_v2_3::ImageSpec&) in gifinput.cpp.o
      OpenImageIO_v2_3::GIFInput::read_subimage_metadata(OpenImageIO_v2_3::ImageSpec&) in gifinput.cpp.o
      OpenImageIO_v2_3::GIFInput::read_subimage_metadata(OpenImageIO_v2_3::ImageSpec&) in gifinput.cpp.o
      OpenImageIO_v2_3::GIFInput::read_subimage_metadata(OpenImageIO_v2_3::ImageSpec&) in gifinput.cpp.o
      OpenImageIO_v2_3::GIFInput::report_last_error() in gifinput.cpp.o
      OpenImageIO_v2_3::GIFInput::read_subimage_data() in gifinput.cpp.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libOpenImageIO.2.3.21.dylib] Error 1
make[1]: *** [src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/all] Error 2
make: *** [all] Error 2

See logs on https://github.com/V-Sekai/USD-Fileformat-plugins/pull/9

Commentary

OpenImageIO seems to fail on the MacOS.

kwblackstone commented 4 months ago

Hello, I was able to get this working for our CI system. The issue I found was the gif lib preinstalled on the macOS 14 machines wasn't compatible with what OIIO was looking for. I added an uninstall step here: https://github.com/adobe/USD-Fileformat-plugins/blob/7bcfd43b79b86360fa23e8dc4775cdb10add6869/.github/workflows/create-usd-release.yml#L94

This allowed OIIO to install the version it needs. Hopefully this helps you, I'm going to close the issue as its more of a USD problem then an actual issue with the plugins.