AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb
[BUG] Clang 19: Linking Errors in NanoVDB CUDA Examples due to Undefined Symbol (Move Constructor GridHandle)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 777
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 34
Description
Environment
Operating System: debian13
Version / Commit SHA: OpenVDB 13.0.0 (release)
CMake Version: 3.31.6
Compiler: clang 19.1.7 (g++-14 as a reference)
Cuda: V13.1.80
Describe the problem
I'm trying to build OpenVDB as a standalone with NanoVDB and the NanoVDB examples.
Using Clang 19 as a compiler, I encounter numerous compilation issues with the CUDA-specific examples. The error usually indicates an undefined symbol related to nanovdb::GridHandle, such as:
error: undefined symbol: nanovdb::GridHandle<nanovdb::cuda::DeviceBuffer>::GridHandle<nanovdb::cuda::DeviceBuffer, 0>(nanovdb::cuda::DeviceBuffer&&)
Additional context
I don't have any issues when running simple CUDA kernels or using a cuda kernal that reads and prints values from a nanovdb grid provided that I don't use the CreateNanoGrid and similar functions that call the move constructor of nanovdb::GridHandlenanovdb::cuda::DeviceBuffer. It seems that in this setup, the symbol is not exported by the nvcc-compiled object file .cu.o even though GridHandle.cuh should instantiate the move constructor.
Also, using g++-14 in my environment, the examples compile without issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the NanoVDB CUDA examples with Clang 19 using the stated OpenVDB 13.0.0, CMake 3.31.6, and CUDA 13.1. Start with GridHandle.cuh and the nvcc-compiled .cu.o mentioned in the report, then compare the Clang and g++-14 builds. Done means the CUDA examples link without the undefined GridHandle move-constructor symbol.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100