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

oneTBB: tbb::atomic to std::atomic in sdf #2457

Merged
merged 1 commit into from
May 17, 2024

Conversation

brechtvl
Copy link
Contributor

@brechtvl brechtvl commented Jun 1, 2023

Description of Change(s)

Swaps out tbb::atomic with std::atomic.

Split off from #1908

Fixes Issue(s)

Part of #1471, adding oneTBB support.

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@sunyab
Copy link
Contributor

sunyab commented Jun 2, 2023

Filed as internal issue #USD-8375

@loqs
Copy link

loqs commented Jun 23, 2023

I encountered two build issues related to this PR. I applied PRs #2457 through #2466 in order onto the current HEAD of the dev branch df0e5a5. The build was with
gcc 13.1.1
onetbb 2021.8.0
boost 1.81.0

cmake \
    -B build \
    -S USD \
    -G Ninja \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DPXR_USE_PYTHON_3=ON \
    -DPXR_BUILD_IMAGING=ON \
    -DPXR_BUILD_TESTS=OFF \
    -DPXR_BUILD_MONOLITHIC=ON \
    -DPYSIDEUICBINARY=/usr/bin/uic
  cmake --build build -v -- -k 9999

Full build output is https://gist.github.com/loqs/8a68505b5fcd7bc3443da60f224c2842 as it is too long to include.
Outputs for failing jobs

FAILED: pxr/imaging/hd/CMakeFiles/hd.dir/dependencyForwardingSceneIndex.cpp.o 
/usr/bin/c++ -DARCH_EXPORTS=1 -DAR_EXPORTS=1 -DBOOST_PYTHON_NO_PY_SIGNATURES -DCAMERAUTIL_EXPORTS=1 -DGARCH_EXPORTS=1 -DGEOMUTIL_EXPORTS=1 -DGF_EXPORTS=1 -DGLF_EXPORTS=1 -DGLX_GLXEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES -DHDAR_EXPORTS=1 -DHDGP_EXPORTS=1 -DHDSI_EXPORTS=1 -DHDSTORM_EXPORTS=1 -DHDST_EXPORTS=1 -DHDX_EXPORTS=1 -DHD_EXPORTS=1 -DHF_EXPORTS=1 -DHGIGL_EXPORTS=1 -DHGIINTEROP_EXPORTS=1 -DHGI_EXPORTS=1 -DHIO_EXPORTS=1 -DJS_EXPORTS=1 -DKIND_EXPORTS=1 -DMFB_ALT_PACKAGE_NAME=hd -DMFB_PACKAGE_MODULE=Hd -DMFB_PACKAGE_NAME=hd -DNDR_EXPORTS=1 -DPCP_EXPORTS=1 -DPLUG_EXPORTS=1 -DPXOSD_EXPORTS=1 -DPXR_BUILD_LOCATION=usd -DPXR_PLUGIN_BUILD_LOCATION=../plugin/usd -DSDF_EXPORTS=1 -DSDRGLSLFX_EXPORTS=1 -DSDR_EXPORTS=1 -DTF_EXPORTS=1 -DTRACE_EXPORTS=1 -DUSDAPPUTILS_EXPORTS=1 -DUSDGEOM_EXPORTS=1 -DUSDHYDRA_EXPORTS=1 -DUSDIMAGINGGL_EXPORTS=1 -DUSDIMAGING_EXPORTS=1 -DUSDLUX_EXPORTS=1 -DUSDMEDIA_EXPORTS=1 -DUSDPHYSICS_EXPORTS=1 -DUSDPROCIMAGING_EXPORTS=1 -DUSDPROC_EXPORTS=1 -DUSDRENDER_EXPORTS=1 -DUSDRIIMAGING_EXPORTS=1 -DUSDRI_EXPORTS=1 -DUSDSHADERS_EXPORTS=1 -DUSDSHADE_EXPORTS=1 -DUSDSKELIMAGING_EXPORTS=1 -DUSDSKEL_EXPORTS=1 -DUSDUI_EXPORTS=1 -DUSDUTILS_EXPORTS=1 -DUSDVIEWQ_EXPORTS=1 -DUSDVOLIMAGING_EXPORTS=1 -DUSDVOL_EXPORTS=1 -DUSD_EXPORTS=1 -DVT_EXPORTS=1 -DWORK_EXPORTS=1 -I/build/usd/src/build/pxr/imaging/hd -I/build/usd/src/OpenUSD-23.05/pxr/imaging/hd -I/build/usd/src/build/include -isystem /usr/include/python3.11 -Wall -Wformat-security -pthread -Wno-deprecated -Wno-deprecated-declarations -Wno-unused-local-typedefs -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/usd/src=/usr/src/debug/usd -flto=auto -O3 -DNDEBUG -std=c++14 -fPIC -MD -MT pxr/imaging/hd/CMakeFiles/hd.dir/dependencyForwardingSceneIndex.cpp.o -MF pxr/imaging/hd/CMakeFiles/hd.dir/dependencyForwardingSceneIndex.cpp.o.d -o pxr/imaging/hd/CMakeFiles/hd.dir/dependencyForwardingSceneIndex.cpp.o -c /build/usd/src/OpenUSD-23.05/pxr/imaging/hd/dependencyForwardingSceneIndex.cpp
/build/usd/src/OpenUSD-23.05/pxr/imaging/hd/dependencyForwardingSceneIndex.cpp: In member function ‘void pxrInternal_v0_23__pxrReserved__::HdDependencyForwardingSceneIndex::_ClearDependencies(const pxrInternal_v0_23__pxrReserved__::SdfPath&)’:
/build/usd/src/OpenUSD-23.05/pxr/imaging/hd/dependencyForwardingSceneIndex.cpp:220:67: error: binding reference of type ‘pxrInternal_v0_23__pxrReserved__::HdDependencyForwardingSceneIndex::_AffectedPrimToDependsOnPathsEntry&’ to ‘const pxrInternal_v0_23__pxrReserved__::HdDependencyForwardingSceneIndex::_AffectedPrimToDependsOnPathsEntry’ discards qualifiers
  220 |     _AffectedPrimToDependsOnPathsEntry &affectedPrimEntry = (*it).second;
      |                                                             ~~~~~~^~~~~~

