-
Notifications
You must be signed in to change notification settings - Fork 706
Fix Clang Template errors #1977
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
Fix Clang Template errors #1977
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see request for minor change
Upcoming versions of Clang/LLVM change some behaviour around templating that causes OpenVDB to fail to compile. This commit addresses two issues and allows VDB to compile again. 1. There were three instances of an unnecessary template keyword in NodeManager.h that were not followed by a template call, and therefore are illegal to the compiler. 2. GridBuilder.h had a template call to a non-existent method. This was not previously validated, but is now validated. Switching the symbol from `isActive` to `isOn` per Ken's review. See the [changelog](https://releases.llvm.org/19.1.0/tools/clang/docs/ReleaseNotes.html#improvements-to-clang-s-diagnostics:~:text=Clang%20now%20looks%20up%20members%20of%20the%20current%20instantiation%20in%20the%20template%20definition%20context%20if%20the%20current%20instantiation%20has%20no%20dependent%20base%20classes.) for Clang and the associated [PR for the second point above](llvm/llvm-project#84050) Signed-off-by: Dhruv Govil <[email protected]>
62c002c
to
e3ee850
Compare
Can confirm that this PR fixes the issue I have when building Blender with clang19 on linux (reported as #1976). |
@dgovil @kmuseth Thanks for identifying, patching, and landing this one so quickly. We're tracking this one for our next release of OpenUSD in May. I was wondering if there'll be a tagged release or patch we can point to in order to pick up this fix? cc/ @jesschimein |
AcademySoftwareFoundation/openvdb#1977 fixed a syntax issue that caused errors when building with Xcode 16.3. This change updates build_usd.py to apply the (simple) patch to the version of OpenVDB it builds. We manually back-port this fix for a few reasons: - The PR was merged in December 2024, but is currently not part of an official release. - build_usd.py currently uses OpenVDB 9.1.0, which is several major versions behind the current latest version 12.0.0. Even if the PR were released in a new 12.x version, we wouldn't want to jump all the way there since it's so far ahead of what we're building and testing against internally. If OpenVDB officially ports the fix back to older versions, we can revert this change and just update build_usd.py to pull in the official release instead. (Internal change: 2359154)
Upcoming versions of Clang/LLVM change some behaviour around templating that causes OpenVDB to fail to compile.
This commit addresses two issues and allows VDB to compile again.
There were three instances of an unnecessary template keyword in NodeManager.h that were not followed by a template call, and therefore are illegal to the compiler.
GridBuilder.h had a template call to a non-existent method. This was not previously validated, but is now validated. Switching the call from
isActive
toisOn
works (as suggested by Ken).See the changelog for Clang and the associated PR for the second point above
This fixes #1976
Built on macOS with the following build args