vfxpro99 / usd-build-club

This project includes recipes to build Pixar's Universal Scene Description, its Python bindings, and all necessary prerequisites on Mac and Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usdview not being built on Mac Os Sierra 10.12.2 (because Qt and Pyside are not installed)

doppioslash opened this issue · comments

I'm following the non-brew, non-experimental method of Mac OS installation.

Qt and Pyside are commented out in build-prerequisites-macos.sh and, as a result, usdview is not built.

Uncommenting them fails later on:

prereq/qt-everywhere-opensource-src-4.8.7/src/gui/painting/qpaintengineex_p.h:205:18: note: hidden overloaded virtual function
      'QPaintEngineEx::updateState' declared here: different number of parameters (1 vs 0)
    virtual void updateState(const QPaintEngineState &state);
                 ^
1 warning generated.
2 warnings generated.
make[1]: *** [release-all] Error 2
make: *** [sub-gui-make_default-ordered] Error 2
Could not make qt

Due to this issue, the Experimental version uses brew to install qt and pyside as someone in the homebrew community has fixed and patched the bits of Qt that no longer compile on Sierra.

Pyside is particularly difficult to compile following the Qt build due to clang and stdlib changes. That's why the script is commented out :\

One solution would be to modify the non-experimental instructions to use brew to install these components...

I think the patch below will work on the non brew non-experimental method of Mac OS installation. Ironically it is what brew does to get around the problem. If you have problems with the patch you could just comment out lines 18 to 24 in the src/gui/painting/qpaintengine_mac.cpp source file and then add the new line 25.

https://github.com/Homebrew/formula-patches/blob/master/qt/el-capitan.patch

P. S. This method is also mentioned as one of the steps here PixarAnimationStudios/OpenUSD#60

Ah, cool. usd-build-club has a similar, or the same, patch here - https://github.com/vfxpro99/usd-build-club/blob/master/prerequisites-macOS/qpaintengine_mac.cpp - have to check if that is the same patch. This does allow Qt to build, the problem comes during the PySide build - PySide fails. That's the blocker... Prior to Sierra, PySide did build, but not under Sierra/Xcode 8, which is why it's currently commented out. Might be worth trying again, since there have been a few updates issued already.

It seems like the least problematic thing is to install qt and pyside independently. The build-macos.sh script now suggests -

if hash qmake 2>/dev/null; then
  echo "qmake found, if PySide exists, usdview will be built"
else
  echo "Usdview uses PySide. PySide needs qmake in the path. qmake comes from Qt"
  echo "One way to get it is via homebrew:"
  echo ""
  echo "brew install cartr/qt4/qt"
  echo "brew install cartr/qt4/pyside"
  echo "brew install cartr/qt4/pyside-tools"
  echo ""
  echo "qmake typically appears in /usr/local/Cellar/qt4/4.8.7/bin"
fi

Now that pyside2 is available via pip, I think we can correct the instructions, and make this an order of magnitude simpler.

Instructions and scripts updated to reflect using PySide2 instead of pyside.

85f15e4

Please open a new issue for follow on issues with usdview.