Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error #562

Closed
lindemeier opened this issue Jun 7, 2022 · 2 comments
Closed

Build error #562

lindemeier opened this issue Jun 7, 2022 · 2 comments

Comments

@lindemeier
Copy link

I get the following build error:

In file included from /RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.cpp:15:
/RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.h: In function 'void pxrInternal_v0_22__pxrReserved__::RprUsd_MaterialNetworkFromHdMaterialNetworkMap(const pxrInternal_v0_22__pxrReserved__::HdMaterialNetworkMap&, pxrInternal_v0_22__pxrReserved__::RprUsd_MaterialNetwork*, bool*)':
/RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.h:52:5: error: 'HdMaterialNetwork2ConvertFromHdMaterialNetworkMap' was not declared in this scope; did you mean 'RprUsd_MaterialNetworkFromHdMaterialNetworkMap'?
   52 |     HdMaterialNetwork2ConvertFromHdMaterialNetworkMap(hdNetworkMap, result, isVolume);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     RprUsd_MaterialNetworkFromHdMaterialNetworkMap
/RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.cpp: In function 'pxrInternal_v0_22__pxrReserved__::RprUsdMaterial* pxrInternal_v0_22__pxrReserved__::{anonymous}::CreateMaterialXFromUsdShade(const pxrInternal_v0_22__pxrReserved__::SdfPath&, const pxrInternal_v0_22__pxrReserved__::RprUsd_MaterialBuilderContext&, std::string*)':
/RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.cpp:391:63: error: 'HdMaterialTerminalTokens' was not declared in this scope
  391 |     auto terminalIt = context.materialNetwork->terminals.find(HdMaterialTerminalTokens->surface);
      |                                                               ^~~~~~~~~~~~~~~~~~~~~~~~
/RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.cpp: In member function 'pxrInternal_v0_22__pxrReserved__::RprUsdMaterial* pxrInternal_v0_22__pxrReserved__::RprUsdMaterialRegistry::CreateMaterial(const pxrInternal_v0_22__pxrReserved__::SdfPath&, pxrInternal_v0_22__pxrReserved__::HdSceneDelegate*, const pxrInternal_v0_22__pxrReserved__::HdMaterialNetworkMap&, rpr::Context*, pxrInternal_v0_22__pxrReserved__::RprUsdImageCache*)':
/RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.cpp:666:43: error: 'HdMaterialTerminalTokens' was not declared in this scope
  666 |     auto volumeOutput = getTerminalOutput(HdMaterialTerminalTokens->volume);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~
/RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.cpp:670:38: error: invalid use of incomplete type 'class pxrInternal_v0_22__pxrReserved__::HdSceneDelegate'
  670 |     int materialRprId = sceneDelegate->GetLightParamValue(materialId, RprUsdTokens->rprMaterialId).GetWithDefault(-1);
      |                                      ^~
In file included from /usr/local/USD/include/pxr/imaging/hd/material.h:29,
                 from /RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.h:19,
                 from /RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.cpp:15:
/usr/local/USD/include/pxr/imaging/hd/sprim.h:36:7: note: forward declaration of 'class pxrInternal_v0_22__pxrReserved__::HdSceneDelegate'
   36 | class HdSceneDelegate;
      |       ^~~~~~~~~~~~~~~
/RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.cpp:671:48: error: invalid use of incomplete type 'class pxrInternal_v0_22__pxrReserved__::HdSceneDelegate'
  671 |     std::string cryptomatteName = sceneDelegate->GetLightParamValue(materialId, RprUsdTokens->rprMaterialAssetName).GetWithDefault(std::string{});
      |                                                ^~
In file included from /usr/local/USD/include/pxr/imaging/hd/material.h:29,
                 from /RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.h:19,
                 from /RadeonProRenderUSD/pxr/imaging/rprUsd/materialRegistry.cpp:15:
/usr/local/USD/include/pxr/imaging/hd/sprim.h:36:7: note: forward declaration of 'class pxrInternal_v0_22__pxrReserved__::HdSceneDelegate'
   36 | class HdSceneDelegate;
      |       ^~~~~~~~~~~~~~~
make[2]: *** [pxr/imaging/rprUsd/CMakeFiles/rprUsd.dir/build.make:248: pxr/imaging/rprUsd/CMakeFiles/rprUsd.dir/materialRegistry.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:527: pxr/imaging/rprUsd/CMakeFiles/rprUsd.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

OS Ubuntu 20.04

USD version v22.05a compiled with:

python build_scripts/build_usd.py --usdview --openvdb --materialx /usr/local/USD

RPR compiled with:

 cmake -Dpxr_DIR=/usr/local/USD -DCMAKE_INSTALL_PREFIX=/usr/local/USD .. &&\
    echo "building RadeonProRenderUSD" &&\
    cmake --build . --config Release --target install

Could this be an issue of the USD or OS version?

@lindemeier
Copy link
Author

I see there is PR #557 that might be related here.

I'll try other versions of USD to check which is the most current supported version. I can then create a PR for the README that lists the max supported USD version.

@lindemeier
Copy link
Author

Most recent working USD version for me is v21.08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant