-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Build] Build onnxrunime from source on Windows failed #17675
Comments
Same here for me libprotobuf-lite is causing lnk2005 |
@18930215187, Could you try rel-1.16.0? That version shall be good. |
@tianleiwu, Doesn't work for me still the same error I tried on 1.15.0
|
I think I shouldn't try rel-1.16.0, because the rust crate named ort(unofficial) is not support onnxruntime 1.16.0 yet, but I will help you identify the problem by this way |
@tianleiwu The same error occured |
It looks like libprotobuf-lite.lib (static lib) contains its own DLL. It may cause duplicate symbols. |
@kazssym , How can I solve this problem? |
Could you try adding -skip_submodule_sync |
@mszhanyi The same error occured |
Unfortunately, I don't know much about how the library was built. It probably requires to be rebuilt? |
How about adding "--cmake_extra_defines FETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER" to your build command? If the problem still exists, please try to do the build in a clean docker container or a clean newly installed Windows machine. |
You hit the issue because the protobuf was fetched from vcpkg
However, its build config it incompatible with the other libs. Please do it without vcpkg. |
Describe the issue
Build onnxrunime from source on Windows failed (error LNK2019)
CUDA: 11.8.0_522.06 ( 12.2 on my PC too)
cuDNN: 8.7.0.84
TensorRT: 8.6.1.6
GPU: nvidia A4000
Urgency
2023/09/27
Target platform
Windows
Build script
git clone -b rel-1.15.1 --recursive https://github.com/Microsoft/onnxruntime
cd onnxruntime
./build.bat --build_shared_lib --config "MinSizeRel" --use_dml --use_cuda --use_tensorrt --parallel --skip_tests --compile_no_warning_as_error --cuda_home "G:\Environment\Device\CUDA\11.8" --cudnn_home "G:\Environment\Device\cuDNN" --tensorrt_home "G:\Environment\Device\tensorrt" --cmake_generator "Visual Studio 17 2022"
Error / output
Visual Studio Version
17.7.4
GCC / Compiler Version
No response
The text was updated successfully, but these errors were encountered: