AcademySoftwareFoundation / AcademySoftwareFoundation/OpenShadingLanguage
[BUILD] OptiX support on Windows
- Dominant language
- C++
- Stars
- 2.3k
- Forks
- 414
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 10
Description
I managed to build OSL project on Windows without OptiX support. With clang+llvm-18.1.8
Once I add OptiX support OptiX 8.0 or OptiX 9.0
CUDA 12.0
```
[build] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\include\yvals_core.h(892): error: static assertion failed with "error STL1002: Unexpected compiler version, expected CUDA 12.4 or newer."
```
When I update to CUDA 13.0
```
[build] clang++: warning: CUDA version is newer than the latest supported version 12.3 [-Wunknown-cuda-version]
[build] In file included from :1:
[build] C:\Users\Alexey\sandbox\clang+llvm-18.1.8-x86_64-pc-windows-msvc\lib\clang\18\include\__clang_cuda_runtime_wrapper.h:387:10: fatal error: 'texture_fetch_functions.h' file not found
[build] 387 | #include "texture_fetch_functions.h"
[build] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] 1 error generated when compiling for sm_60.
```
Also, dl and rt libraries are hardcoded here, but I'm sure it won't work on Windows.
https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/src/cmake/externalpackages.cmake#L153
Contributor guide
Research direction
Start with the Windows OptiX build errors in the issue and inspect src/cmake/externalpackages.cmake around line 153, where the dl and rt libraries are hardcoded. Reproduce the OptiX-enabled build with the listed LLVM, CUDA, and OptiX versions, then verify that OSL builds successfully on Windows with OptiX support and appropriate library handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, computer-graphics, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100