Coder Social home page Coder Social logo

Comments (19)

laramiel avatar laramiel commented on June 6, 2024 1

Yeah, I'm just wondering if it builds there as an independent data point.

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024 1

A few reruns later:

C:\Misc\tensorstore-ninja22>ninja -k 99
[1/1413] Generating upb/reflection/stage1/google/protobuf/....h, upb/reflection/stage1/google/protobuf/descriptor.upb.c
FAILED: _deps/upb-build/upb/reflection/stage1/google/protobuf/descriptor.upb.h _deps/upb-build/upb/reflection/stage1/google/protobuf/descriptor.upb.c C:/Misc/tensorstore-ninja22/_deps/upb-build/upb/reflection/stage1/google/protobuf/descriptor.upb.h C:/Misc/tensorstore-ninja22/_deps/upb-build/upb/reflection/stage1/google/protobuf/descriptor.upb.c
cmd.exe /C "cd /D C:\Misc\tensorstore-ninja22\_deps\upb-src && bash -c "C:/Misc/tensorstore-ninja22/bin/Protobuf_protoc.exe --plugin=protoc-gen-upb=C:/Misc/tensorstore-ninja22/bin/upb_upbc_protoc-gen-upb_stage0.exe -IC:/Misc/tensorstore-ninja22/_deps/upb-src/bootstrap --upb_out=C:\/Misc/tensorstore-ninja22/_deps/upb-build/upb/reflection/stage1 google/protobuf/descriptor.proto""
/bin/bash: C:/Misc/tensorstore-ninja22/bin/Protobuf_protoc.exe: No such file or directory
[2/1413] Generating upbc/stage1/google/protobuf/compiler/plugin.upb.h, upbc/stage1/google/protobuf/compiler/plugin.upb.c
FAILED: _deps/upb-build/upbc/stage1/google/protobuf/compiler/plugin.upb.h _deps/upb-build/upbc/stage1/google/protobuf/compiler/plugin.upb.c C:/Misc/tensorstore-ninja22/_deps/upb-build/upbc/stage1/google/protobuf/compiler/plugin.upb.h C:/Misc/tensorstore-ninja22/_deps/upb-build/upbc/stage1/google/protobuf/compiler/plugin.upb.c
cmd.exe /C "cd /D C:\Misc\tensorstore-ninja22\_deps\upb-src && bash -c "C:/Misc/tensorstore-ninja22/bin/Protobuf_protoc.exe --plugin=protoc-gen-upb=C:/Misc/tensorstore-ninja22/bin/upb_upbc_protoc-gen-upb_stage0.exe -IC:/Misc/tensorstore-ninja22/_deps/upb-src/bootstrap --upb_out=C:\/Misc/tensorstore-ninja22/_deps/upb-build/upbc/stage1 google/protobuf/compiler/plugin.proto""
/bin/bash: C:/Misc/tensorstore-ninja22/bin/Protobuf_protoc.exe: No such file or directory
ninja: build stopped: cannot make progress due to previous errors.

C:\Misc\tensorstore-ninja22>C:/Misc/tensorstore-ninja22/bin/Protobuf_protoc.exe --version
libprotoc 23.2

C:\Misc\tensorstore-ninja22>

It seems that bash is hardcoded as the command interpreter, and it does not interpret Windows-style path properly.

from tensorstore.

jbms avatar jbms commented on June 6, 2024 1

Thanks for your additional tests. It is helpful to know that it fails also with ninja because that means we don't need to worry about debugging with the visual studio generator in particular.

I suspect the issue may be related to the specific build of bash that you have in your path. Can you tell us what that is? We test with bash from git for windows.

@tbirdso I think you are actually getting a separate error --- that bash is not found.

I believe previously the build did not require bash on Windows but it is not required due to the changes in the protobuf build. We might be able to change the protobuf build to not require bash, which would simplify things on Windows.

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024 1

With git's bash in the path before WSL's, ninja configuration builds.

from tensorstore.

tbirdso avatar tbirdso commented on June 6, 2024 1

I can confirm adding "C:\Program Files\Git\bin" to env:PATH also resolves build failures with MSVC. Thank you @laramiel @jbms !

@dzenanz Let's plan to note bash as a build prerequisite for ITKIOOMEZarrNGFF when updating the tensorstore hash.

from tensorstore.

tbirdso avatar tbirdso commented on June 6, 2024

Hi @dzenanz , just weighing in out of interest, I am a bit confused because it looks like the first error is here:

916>/bin/bash: C:/Misc/tensorstore-vs22/bin/Debug/Protobuf_protoc.exe: No such file or directory

But VS22 seems to have built that executable earlier:

892>Protobuf_protoc.vcxproj -> C:\Misc\tensorstore-vs22\bin\Debug\Protobuf_protoc.exe

Could you confirm whether that file exists on your local machine? Does the error still throw when you try to build again?

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024

It also fails to build in RelWithDebInfo mode:

1221>------ Skipped Build: Project: ALL_BUILD, Configuration: RelWithDebInfo x64 ------
1221>Project not selected to build for this solution configuration 
========== Build: 1042 succeeded, 173 failed, 0 up-to-date, 6 skipped ==========

@tbirdso Protobuf_protoc.exe exist in that path, and an incremental build is not successful either.

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024

Incremental build built 15 more projects: Build: 15 succeeded, 173 failed, 1027 up-to-date, 6 skipped

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024

Second incremental build had the same result. But as the number of failed projects remains at 173, it means that repeated builds do no compile anything new.

from tensorstore.

laramiel avatar laramiel commented on June 6, 2024

First error snippet:

893>upb_upbc_protoc-gen-upb_stage0.vcxproj -> C:\Misc\tensorstore-vs22\bin\Debug\upb_upbc_protoc-gen-upb_stage0.exe
916>------ Build started: Project: genrule__upb_upbc_gen_plugin_upb_proto_stage1, Configuration: Debug x64 ------
917>------ Build started: Project: genrule__upb_gen_descriptor_upb_proto_stage1, Configuration: Debug x64 ------
916>Generating upbc/stage1/google/protobuf/compiler/plugin.upb.h, upbc/stage1/google/protobuf/compiler/plugin.upb.c
917>Generating upb/reflection/stage1/google/protobuf/descriptor.upb.h, upb/reflection/stage1/google/protobuf/descriptor.upb.c
916>/bin/bash: C:/Misc/tensorstore-vs22/bin/Debug/Protobuf_protoc.exe: No such file or directory
917>/bin/bash: C:/Misc/tensorstore-vs22/bin/Debug/Protobuf_protoc.exe: No such file or directory
916>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(249,5): error MSB8066: Custom build for 'C:\Misc\tensorstore-vs22\CMakeFiles\e6afb379168cf807d732f1d4cca98ee2\plugin.upb.h.rule;C:\Misc\tensorstore-vs22\CMakeFiles\f3312a6eaeeebee8f12b9640a0c43927\genrule__upb_upbc_gen_plugin_upb_proto_stage1.rule;C:\Misc\tensorstore-vs22\_deps\upb-src\CMakeLists.txt' exited with code 127.
916>Done building project "genrule__upb_upbc_gen_plugin_upb_proto_stage1.vcxproj" -- FAILED.
917>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(249,5): error MSB8066: Custom build for 'C:\Misc\tensorstore-vs22\CMakeFiles\18b5926fa1336130d811e53a248142b0\descriptor.upb.h.rule;C:\Misc\tensorstore-vs22\CMakeFiles\f3312a6eaeeebee8f12b9640a0c43927\genrule__upb_gen_descriptor_upb_proto_stage1.rule;C:\Misc\tensorstore-vs22\_deps\upb-src\CMakeLists.txt' exited with code 127.
917>Done building project "genrule__upb_gen_descriptor_upb_proto_stage1.vcxproj" -- FAILED.
918>------ Build started: Project: upb_descriptor_upb_proto_stage1, Configuration: Debug x64 ------
918>Building Custom Rule C:/Misc/tensorstore-vs22/_deps/upb-src/CMakeLists.txt
912>tensorstore_kvstore_grpc_common_proto__cpp_library.vcxproj -> C:\Misc\tensorstore-vs22\Debug\tensorstore_kvstore_grpc_common_proto__cpp_library.lib
907>Googleapis_google_api_annotations_proto__cpp_library.vcxproj -> C:\Misc\tensorstore-vs22\_deps\googleapis-build\Debug\Googleapis_google_api_annotations_proto__cpp_library.lib
919>------ Build started: Project: tensorstore_kvstore_grpc_kvstore_proto__cpp_library, Configuration: Debug x64 ------
891>objective_c_generator.cc
920>------ Build started: Project: Googleapis_google_iam_v1_policy_proto__cpp_library, Configuration: Debug x64 ------
921>------ Build started: Project: Googleapis_google_iam_v1_options_proto__cpp_library, Configuration: Debug x64 ------
918>descriptor.upb.c
918>c1 : fatal  error C1083: Cannot open source file: 'C:\Misc\tensorstore-vs22\_deps\upb-build\upb\reflection\stage1\google\protobuf\descriptor.upb.c': No such file or directory
918>Done building project "upb_descriptor_upb_proto_stage1.vcxproj" -- FAILED.
922>------ Build started: Project: upb_upbc_plugin_upb_proto_stage1, Configuration: Debug x64 ------
923>------ Build started: Project: upb_reflection_internal_stage1, Configuration: Debug x64 ------
919>Running cpp protocol buffer compiler on C:/Misc/tensorstore/tensorstore/kvstore/grpc/kvstore.proto, protoc-options: --experimental_allow_proto3_optional
923>Building Custom Rule C:/Misc/tensorstore-vs22/_deps/upb-src/CMakeLists.txt
921>Running cpp protocol buffer compiler on C:/Misc/tensorstore-vs22/_deps/googleapis-src/google/iam/v1/options.proto, protoc-options: --experimental_allow_proto3_optional
922>Building Custom Rule C:/Misc/tensorstore-vs22/_deps/upb-src/CMakeLists.txt
920>Running cpp protocol buffer compiler on C:/Misc/tensorstore-vs22/_deps/googleapis-src/google/iam/v1/policy.proto, protoc-options: --experimental_allow_proto3_optional
921>Building Custom Rule C:/Misc/tensorstore-vs22/_deps/googleapis-src/CMakeLists.txt
922>plugin.upb.c
922>c1 : fatal  error C1083: Cannot open source file: 'C:\Misc\tensorstore-vs22\_deps\upb-build\upbc\stage1\google\protobuf\compiler\plugin.upb.c': No such file or directory
922>Done building project "upb_upbc_plugin_upb_proto_stage1.vcxproj" -- FAILED.
923>def_builder.c
923>C:\Misc\tensorstore-vs22\_deps\upb-src\upb/reflection/common.h(44,10): fatal  error C1083: Cannot open include file: 'google/protobuf/descriptor.upb.h': No such file or directory
923>def_pool.c
923>C:\Misc\tensorstore-vs22\_deps\upb-src\upb/reflection/common.h(44,10): fatal  error C1083: Cannot open include file: 'google/protobuf/descriptor.upb.h': No such file or directory

What CMake generator are you using? We test with ninja, so maybe try that.

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024

I am using Visual Studio 17 2022 generator. Ninja is friendly for automated builds, but I need to develop, so I am using VS generator. The bug in question is sporadic failure, which I think stems from a destructor not being always called: InsightSoftwareConsortium/ITKIOOMEZarrNGFF#36 (comment)

Is there some way to call that destructor from here: https://github.com/InsightSoftwareConsortium/ITKIOOMEZarrNGFF/blob/v0.1.7/src/itkOMEZarrNGFFImageIO.cxx#L811

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024

That also fails:

C:\Misc\tensorstore-ninja22>ninja
[62/5038] Building CXX object CMakeFiles\tensorstore_data_type.dir\tensorstore\data_type.cc.obj
C:\Misc\tensorstore\tensorstore\data_type.cc(296): warning C4002: too many arguments for function-like macro invocation 'TENSORSTORE_INTERNAL_CONVERT_INT'
C:\Misc\tensorstore\tensorstore\data_type.cc(297): warning C4002: too many arguments for function-like macro invocation 'TENSORSTORE_INTERNAL_CONVERT_FLOAT'
[274/5038] Building CXX object CMakeFiles\tensorstore_data_type_test.dir\tensorstore\data_type_test.cc.obj
C:\Misc\tensorstore\tensorstore\data_type_test.cc(55): warning C4002: too many arguments for function-like macro invocation 'X'
C:\Misc\tensorstore\tensorstore\data_type_test.cc(85): warning C4002: too many arguments for function-like macro invocation 'X'
[566/5038] Building CXX object CMakeFiles\tensorstore_util_span_test.dir\tensorstore\util\span_test.cc.obj
C:\Misc\tensorstore\tensorstore\util\span.h(388) : warning C4715: 'tensorstore::span<int,3>::at': not all control paths return a value
C:\Misc\tensorstore\tensorstore\util\span.h(388) : warning C4715: 'tensorstore::span<int,-1>::at': not all control paths return a value
[606/5038] Building CXX object _deps\protobuf-build\CMakeF...\src\google\protobuf\generated_message_tctable_lite.cc.obj
C:\Misc\tensorstore-ninja22\_deps\protobuf-src\src\google\protobuf\generated_message_tctable_lite.cc(1441): warning C4141: 'inline': used more than once
C:\Misc\tensorstore-ninja22\_deps\protobuf-src\src\google\protobuf\generated_message_tctable_lite.cc(1458): warning C4141: 'inline': used more than once
C:\Misc\tensorstore-ninja22\_deps\protobuf-src\src\google\protobuf\generated_message_tctable_lite.cc(2448): warning C4141: 'inline': used more than once
[629/5038] Building CXX object _deps\protobuf-build\CMakeF..._protobuf_nowkt.dir\src\google\protobuf\text_format.cc.obj
C:\Misc\tensorstore-ninja22\_deps\protobuf-src\src\google\protobuf\text_format.cc(905): warning C4805: '==': unsafe mix of type 'bool' and type 'uint64_t' in operation
[980/5038] Building C object _deps\upb-build\CMakeFiles\upb_mem_internal.dir\upb\mem\arena.c.obj
C:\Misc\tensorstore-ninja22\_deps\upb-src\upb\mem\arena.c(186): warning C4116: unnamed type definition in parentheses
[987/5038] Building C object _deps\upb-build\CMakeFiles\upb_mini_table_internal.dir\upb\mini_table\decode.c.obj
C:\Misc\tensorstore-ninja22\_deps\upb-src\upb\mini_table\decode.c(359): warning C4116: unnamed type definition in parentheses
[1658/5038] Generating upb/reflection/stage1/google/protob....h, upb/reflection/stage1/google/protobuf/descriptor.upb.c
FAILED: _deps/upb-build/upb/reflection/stage1/google/protobuf/descriptor.upb.h _deps/upb-build/upb/reflection/stage1/google/protobuf/descriptor.upb.c C:/Misc/tensorstore-ninja22/_deps/upb-build/upb/reflection/stage1/google/protobuf/descriptor.upb.h C:/Misc/tensorstore-ninja22/_deps/upb-build/upb/reflection/stage1/google/protobuf/descriptor.upb.c
cmd.exe /C "cd /D C:\Misc\tensorstore-ninja22\_deps\upb-src && bash -c "C:/Misc/tensorstore-ninja22/bin/Protobuf_protoc.exe --plugin=protoc-gen-upb=C:/Misc/tensorstore-ninja22/bin/upb_upbc_protoc-gen-upb_stage0.exe -IC:/Misc/tensorstore-ninja22/_deps/upb-src/bootstrap --upb_out=C:\/Misc/tensorstore-ninja22/_deps/upb-build/upb/reflection/stage1 google/protobuf/descriptor.proto""
/bin/bash: C:/Misc/tensorstore-ninja22/bin/Protobuf_protoc.exe: No such file or directory
[1659/5038] Generating upbc/stage1/google/protobuf/compile...n.upb.h, upbc/stage1/google/protobuf/compiler/plugin.upb.c
FAILED: _deps/upb-build/upbc/stage1/google/protobuf/compiler/plugin.upb.h _deps/upb-build/upbc/stage1/google/protobuf/compiler/plugin.upb.c C:/Misc/tensorstore-ninja22/_deps/upb-build/upbc/stage1/google/protobuf/compiler/plugin.upb.h C:/Misc/tensorstore-ninja22/_deps/upb-build/upbc/stage1/google/protobuf/compiler/plugin.upb.c
cmd.exe /C "cd /D C:\Misc\tensorstore-ninja22\_deps\upb-src && bash -c "C:/Misc/tensorstore-ninja22/bin/Protobuf_protoc.exe --plugin=protoc-gen-upb=C:/Misc/tensorstore-ninja22/bin/upb_upbc_protoc-gen-upb_stage0.exe -IC:/Misc/tensorstore-ninja22/_deps/upb-src/bootstrap --upb_out=C:\/Misc/tensorstore-ninja22/_deps/upb-build/upbc/stage1 google/protobuf/compiler/plugin.proto""
/bin/bash: C:/Misc/tensorstore-ninja22/bin/Protobuf_protoc.exe: No such file or directory
[1683/5038] Building ASM_NASM object _deps\aom-build\CMake...\aom_dsp_x86_asm.dir\aom_dsp\x86\highbd_sad4d_sse2.asm.obj
ninja: build stopped: subcommand failed.

from tensorstore.

tbirdso avatar tbirdso commented on June 6, 2024

As additional data point here, I am able to reproduce @dzenanz 's results with MSVC on Windows 11 when building from tensorstore@master in Release mode:

...
17>------ Build started: Project: genrule__upb_gen_descriptor_upb_proto_stage1, Configuration: Release x64 ------
17>Generating upb/reflection/stage1/google/protobuf/descriptor.upb.h, upb/reflection/stage1/google/protobuf/descriptor.upb.c
17>'bash' is not recognized as an internal or external command,
17>operable program or batch file.
17>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for 'D:\repos\ITKNGFF-tst\CMakeFiles\f2d05fd07f5c5d81252321f7bf5e710a\descriptor.upb.h.rule;D:\repos\ITKNGFF-tst\CMakeFiles\6df025c99a88b38c49b7e5d3fe69be96\genrule__upb_gen_descriptor_upb_proto_stage1.rule' exited with code 9009.
17>Done building project "genrule__upb_gen_descriptor_upb_proto_stage1.vcxproj" -- FAILED.
...

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024

There are also 173 projects failing to build with Visual Studio 2019 (16.11.29).

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024
C:\Users\Dzenan>bash --version
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

C:\Users\Dzenan>where bash
C:\Windows\System32\bash.exe

C:\Users\Dzenan>git-bash --version
'git-bash' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Dzenan>"C:\Program Files\Git\bin\bash.exe" --version
GNU bash, version 5.2.15(1)-release (x86_64-pc-msys)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I don't remember installing a system-wide bash, so I don't know where C:\Windows\System32\bash.exe came from.

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024

These are details of C:\Windows\System32\bash.exe:
Screenshot 2023-08-31 11 18 03

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024

I have Windows 11 22H2 (OS Build 22621.2215).

from tensorstore.

jbms avatar jbms commented on June 6, 2024

I think the version of bash in your path is a launcher for bash running in Windows subsystem for Linux 2 (WSL2). As that is a separate virtual machine it isn't going to work.

Can you try building with git bash (often at C:\Program Files\Git\bin\bash.exe) in your path?

from tensorstore.

dzenanz avatar dzenanz commented on June 6, 2024

OK, but git's bash should be added to tensorstore's build requirements too, unless that dependence is alleviated. Which might be possible, as it was introduced recently-ish.

from tensorstore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.