Skip to content

Commit

Permalink
Fix Windows Release CI failure due to unresolved external symbol (onn…
Browse files Browse the repository at this point in the history
…x#5678)

### Description
<!-- - Describe your changes. -->
Fix Windows Release CI failure : `onnx.lib(checker.obj) : error LNK2001:
unresolved external symbol "public: int __thiscall
google::protobuf::RepeatedField<int>::size(void)const "
(?size@?$RepeatedField@H@protobuf@google@@QBEHXZ)
[D:\a\onnx\onnx\onnx\.setuptools-cmake-build\onnx_cpp2py_export.vcxproj]`
by setting PATH properly. We should use prepend instead of append.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
Try to fix onnx#5659. Currently Windows
Release CI starts to fail after onnx#5596.

---------

Signed-off-by: jcwchen <jacky82226@gmail.com>
  • Loading branch information
jcwchen authored Oct 20, 2023
1 parent bbe7011 commit 9bf7833
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmake/summary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function (onnx_print_configuration_summary)
message(STATUS " ONNX_WERROR : ${ONNX_WERROR}")
message(STATUS " ONNX_BUILD_TESTS : ${ONNX_BUILD_TESTS}")
message(STATUS " ONNX_BUILD_BENCHMARKS : ${ONNX_BUILD_BENCHMARKS}")
message(STATUS " ONNX_BUILD_SHARED_LIBS : ${ONNX_BUILD_SHARED_LIBS}")
message(STATUS " BUILD_SHARED_LIBS : ${BUILD_SHARED_LIBS}")
message(STATUS "")
message(STATUS " Protobuf compiler : ${PROTOBUF_PROTOC_EXECUTABLE}")
message(STATUS " Protobuf includes : ${PROTOBUF_INCLUDE_DIRS}")
Expand Down
2 changes: 1 addition & 1 deletion workflow_scripts/protobuf/build_protobuf_win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ echo "Set paths"
$protoc_path = Join-Path -Path $protobuf_root_dir -ChildPath "protobuf_install\bin"
$protoc_lib_path = Join-Path -Path $protobuf_root_dir -ChildPath "protobuf_install\lib"
$protobuf_include_path = Join-Path -Path $protobuf_root_dir -ChildPath "protobuf_install\include"
$Env:PATH="$ENV:PATH;$protoc_path;$protoc_lib_path;$protobuf_include_path"
$Env:PATH="$protoc_path;$protoc_lib_path;$protobuf_include_path;$ENV:PATH"
$($Env:PATH).Split(';')
protoc
cd ../../

0 comments on commit 9bf7833

Please sign in to comment.