Which I believe is related to

_AffectedPrimToDependsOnPathsEntryMap::const_iterator it =
_affectedPrimToDependsOnPathsMap.find(primPath);
if (it == _affectedPrimToDependsOnPathsMap.end()) {
return;
}
_AffectedPrimToDependsOnPathsEntry &affectedPrimEntry = (*it).second;

FAILED: pxr/usdImaging/usdImaging/CMakeFiles/usdImaging.dir/adapterManager.cpp.o 
/usr/bin/c++ -DARCH_EXPORTS=1 -DAR_EXPORTS=1 -DBOOST_PYTHON_NO_PY_SIGNATURES -DCAMERAUTIL_EXPORTS=1 -DGARCH_EXPORTS=1 -DGEOMUTIL_EXPORTS=1 -DGF_EXPORTS=1 -DGLF_EXPORTS=1 -DGLX_GLXEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES -DHDAR_EXPORTS=1 -DHDGP_EXPORTS=1 -DHDSI_EXPORTS=1 -DHDSTORM_EXPORTS=1 -DHDST_EXPORTS=1 -DHDX_EXPORTS=1 -DHD_EXPORTS=1 -DHF_EXPORTS=1 -DHGIGL_EXPORTS=1 -DHGIINTEROP_EXPORTS=1 -DHGI_EXPORTS=1 -DHIO_EXPORTS=1 -DJS_EXPORTS=1 -DKIND_EXPORTS=1 -DMFB_ALT_PACKAGE_NAME=usdImaging -DMFB_PACKAGE_MODULE=UsdImaging -DMFB_PACKAGE_NAME=usdImaging -DNDR_EXPORTS=1 -DPCP_EXPORTS=1 -DPLUG_EXPORTS=1 -DPXOSD_EXPORTS=1 -DPXR_BUILD_LOCATION=usd -DPXR_PLUGIN_BUILD_LOCATION=../plugin/usd -DSDF_EXPORTS=1 -DSDRGLSLFX_EXPORTS=1 -DSDR_EXPORTS=1 -DTF_EXPORTS=1 -DTRACE_EXPORTS=1 -DUSDAPPUTILS_EXPORTS=1 -DUSDGEOM_EXPORTS=1 -DUSDHYDRA_EXPORTS=1 -DUSDIMAGINGGL_EXPORTS=1 -DUSDIMAGING_EXPORTS=1 -DUSDLUX_EXPORTS=1 -DUSDMEDIA_EXPORTS=1 -DUSDPHYSICS_EXPORTS=1 -DUSDPROCIMAGING_EXPORTS=1 -DUSDPROC_EXPORTS=1 -DUSDRENDER_EXPORTS=1 -DUSDRIIMAGING_EXPORTS=1 -DUSDRI_EXPORTS=1 -DUSDSHADERS_EXPORTS=1 -DUSDSHADE_EXPORTS=1 -DUSDSKELIMAGING_EXPORTS=1 -DUSDSKEL_EXPORTS=1 -DUSDUI_EXPORTS=1 -DUSDUTILS_EXPORTS=1 -DUSDVIEWQ_EXPORTS=1 -DUSDVOLIMAGING_EXPORTS=1 -DUSDVOL_EXPORTS=1 -DUSD_EXPORTS=1 -DVT_EXPORTS=1 -DWORK_EXPORTS=1 -I/build/usd/src/build/pxr/usdImaging/usdImaging -I/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging -I/build/usd/src/build/include -isystem /usr/include/python3.11 -Wall -Wformat-security -pthread -Wno-deprecated -Wno-deprecated-declarations -Wno-unused-local-typedefs -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/usd/src=/usr/src/debug/usd -flto=auto -O3 -DNDEBUG -std=c++14 -fPIC -MD -MT pxr/usdImaging/usdImaging/CMakeFiles/usdImaging.dir/adapterManager.cpp.o -MF pxr/usdImaging/usdImaging/CMakeFiles/usdImaging.dir/adapterManager.cpp.o.d -o pxr/usdImaging/usdImaging/CMakeFiles/usdImaging.dir/adapterManager.cpp.o -c /build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/adapterManager.cpp
In file included from /build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/primAdapter.h:34,
                 from /build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/adapterManager.cpp:29:
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h: In instantiation of ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_Entry* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetCacheEntryForPrim(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_XfStrategy; ImplData = bool]’:
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:420:21:   required from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::value_type* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetValue(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_XfStrategy; ImplData = bool; value_type = pxrInternal_v0_23__pxrReserved__::GfMatrix4d]’
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:488:46:   required from here
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:398:16: error: invalid conversion from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_XfStrategy>::_Entry*’ to ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_XfStrategy>::_Entry*’ [-fpermissive]
  398 |         return &it->second;
      |                ^~~~~~~~~~~
      |                |
      |                const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_XfStrategy>::_Entry*
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h: In instantiation of ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_Entry* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetCacheEntryForPrim(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_VisStrategy; ImplData = bool]’:
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:420:21:   required from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::value_type* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetValue(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_VisStrategy; ImplData = bool; value_type = pxrInternal_v0_23__pxrReserved__::TfToken]’
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:567:41:   required from here
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:398:16: error: invalid conversion from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_VisStrategy>::_Entry*’ to ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_VisStrategy>::_Entry*’ [-fpermissive]
  398 |         return &it->second;
      |                ^~~~~~~~~~~
      |                |
      |                const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_VisStrategy>::_Entry*
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h: In instantiation of ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_Entry* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetCacheEntryForPrim(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_PurposeStrategy; ImplData = bool]’:
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:420:21:   required from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::value_type* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetValue(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_PurposeStrategy; ImplData = bool; value_type = pxrInternal_v0_23__pxrReserved__::UsdGeomImageable::PurposeInfo]’
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:629:38:   required from here
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:398:16: error: invalid conversion from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_PurposeStrategy>::_Entry*’ to ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_PurposeStrategy>::_Entry*’ [-fpermissive]
  398 |         return &it->second;
      |                ^~~~~~~~~~~
      |                |
      |                const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_PurposeStrategy>::_Entry*
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h: In instantiation of ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_Entry* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetCacheEntryForPrim(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_DrawModeStrategy; ImplData = bool]’:
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:420:21:   required from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::value_type* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetValue(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_DrawModeStrategy; ImplData = bool; value_type = pxrInternal_v0_23__pxrReserved__::TfToken]’
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:848:30:   required from here
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:398:16: error: invalid conversion from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_DrawModeStrategy>::_Entry*’ to ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_DrawModeStrategy>::_Entry*’ [-fpermissive]
  398 |         return &it->second;
      |                ^~~~~~~~~~~
      |                |
      |                const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_DrawModeStrategy>::_Entry*
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h: In instantiation of ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_Entry* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetCacheEntryForPrim(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_CoordSysBindingStrategy; ImplData = bool]’:
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:420:21:   required from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::value_type* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetValue(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_CoordSysBindingStrategy; ImplData = bool; value_type = pxrInternal_v0_23__pxrReserved__::UsdImaging_CoordSysBindingStrategy::value_type]’
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:995:34:   required from here
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:398:16: error: invalid conversion from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_CoordSysBindingStrategy>::_Entry*’ to ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_CoordSysBindingStrategy>::_Entry*’ [-fpermissive]
  398 |         return &it->second;
      |                ^~~~~~~~~~~
      |                |
      |                const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_CoordSysBindingStrategy>::_Entry*
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h: In instantiation of ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_Entry* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetCacheEntryForPrim(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_NonlinearSampleCountStrategy; ImplData = bool]’:
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:420:21:   required from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::value_type* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetValue(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_NonlinearSampleCountStrategy; ImplData = bool; value_type = int]’
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:1107:33:   required from here
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:398:16: error: invalid conversion from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_NonlinearSampleCountStrategy>::_Entry*’ to ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_NonlinearSampleCountStrategy>::_Entry*’ [-fpermissive]
  398 |         return &it->second;
      |                ^~~~~~~~~~~
      |                |
      |                const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_NonlinearSampleCountStrategy>::_Entry*
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h: In instantiation of ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_Entry* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetCacheEntryForPrim(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_BlurScaleStrategy; ImplData = bool]’:
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:420:21:   required from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::value_type* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetValue(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_BlurScaleStrategy; ImplData = bool; value_type = pxrInternal_v0_23__pxrReserved__::UsdImaging_BlurScaleStrategy::value_type]’
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:1174:33:   required from here
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:398:16: error: invalid conversion from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_BlurScaleStrategy>::_Entry*’ to ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_BlurScaleStrategy>::_Entry*’ [-fpermissive]
  398 |         return &it->second;
      |                ^~~~~~~~~~~
      |                |
      |                const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_BlurScaleStrategy>::_Entry*
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h: In instantiation of ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_Entry* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetCacheEntryForPrim(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_InheritedPrimvarStrategy; ImplData = bool]’:
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:420:21:   required from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::value_type* pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<Strategy, ImplData>::_GetValue(const pxrInternal_v0_23__pxrReserved__::UsdPrim&) const [with Strategy = pxrInternal_v0_23__pxrReserved__::UsdImaging_InheritedPrimvarStrategy; ImplData = bool; value_type = std::shared_ptr<pxrInternal_v0_23__pxrReserved__::UsdImaging_InheritedPrimvarStrategy::PrimvarRecord>]’
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:1232:38:   required from here
/build/usd/src/OpenUSD-23.05/pxr/usdImaging/usdImaging/resolvedAttributeCache.h:398:16: error: invalid conversion from ‘const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_InheritedPrimvarStrategy>::_Entry*’ to ‘pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_InheritedPrimvarStrategy>::_Entry*’ [-fpermissive]
  398 |         return &it->second;
      |                ^~~~~~~~~~~
      |                |
      |                const pxrInternal_v0_23__pxrReserved__::UsdImaging_ResolvedAttributeCache<pxrInternal_v0_23__pxrReserved__::UsdImaging_InheritedPrimvarStrategy>::_Entry*

There are more failures similar to this second failure which I believe all relate to

typename _CacheMap::const_iterator it = _cache.find(prim);
if (it != _cache.end()) {
return &it->second;

Changing the iterator to the none const version allows the build to succeed but if that was intended I would have expected it to be part of the PR.

@brechtvl
Copy link
Contributor Author

Thanks for testing. These errors seems to be due to a change to tbb::concurrent_unordered_map in TBB 2021, I've folded those fixes into #2460 now.

@loqs
Copy link

loqs commented Jun 23, 2023

Thank you for the quick response. 65c0d86 indeed fixed it.

@pixar-oss pixar-oss merged commit 08497e6 into PixarAnimationStudios:dev May 17, 2024
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

Successfully merging this pull request may close these issues.

5 participants