You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying one of the example clinfo.rs on my windows 11 , But i am having this error = note: LINK : fatal error LNK1181: cannot open input file 'OpenCL.lib'
Here is the full error stack
C:\Users\rdas6\OneDrive\Desktop\codespace\rust\ocl3>cargo install --path .
Installing ocl3 v0.1.0 (C:\Users\rdas6\OneDrive\Desktop\codespace\rust\ocl3)
Updating crates.io index
Compiling ocl3 v0.1.0 (C:\Users\rdas6\OneDrive\Desktop\codespace\rust\ocl3)
error: linking with `link.exe` failed: exit code: 1181
|
= note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\rdas6\\AppData\\Local\\Temp\\rustcykDZWl\\symbols.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.0.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.1.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.2.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.3.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.4.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.5.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.6.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.7.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.8.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.ocl3.fa3dac1d2aa4bbe3-cgu.9.rcgu.o" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.14ouda9ydpwkuv4x.rcgu.o" "/LIBPATH:C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps" "/LIBPATH:C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\libopencl3-c864fcfe47dd6d5f.rlib" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\libcl3-5427efd10e859ad9.rlib" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\libopencl_sys-41e47c09cc5fd5e7.rlib" "C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\liblibc-5c446dc1882793e3.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-f54c5a8dc7e7febf.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-92f7800729779464.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-6da5127b1b379d8e.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-efa74c8d8702db5b.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-e9ed0b4fbfe1d158.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-23c6870c75efea7d.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libminiz_oxide-19857ab63c6bf99c.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libadler-0d8b8ed2a2fb22e9.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-3a3d97b2ce691588.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-60ba5e33f92355d7.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-94c0a2e24d7696be.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-edd8efb6a2cb3252.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-cb8dd18d30da7a99.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-75c0b134deed8bd9.rlib" "C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-96d2ffc8ffc7b9b5.rlib" "OpenCL.lib" "OpenCL.lib" "legacy_stdio_definitions.lib" "kernel32.lib" "advapi32.lib" "bcrypt.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:C:\\Users\\rdas6\\OneDrive\\Desktop\\codespace\\rust\\ocl3\\target\\release\\deps\\ocl3.exe" "/OPT:REF,ICF" "/DEBUG" "/NATVIS:C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\rdas6\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
= note: LINK : fatal error LNK1181: cannot open input file 'OpenCL.lib'
error: could not compile `ocl3` (bin "ocl3") due to previous error
error: failed to compile `ocl3 v0.1.0 (C:\Users\rdas6\OneDrive\Desktop\codespace\rust\ocl3)`, intermediate artifacts can be found at `C:\Users\rdas6\OneDrive\Desktop\codespace\rust\ocl3\target`
here is my cargo.toml
[package]
name = "ocl3"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
opencl3 = "0.8"
Add LIB as system env variable. It should contain the path of the OpenCL.lib you installed. For my case, on my Windows machine, LIB resolves to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\lib\x64
Btw, this issue has nothing to do with this crate.
The fix for kenba/cl3#36 was to add static and dynamic features and to make dynamic linking the default feature. I believe that this crate should incorporate the change from cl3 to fix this issue.
Hi ,
I was trying one of the example clinfo.rs on my windows 11 , But i am having this error
= note: LINK : fatal error LNK1181: cannot open input file 'OpenCL.lib'
Here is the full error stack
here is my
cargo.toml
I am having opencl Compatiable drivers
+ I have downloaded the OpenCL from https://developer.nvidia.com/opencl but not sure where to place the OpenCl.lib
Rust Version
rustc 1.71.0 (8ede3aae2 2023-07-12)
Any assistance or insights on resolving this issue would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: