Skip to content
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

[onnx] Use _PROTOBUF_INSTALL_PREFIX from portfile.cmake for find_package(Protobuf) #238

Merged
merged 3 commits into from
Sep 1, 2024

Conversation

luncliff
Copy link
Owner

@luncliff luncliff commented Sep 1, 2024

Changes

2024-08-25T14:40:06.1885156Z [76/78] C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe   /TP -DABSL_CONSUME_DLL -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DPROTOBUF_USE_DLLS -D__ONNX_DISABLE_STATIC_REGISTRATION -D__STDC_FORMAT_MACROS -IC:\vcpkg\buildtrees\onnx\src\v1.16.2-6e1afa7aa3.clean -IC:\vcpkg\buildtrees\onnx\x64-windows-dbg -external:ID:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP  /EHsc /wd26812 /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -std:c++17 /EHsc /MDd /wd4146 /wd4244 /wd4267 /wd4996 /showIncludes /FoCMakeFiles\onnx_gtests.dir\onnx\test\cpp\shape_inference_test.cc.obj /FdCMakeFiles\onnx_gtests.dir\ /FS -c C:\vcpkg\buildtrees\onnx\src\v1.16.2-6e1afa7aa3.clean\onnx\test\cpp\shape_inference_test.cc
2024-08-25T14:40:06.1904990Z [77/78] C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\onnx_gtests.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe  CMakeFiles\onnx_gtests.dir\onnx\test\cpp\common_path_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\data_propagation_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\function_context_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\function_get_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\function_verify_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\inliner_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\ir_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\op_reg_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\parser_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\schema_registration_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\shape_inference_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\test_main.cc.obj  /out:onnx_gtests.exe /implib:onnx_gtests.lib /pdb:onnx_gtests.pdb /version:0.0 /machine:x64 /nologo    /debug /INCREMENTAL /subsystem:console  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\gtest.lib  onnx.lib  onnx_proto.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\bin\libprotobufd.dll  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\libprotobufd.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_internal.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_marshalling.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_reflection.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_config.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_program_name.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_private_handle_accessor.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_commandlineflag.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_commandlineflag_internal.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\utf8_range.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\utf8_validity.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\abseil_dll.lib  -ignore:4221  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
2024-08-25T14:40:06.1917569Z FAILED: onnx_gtests.exe 
2024-08-25T14:40:06.1934162Z C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\onnx_gtests.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe  CMakeFiles\onnx_gtests.dir\onnx\test\cpp\common_path_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\data_propagation_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\function_context_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\function_get_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\function_verify_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\inliner_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\ir_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\op_reg_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\parser_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\schema_registration_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\shape_inference_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\test_main.cc.obj  /out:onnx_gtests.exe /implib:onnx_gtests.lib /pdb:onnx_gtests.pdb /version:0.0 /machine:x64 /nologo    /debug /INCREMENTAL /subsystem:console  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\gtest.lib  onnx.lib  onnx_proto.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\bin\libprotobufd.dll  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\libprotobufd.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_internal.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_marshalling.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_reflection.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_config.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_program_name.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_private_handle_accessor.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_commandlineflag.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_commandlineflag_internal.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\utf8_range.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\utf8_validity.lib  D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\abseil_dll.lib  -ignore:4221  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
2024-08-25T14:40:06.1962477Z LINK Pass 1: command "C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe CMakeFiles\onnx_gtests.dir\onnx\test\cpp\common_path_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\data_propagation_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\function_context_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\function_get_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\function_verify_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\inliner_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\ir_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\op_reg_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\parser_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\schema_registration_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\shape_inference_test.cc.obj CMakeFiles\onnx_gtests.dir\onnx\test\cpp\test_main.cc.obj /out:onnx_gtests.exe /implib:onnx_gtests.lib /pdb:onnx_gtests.pdb /version:0.0 /machine:x64 /nologo /debug /INCREMENTAL /subsystem:console D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\gtest.lib onnx.lib onnx_proto.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\bin\libprotobufd.dll D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\libprotobufd.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_internal.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_marshalling.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_reflection.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_config.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_program_name.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_private_handle_accessor.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_commandlineflag.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\absl_flags_commandlineflag_internal.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\utf8_range.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\utf8_validity.lib D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\lib\abseil_dll.lib -ignore:4221 kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\onnx_gtests.dir/intermediate.manifest CMakeFiles\onnx_gtests.dir/manifest.res" failed (exit code 1107) with the following output:
2024-08-25T14:40:06.1975591Z D:\a\vcpkg-registry\vcpkg-registry\test\vcpkg_installed\x64-windows\debug\bin\libprotobufd.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x378
2024-08-25T14:40:06.1976402Z 
2024-08-25T14:40:06.1976594Z ninja: build stopped: subcommand failed.
2024-08-25T14:40:06.1976880Z 
2024-08-25T14:40:06.1976887Z 
2024-08-25T14:40:06.1977374Z [LogCollection][End]File:'C:\vcpkg\buildtrees\onnx\install-x64-windows-dbg-out.log'.
  • In CMake, test if _PROTOBUF_INSTALL_PREFIX is given. Use the value from portfile.cmake

References

Triplet Support

  • x64-windows
  • arm64-windows

Configuration

"vcpkg-configuration.json" changes for the release.

{
    "registries": [
        {
            "kind": "git",
            "repository": "https://github.com/luncliff/vcpkg-registry",
            "packages": [
                "onnx"
            ],
            "baseline": "..."
        }
    ]
}

@luncliff luncliff self-assigned this Sep 1, 2024
@luncliff luncliff changed the title [onnx] Fix find_package(Protobuf) related errors [onnx] Use _PROTOBUF_INSTALL_PREFIX from portfile.cmake for find_package(Protobuf) Sep 1, 2024
@luncliff luncliff merged commit b0eb603 into main Sep 1, 2024
24 of 27 checks passed
@luncliff luncliff deleted the port/onnx branch September 1, 2024 12:56
@luncliff luncliff added this to the Release for 2024 Q3 milestone Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant