pykeio / ort

Fast ML inference & training for Rust with ONNX Runtime
https://ort.pyke.io/
Apache License 2.0
786 stars 91 forks source link

Link error #213

Closed 86maid closed 2 months ago

86maid commented 2 months ago
stable-x86_64-pc-windows-msvc
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.79.0 (129f3b996 2024-06-10)`

When I run cargo build, I get a link error

error: linking with `link.exe` failed: exit code: 1120
= note: LINK: warning LNK4098: Default library "LIBCMT" conflicts with other libraries; Use /NODEFAULTLIB:library
  onnxruntime.lib(utils.cc.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(old.cc.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(defs.cc.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(quantization_defs.obj) : error LNK2001: External symbol that could not be parsed __std_find_trivial_8
onnxruntime.lib(utils.cc.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(skip_layer_norm_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(onnx_transpose_optimism.obj) : error LNK2001: External symbol that could not be parsed __std_find_trivial_8
onnxruntime.lib(ort_optimizer_api_imp.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(old.cc.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(pad_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(nchwc_transformer.obj) : error LNK2001: External symbol that cannot be parsed __std_find_trivial_8
onnxruntime.lib(qdq_propagation.obj) : error LNK2001: External symbol that could not be parsed __std_find_trivial_8
onnxruntime.lib(quick_gelu_fusion.obj) : error LNK2001: External symbol that could not be parsed __std_find_trivial_8
onnxruntime.lib(matmul_activation_fusion.obj) : error LNK2001: External symbol that could not be parsed __std_find_trivial_8
onnxruntime.lib(matmul_add_fusion.obj) : error LNK2001: External symbol that could not be parsed __std_find_trivial_8
onnxruntime.lib(matmul_transpose_fusion.obj) : error LNK2001: External symbol that cannot be parsed __std_find_trivial_8
onnxruntime.lib(matmul_bn_fusion.obj) : error LNK2001: External symbol that could not be parsed __std_find_trivial_8
onnxruntime.lib(gemm_sum_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(gemm_transpose_fusion.obj) : error LNK2001: External symbol that could not be parsed __std_find_trivial_8
onnxruntime.lib(identity_elimination.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(layer_norm_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(div_mul_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(double_qdq_pairs_remover.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(fast_gelu_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(gemm_activation_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(constant_sharing.obj) : error LNK2001: External symbol that cannot be parsed __std_find_trivial_8
onnxruntime.lib(conv_add_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(conv_bn_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(conv_mul_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(graph_utils.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(qdq_final_cleanup.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(bias_dropout_fusion.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(bias_gelu_fusion.obj) : error LNK2001: External symbol that could not be parsed __std_find_trivial_8
onnxruntime.lib(ExecutionProvider.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(reduction_ops.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(pad.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(allocation_planner.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(fallback_cpu_capability.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(insert_cast_transformer.obj) : error LNK2001: External symbol that cannot be parsed __std_find_trivial_8
onnxruntime.lib(ensure_unique_dq_for_node_unit.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(transformer_memcpy.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(graph.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(kernel_registry.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(kernel_def_builder.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_8
onnxruntime.lib(graph_viewer.obj) : error LNK2001: External symbol that cannot be parsed __std_find_trivial_8
onnxruntime.lib(ostream_sink.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_1
onnxruntime.lib(stringpiece.obj) : error LNK2001: Unable to parse external symbol __std_find_trivial_1
onnxruntime.lib(inference_session.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_1
onnxruntime.lib(op_identifier_utils.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_1
onnxruntime.lib(einsum.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_1
onnxruntime.lib(defs.cc.obj) : error LNK2001: External symbol that could not be resolved __std_find_trivial_1
decahedron1 commented 2 months ago

What version of Visual Studio do you have installed? A recent version of VS 2022 is required.

86maid commented 2 months ago

Great! After I installed Visual Studio 2022, it was able to compile successfully.