LumaPictures / usd-qt

Reusable Qt Components for Pixar's USD
Other
153 stars 40 forks source link

Compiling usd-qt with USD 19.11 and use with maya-usd #31

Closed BigRoy closed 5 years ago

BigRoy commented 5 years ago

Issue

I'm trying to compile usd-qt with the dev branch to test it together with maya-usd.

The latest maya-usd/refactoring_sandbox and maya-usd/dev branches now build on USD 19.11. Basically this USD commit in the USD/dev branch as described here.

However I'm unable to compile usd-qt with that USD version. I ran cmake using a somewhat equivalent of:

:: USD_ROOT is the compiled USD root.
set USD_ROOT=D:\dev\usd\build

:: Dependencies
set TBB_INCLUDE_DIR=%USD_ROOT%/src/tbb2017_20170226oss
set Boost_INCLUDE_DIR=%USD_ROOT%/include/boost-1_65_1

:: Output directory
set BUILD_DIR=D:\dev\usd\usd-qt-build

:: Cmake build
cd /D D:\dev\usd\usd-qt
cmake -G "Visual Studio 15 2017 Win64" -DBoost_INCLUDE_DIR="%Boost_INCLUDE_DIR%" -DTBB_ROOT_DIR="%TBB_INCLUDE_DIR%" -DBOOST_LIBRARYDIR=%USD_ROOT%/lib -B %BUILD_DIR%

And then build the usdqt.sln solution using Visual Studio.

Which gave me this output: usdqt_build_release_log.txt

Note the build failure and the errors that occurred, like:

5>d:\dev\usd\usd-qt\pxr\usdqt\undoStateDelegate.h(90): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
5>d:\dev\usd\usd-qt\pxr\usdqt\undoStateDelegate.h(90): error C2143: syntax error: missing ',' before '&'
5>d:\dev\usd\usd-qt\pxr\usdqt\undoStateDelegate.h(92): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
5>d:\dev\usd\usd-qt\pxr\usdqt\undoStateDelegate.h(92): error C2143: syntax error: missing ',' before '&'

And:

5>d:\dev\usd\usd-qt\pxr\usdqt\undoStateDelegate.h(90): error C3668: 'pxrInternal_v0_19__pxrReserved__::UsdQt_UndoStateDelegate::_OnSetField': method with override specifier 'override' did not override any base class methods
5>d:\dev\usd\usd-qt\pxr\usdqt\undoStateDelegate.h(98): error C3668: 'pxrInternal_v0_19__pxrReserved__::UsdQt_UndoStateDelegate::_OnSetFieldDictValueByKey': method with override specifier 'override' did not override any base class methods
5>d:\dev\usd\usd-qt\pxr\usdqt\undoStateDelegate.h(110): error C3668: 'pxrInternal_v0_19__pxrReserved__::UsdQt_UndoStateDelegate::_OnSetTimeSample': method with override specifier 'override' did not override any base class methods
5>D:\dev\usd\usd-qt\pxr\usdQt\undoStateDelegate.cpp(40): error C2259: 'pxrInternal_v0_19__pxrReserved__::UsdQt_UndoStateDelegate': cannot instantiate abstract class
5>D:\dev\usd\usd-qt\pxr\usdQt\undoStateDelegate.cpp(40): note: due to following members:
5>D:\dev\usd\usd-qt\pxr\usdQt\undoStateDelegate.cpp(40): note: 'void pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetField(const pxrInternal_v0_19__pxrReserved__::SdfPath &,const pxrInternal_v0_19__pxrReserved__::TfToken &,const pxrInternal_v0_19__pxrReserved__::SdfAbstractDataConstValue &)': is abstract
5>D:\dev\usd\build\include\pxr/usd/sdf/layerStateDelegate.h(187): note: see declaration of 'pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetField'
5>D:\dev\usd\usd-qt\pxr\usdQt\undoStateDelegate.cpp(40): note: 'void pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetField(const pxrInternal_v0_19__pxrReserved__::SdfPath &,const pxrInternal_v0_19__pxrReserved__::TfToken &,const pxrInternal_v0_19__pxrReserved__::VtValue &)': is abstract
5>D:\dev\usd\build\include\pxr/usd/sdf/layerStateDelegate.h(183): note: see declaration of 'pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetField'
5>D:\dev\usd\usd-qt\pxr\usdQt\undoStateDelegate.cpp(40): note: 'void pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetFieldDictValueByKey(const pxrInternal_v0_19__pxrReserved__::SdfPath &,const pxrInternal_v0_19__pxrReserved__::TfToken &,const pxrInternal_v0_19__pxrReserved__::TfToken &,const pxrInternal_v0_19__pxrReserved__::SdfAbstractDataConstValue &)': is abstract
5>D:\dev\usd\build\include\pxr/usd/sdf/layerStateDelegate.h(198): note: see declaration of 'pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetFieldDictValueByKey'
5>D:\dev\usd\usd-qt\pxr\usdQt\undoStateDelegate.cpp(40): note: 'void pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetFieldDictValueByKey(const pxrInternal_v0_19__pxrReserved__::SdfPath &,const pxrInternal_v0_19__pxrReserved__::TfToken &,const pxrInternal_v0_19__pxrReserved__::TfToken &,const pxrInternal_v0_19__pxrReserved__::VtValue &)': is abstract
5>D:\dev\usd\build\include\pxr/usd/sdf/layerStateDelegate.h(193): note: see declaration of 'pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetFieldDictValueByKey'
5>D:\dev\usd\usd-qt\pxr\usdQt\undoStateDelegate.cpp(40): note: 'void pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetTimeSample(const pxrInternal_v0_19__pxrReserved__::SdfPath &,double,const pxrInternal_v0_19__pxrReserved__::SdfAbstractDataConstValue &)': is abstract
5>D:\dev\usd\build\include\pxr/usd/sdf/layerStateDelegate.h(209): note: see declaration of 'pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetTimeSample'
5>D:\dev\usd\usd-qt\pxr\usdQt\undoStateDelegate.cpp(40): note: 'void pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetTimeSample(const pxrInternal_v0_19__pxrReserved__::SdfPath &,double,const pxrInternal_v0_19__pxrReserved__::VtValue &)': is abstract
5>D:\dev\usd\build\include\pxr/usd/sdf/layerStateDelegate.h(205): note: see declaration of 'pxrInternal_v0_19__pxrReserved__::SdfLayerStateDelegateBase::_OnSetTimeSample'

I get the same output when building through cmake --build %BUILD_DIR% --config Release


It's very likely I did something wrong regarding the cmake or build step. Any tips would be very welcome!

For completeness sake, I built USD using:

%PYTHON% build_scripts/build_usd.py --build-args boost,"--with-date_time --with-thread --with-system --with-filesystem" --no-maya %USD_BUILD_DIR%
nrusch commented 5 years ago

Hi @BigRoy,

Thanks for reporting this. I'm guessing this is due to API changes in 0.19.11 that we need to adapt the UsdQt code to. We are in the process of updating and deploying 0.19.11 internally, so I will take a look at this soon, as we rely on UsdQt as well.

BigRoy commented 5 years ago

With #32 merged into the dev branch this is now fixed, closing this. Not sure why Github didn't automatically recognize the Fix #31 pattern.

nrusch commented 5 years ago

Ah sorry, I think that's my fault. I edited the final commit message for clarity and forgot to preserve that piece.