AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb
[BUG] Explicit instantiations crash Visual Studio 2017 linker in debug
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 774
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 34
Description
### Environment
Windows 10
OpenVDB v9.0.0
Visual Studio 2017, exact compiler version 14.16.27048.0
### Describe the bug
Turning on `USE_EXPLICIT_INSTANTIATIONS` in CMake debug mode causes a fatal error in the VS2017 linker with the following error:
`VolumeToMesh.obj: fatal error LNK1000: Internal error during BuildLibrary.EmitMember`
Turning off `USE_EXPLICIT_INSTANTIATIONS` fixes the issue.
### To Reproduce
Steps to reproduce the behavior:
1. Build with the Visual Studio 15 2017 Win64 generator in the Debug configuration.
2. See error in the linking stage
### Expected behavior
The compilation should succeed like it does on GCC 7.3.1 with the same source and `USE_EXPLICIT_INSTANTIATIONS` enabled.
Contributor guide
Research direction
Reproduce the failure using the Visual Studio 15 2017 Win64 generator, Debug configuration, and USE_EXPLICIT_INSTANTIATIONS enabled; the reported failure is at the VolumeToMesh.obj link stage. Compare this configuration with GCC 7.3.1, and consider the issue complete when the same source links successfully in the affected Visual Studio setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100