Closed stukowski closed 9 months ago
devel
8d31a2fd9ad859d1ea0e9594bcea1f50515c5173 has a fix.
When building OSPRay 3.0.0 on Windows/MSVC with OSPRAY_ENABLE_VOLUMES=OFF
, I am getting the following linker error:
FAILED: ospray_module_cpu.dll ospray_module_cpu.lib
cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_dll --intdir=modules\cpu\CMakeFiles\ospray_module_cpu.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~1\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\ospray_module_cpu.rsp /out:ospray_module_cpu.dll /implib:ospray_module_cpu.lib /pdb:ospray_module_cpu.pdb /dll /version:3.0 /machine:x64 /INCREMENTAL:NO /DEF:C:\Users\stuko\ovito\deps\ospray\build\modules\cpu\ospray_module_cpu.def /DEF:modules\cpu\ospray_module_cpu.def && cd ."
LINK: command "C:\PROGRA~2\MICROS~1\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\ospray_module_cpu.rsp /out:ospray_module_cpu.dll /implib:ospray_module_cpu.lib /pdb:ospray_module_cpu.pdb /dll /version:3.0 /machine:x64 /INCREMENTAL:NO /DEF:C:\Users\stuko\ovito\deps\ospray\build\modules\cpu\ospray_module_cpu.def /DEF:modules\cpu\ospray_module_cpu.def /MANIFEST /MANIFESTFILE:ospray_module_cpu.dll.manifest" failed (exit code 1120) with the following output:
ospray_module_cpu.def : error LNK2001: unresolved external symbol LinearTransferFunction_get___un_3C_s_5B__c_unTransferFunction_5D__3E_vyf_avx
ospray_module_cpu.def : error LNK2001: unresolved external symbol LinearTransferFunction_get___un_3C_s_5B__c_unTransferFunction_5D__3E_vyf_avx2
ospray_module_cpu.def : error LNK2001: unresolved external symbol LinearTransferFunction_get___un_3C_s_5B__c_unTransferFunction_5D__3E_vyf_sse4
ospray_module_cpu.def : error LNK2001: unresolved external symbol TransferFunction_dispatch_get___un_3C_s_5B__c_unTransferFunction_5D__3E_vyf_avx
ospray_module_cpu.def : error LNK2001: unresolved external symbol TransferFunction_dispatch_get___un_3C_s_5B__c_unTransferFunction_5D__3E_vyf_avx2
ospray_module_cpu.def : error LNK2001: unresolved external symbol TransferFunction_dispatch_get___un_3C_s_5B__c_unTransferFunction_5D__3E_vyf_sse4
ospray_module_cpu.def : error LNK2001: unresolved external symbol Volume_intersect_kernel___UM_un_3C_s_5B_unRTCIntersectFunctionNArguments_5D__3E__avx
ospray_module_cpu.def : error LNK2001: unresolved external symbol Volume_intersect_kernel___UM_un_3C_s_5B_unRTCIntersectFunctionNArguments_5D__3E__avx2
ospray_module_cpu.def : error LNK2001: unresolved external symbol Volume_intersect_kernel___UM_un_3C_s_5B_unRTCIntersectFunctionNArguments_5D__3E__sse4
ospray_module_cpu.lib : fatal error LNK1120: 9 unresolved externals
I was able to fix it by manually removing three corresponding lines from the file /modules/cpu/ispc_symbols.txt
:
https://github.com/stukowski/ospray/commit/a7a2114a3c1e0d4ae5b401d3497ee4ef6c9245b9
Windows build without OpenVKL is fixed in devel
https://github.com/ospray/ospray/commit/945a44ebc9fad2907a20a07f2a5bad90ff8b3aca.
With CMake settings
OSPRAY_ENABLE_VOLUMES=OFF
andOSPRAY_BUILD_ISA=NEON2X
I get:I would like to build OSPRay without OpenVKL, because my application doesn't use volume rendering functions. CMake
macro(ospray_configure_ispc_isa)
seems to still check the OpenVKL configuration even though it has been disabled.