tensorstore
tensorstore copied to clipboard
Compilation fails in Release mode on VS2019
Compiling the current version (f6da8b5696a04cb6f30fab07183756d0d67d5eaa) works well in Debug mode, but fail in Release and RelWithDebInfo modes. Incremental build log:
Build started...
1>------ Build started: Project: aom_config_h_tmpl, Configuration: RelWithDebInfo x64 ------
2>------ Build started: Project: aom_config_asm_tmpl, Configuration: RelWithDebInfo x64 ------
3>------ Build started: Project: aom_config_version_tmpl, Configuration: RelWithDebInfo x64 ------
4>------ Build started: Project: JPEG_configure_internal, Configuration: RelWithDebInfo x64 ------
5>------ Build started: Project: JPEG_jversion_config, Configuration: RelWithDebInfo x64 ------
6>------ Build started: Project: JPEG_configure, Configuration: RelWithDebInfo x64 ------
7>------ Build started: Project: dav1d_build_vcs_version_h, Configuration: RelWithDebInfo x64 ------
8>------ Build started: Project: dav1d_build_version_h, Configuration: RelWithDebInfo x64 ------
9>------ Build started: Project: tensorstore_proto_index_transform.proto__cc_protoc, Configuration: RelWithDebInfo x64 ------
10>------ Build started: Project: PNG_png_config, Configuration: RelWithDebInfo x64 ------
11>------ Build started: Project: tensorstore_proto_array.proto__cc_protoc, Configuration: RelWithDebInfo x64 ------
12>------ Build started: Project: tensorstore_internal_metrics_metrics.proto__cc_protoc, Configuration: RelWithDebInfo x64 ------
13>------ Build started: Project: tensorstore_proto_schema.proto__cc_protoc, Configuration: RelWithDebInfo x64 ------
14>------ Build started: Project: tensorstore_driver_cast_cast_test, Configuration: RelWithDebInfo x64 ------
15>------ Skipped Build: Project: NightlyMemoryCheck, Configuration: RelWithDebInfo x64 ------
15>Project not selected to build for this solution configuration
16>------ Skipped Build: Project: Continuous, Configuration: RelWithDebInfo x64 ------
16>Project not selected to build for this solution configuration
17>------ Skipped Build: Project: Nightly, Configuration: RelWithDebInfo x64 ------
17>Project not selected to build for this solution configuration
18>------ Skipped Build: Project: RUN_TESTS, Configuration: RelWithDebInfo x64 ------
18>Project not selected to build for this solution configuration
19>------ Skipped Build: Project: Experimental, Configuration: RelWithDebInfo x64 ------
19>Project not selected to build for this solution configuration
20>------ Build started: Project: aom_aom_dsp_rtcd, Configuration: RelWithDebInfo x64 ------
21>------ Build started: Project: aom_aom_scale_rtcd, Configuration: RelWithDebInfo x64 ------
22>------ Build started: Project: aom_av1_rtcd, Configuration: RelWithDebInfo x64 ------
23>------ Build started: Project: tensorstore_examples_extract_slice, Configuration: RelWithDebInfo x64 ------
14>cast_test.cc
23>extract_slice.obj : error LNK2019: unresolved external symbol "protected: void __cdecl riegeli::CFileWriterBase::InitializePos(struct _iobuf *,class std::optional<unsigned __int64>,bool)" (?InitializePos@CFileWriterBase@riegeli@@IEAAXPEAU_iobuf@@V?$optional@_K@std@@_N@Z) referenced in function "protected: void __cdecl riegeli::CFileWriter<class riegeli::OwnedCFile>::Initialize(class std::basic_string_view<char,struct std::char_traits<char> >,class riegeli::CFileWriterBase::Options &&)" (?Initialize@?$CFileWriter@VOwnedCFile@riegeli@@@riegeli@@IEAAXV?$basic_string_view@DU?$char_traits@D@std@@@std@@$$QEAVOptions@CFileWriterBase@2@@Z)
23>C:\Misc\tensorstore-vs19\bin\RelWithDebInfo\tensorstore_examples_extract_slice.exe : fatal error LNK1120: 1 unresolved externals
14>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(59,1): error C2607: static assertion failed
14>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(61,1): error C2607: static assertion failed
14>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(63,1): error C2607: static assertion failed
14>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(65,1): error C2607: static assertion failed
14>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(83,1): error C2607: static assertion failed
14>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(93,1): error C2607: static assertion failed
23>Done building project "tensorstore_examples_extract_slice.vcxproj" -- FAILED.
14>Done building project "tensorstore_driver_cast_cast_test.vcxproj" -- FAILED.
24>------ Skipped Build: Project: ALL_BUILD, Configuration: RelWithDebInfo x64 ------
24>Project not selected to build for this solution configuration
========== Build: 16 succeeded, 2 failed, 630 up-to-date, 6 skipped ==========
The full log is attached. Output-Build.txt
I use Microsoft Visual Studio Professional 2019 Version 16.11.20 (fully updated).
I will try to resolve those build errors. If the only errors are the ones shown, they appear to only be issues with some examples and tests, and should not affect usage of the library itself.
Visual Studio 2022 has more errors:
Build started...
1>------ Build started: Project: dav1d_build_version_h, Configuration: Release x64 ------
2>------ Build started: Project: dav1d_build_vcs_version_h, Configuration: Release x64 ------
3>------ Build started: Project: aom_config_version_tmpl, Configuration: Release x64 ------
4>------ Build started: Project: aom_config_h_tmpl, Configuration: Release x64 ------
5>------ Build started: Project: aom_config_asm_tmpl, Configuration: Release x64 ------
6>------ Skipped Build: Project: RUN_TESTS, Configuration: Release x64 ------
6>Project not selected to build for this solution configuration
7>------ Build started: Project: PNG_png_config, Configuration: Release x64 ------
8>------ Skipped Build: Project: NightlyMemoryCheck, Configuration: Release x64 ------
8>Project not selected to build for this solution configuration
9>------ Skipped Build: Project: Nightly, Configuration: Release x64 ------
9>Project not selected to build for this solution configuration
10>------ Build started: Project: tensorstore_proto_schema.proto__cc_protoc, Configuration: Release x64 ------
11>------ Build started: Project: tensorstore_proto_index_transform.proto__cc_protoc, Configuration: Release x64 ------
12>------ Build started: Project: tensorstore_proto_array.proto__cc_protoc, Configuration: Release x64 ------
13>------ Build started: Project: tensorstore_internal_metrics_metrics.proto__cc_protoc, Configuration: Release x64 ------
14>------ Build started: Project: aom_av1_rtcd, Configuration: Release x64 ------
15>------ Build started: Project: aom_aom_scale_rtcd, Configuration: Release x64 ------
16>------ Build started: Project: aom_aom_dsp_rtcd, Configuration: Release x64 ------
17>------ Build started: Project: JPEG_jversion_config, Configuration: Release x64 ------
18>------ Build started: Project: JPEG_configure_internal, Configuration: Release x64 ------
19>------ Build started: Project: JPEG_configure, Configuration: Release x64 ------
20>------ Skipped Build: Project: Experimental, Configuration: Release x64 ------
20>Project not selected to build for this solution configuration
21>------ Skipped Build: Project: Continuous, Configuration: Release x64 ------
21>Project not selected to build for this solution configuration
22>------ Build started: Project: tensorstore_internal_nditerable_copy_test, Configuration: Release x64 ------
23>------ Build started: Project: tensorstore_index_space_transpose_op_test, Configuration: Release x64 ------
24>------ Build started: Project: tensorstore_index_space_translate_op_test, Configuration: Release x64 ------
25>------ Build started: Project: tensorstore_index_space_single_index_slice_op_test, Configuration: Release x64 ------
26>------ Build started: Project: tensorstore_index_space_interval_slice_op_test, Configuration: Release x64 ------
27>------ Build started: Project: tensorstore_index_space_index_array_slice_op_test, Configuration: Release x64 ------
28>------ Build started: Project: tensorstore_driver_virtual_chunked_virtual_chunked_test, Configuration: Release x64 ------
29>------ Build started: Project: tensorstore_driver_cast_cast_test, Configuration: Release x64 ------
30>------ Build started: Project: tensorstore_examples_extract_slice, Configuration: Release x64 ------
23>transpose_op_test.cc
22>nditerable_copy_test.cc
26>interval_slice_op_test.cc
25>single_index_slice_op_test.cc
27>index_array_slice_op_test.cc
24>translate_op_test.cc
28>virtual_chunked_test.cc
22>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(202,1): error C2678: binary '|': no operator found which takes a left-hand operand of type 'tensorstore::Array<tensorstore::Shared<int>,1,tensorstore::ArrayOriginKind::zero,tensorstore::ContainerKind::container>' (or there is no acceptable conversion)
22>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\cstddef(42,27): message : could be 'std::byte std::operator |(const std::byte,const std::byte) noexcept' [found using argument-dependent lookup]
22>C:\Misc\tensorstore\tensorstore/data_type.h(376,42): message : or 'tensorstore::DataTypeConversionFlags tensorstore::operator |(tensorstore::DataTypeConversionFlags,tensorstore::DataTypeConversionFlags)' [found using argument-dependent lookup]
22>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(204,1): message : while trying to match the argument list '(tensorstore::Array<tensorstore::Shared<int>,1,tensorstore::ArrayOriginKind::zero,tensorstore::ContainerKind::container>, tensorstore::DimExpression<tensorstore::internal_index_space::IndexArraySliceOp<false,1,std::array<tensorstore::Array<tensorstore::Shared<const tensorstore::Index>,-1,tensorstore::ArrayOriginKind::zero,tensorstore::ContainerKind::view>,1>>,tensorstore::internal_index_space::DimensionList<std::array<tensorstore::DimensionIndex,1>>>)'
22>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(204,1): error C3536: 'tensorstore_assign_or_return_204': cannot be used before it is initialized
22>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(204,1): error C3539: a template-argument cannot be a type that contains 'auto'
22>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(202,1): error C2338: static_assert failed: 'TENSORSTORE_ASSIGN_OR_RETURN requires a Result value.'
22>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(204,1): error C3536: '_': cannot be used before it is initialized
22>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(202,1): error C2100: illegal indirection
22>Done building project "tensorstore_internal_nditerable_copy_test.vcxproj" -- FAILED.
29>cast_test.cc
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): error C3889: call to object of class type 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>': no matching call operator found
26>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): error C3889: call to object of class type 'tensorstore::DimExpression<tensorstore::internal_index_space::IntervalSliceOp<tensorstore::Index,tensorstore::Index,tensorstore::Index>,tensorstore::internal_index_space::AllDims>': no matching call operator found
24>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): error C3889: call to object of class type 'tensorstore::DimExpression<tensorstore::internal_index_space::TranslateOp<tensorstore::span<const tensorstore::Index,-1>,tensorstore::internal_index_space::TranslateOpKind::kTranslateBy>,tensorstore::internal_index_space::AllDims>': no matching call operator found
24>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2018,51): message : could be 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexTransform<'function',OutputRank,tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::TranslateOp<tensorstore::span<const tensorstore::Index,-1>,tensorstore::internal_index_space::TranslateOpKind::kTranslateBy>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexTransform<InputRank,OutputRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
24>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,17): message : Failed to specialize function template 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexTransform<'function',OutputRank,tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::TranslateOp<tensorstore::span<const tensorstore::Index,-1>,tensorstore::internal_index_space::TranslateOpKind::kTranslateBy>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexTransform<InputRank,OutputRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
24>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2018): message : see declaration of 'tensorstore::DimExpression<tensorstore::internal_index_space::TranslateOp<tensorstore::span<const tensorstore::Index,-1>,tensorstore::internal_index_space::TranslateOpKind::kTranslateBy>,tensorstore::internal_index_space::AllDims>::operator ()'
24>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : With the following template arguments:
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2018,51): message : could be 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexTransform<'function',OutputRank,tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexTransform<InputRank,OutputRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,17): message : Failed to specialize function template 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexTransform<'function',OutputRank,tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexTransform<InputRank,OutputRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2018): message : see declaration of 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : With the following template arguments:
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : 'InputRank=1'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : 'OutputRank=1'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : 'CKind=tensorstore::ContainerKind::container'
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2043,31): message : or 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexDomain<'function',tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexDomain<OtherRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,17): message : 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexDomain<'function',tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexDomain<OtherRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const': could not deduce template argument for 'tensorstore::IndexDomain<OtherRank,OtherCKind>' from 'const OriginalTransform'
25> with
25> [
25> OriginalTransform=tensorstore::IndexTransform<1,1,tensorstore::ContainerKind::container>
25> ]
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2043): message : see declaration of 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,17): message : 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexDomain<'function',tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexDomain<OtherRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const': could not deduce template argument for 'tensorstore::IndexDomain<OtherRank,OtherCKind>' from 'const OriginalTransform'
25> with
25> [
25> OriginalTransform=tensorstore::IndexTransform<1,1,tensorstore::ContainerKind::container>
25> ]
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2043): message : see declaration of 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()'
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2065,3): message : or 'ConditionalApplyIndexTransformResult<!tensorstore::IsIndexTransform<remove_cv<remove_reference<_Uty>::type>::type>>::type<const tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>&,Transformable> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(Transformable &&) const'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,17): message : Failed to specialize function template 'ConditionalApplyIndexTransformResult<!tensorstore::IsIndexTransform<remove_cv<remove_reference<_Uty>::type>::type>>::type<const tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>&,Transformable> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(Transformable &&) const'
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2065): message : see declaration of 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : With the following template arguments:
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : 'Transformable=const OriginalTransform &'
25>C:\Misc\tensorstore\tensorstore\index_space\single_index_slice_op_test.cc(311): message : see reference to function template instantiation 'void tensorstore::internal_index_space::TestDimExpressionError<tensorstore::IndexTransform<1,1,tensorstore::ContainerKind::container>,tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>>(const OriginalTransform &,const Expression &,absl::StatusCode,const std::string &)' being compiled
25> with
25> [
25> OriginalTransform=tensorstore::IndexTransform<1,1,tensorstore::ContainerKind::container>,
25> Expression=tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>
25> ]
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(289,1): error C3536: 'result': cannot be used before it is initialized
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(294,1): error C3889: call to object of class type 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>': no matching call operator found
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2018,51): message : could be 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexTransform<'function',OutputRank,tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexTransform<InputRank,OutputRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(294,25): message : Failed to specialize function template 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexTransform<'function',OutputRank,tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexTransform<InputRank,OutputRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2018): message : see declaration of 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(294,1): message : With the following template arguments:
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(294,1): message : 'InputRank=1'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(294,1): message : 'OutputRank=1'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(294,1): message : 'CKind=tensorstore::ContainerKind::container'
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2043,31): message : or 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexDomain<'function',tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexDomain<OtherRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(294,25): message : 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexDomain<'function',tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexDomain<OtherRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const': could not deduce template argument for 'tensorstore::IndexDomain<OtherRank,OtherCKind>' from 'tensorstore::IndexTransform<1,1,tensorstore::ContainerKind::container>'
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2043): message : see declaration of 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()'
... (log truncated because it is too long)
31>Project not selected to build for this solution configuration
========== Build: 16 succeeded, 9 failed, 623 up-to-date, 6 skipped ==========
With VS2022, the library fails to compile in Debug mode, with same/similar errors as Release mode.
Until this is resolved, our internal CI currently uses the following:
- Microsoft Visual Studio 2019 version 16.10.4.0
- Windows 11 SDK 22000
The first build error is in the riegeli dependency. If you have a moment it may help to do this:
DUMPBIN /SYMBOLS cfile_writer.obj
where cfile_writer.obj is the path to the compiled output of riegeli/bytes/cfile_writer.cc
Thanks. For the first one, examining the object dumps shows InitializePos symbol in debug, but it is not present in release. That, plus LNK2019, causes me to suspect that the compiler flags that affect inlining are different in the CMake vcproj builder.
You could try editing the source and adding __declspec(noinline)
or ABSL_ATTRIBUTE_NOINLINE
to ::InitializePos
. Or try adding the flag /Ob1.
https://learn.microsoft.com/en-us/cpp/cpp/noinline?view=msvc-170 https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/function-inlining-problems?view=msvc-170
jbms@ pointed out that for the link issue, the .cc files have methods marked 'inline' which should not be. I'm preparing a fix for riegeli.
The first error will be fixed at riegeli commit https://github.com/google/riegeli/commit/f10b305da3c9b8a36ee2b5eac182b20290035da2 and should be resolved by https://github.com/google/tensorstore/commit/a3f3ee23a8d27a5ba8c1faee944d3a23b00fedf4
One test still fails to compile on VS2019:
Build started...
1>------ Build started: Project: aom_config_h_tmpl, Configuration: RelWithDebInfo x64 ------
2>------ Build started: Project: aom_config_asm_tmpl, Configuration: RelWithDebInfo x64 ------
3>------ Build started: Project: aom_config_version_tmpl, Configuration: RelWithDebInfo x64 ------
4>------ Build started: Project: JPEG_configure, Configuration: RelWithDebInfo x64 ------
5>------ Build started: Project: JPEG_configure_internal, Configuration: RelWithDebInfo x64 ------
6>------ Build started: Project: JPEG_jversion_config, Configuration: RelWithDebInfo x64 ------
7>------ Build started: Project: dav1d_build_vcs_version_h, Configuration: RelWithDebInfo x64 ------
8>------ Build started: Project: aom_av1_rtcd, Configuration: RelWithDebInfo x64 ------
9>------ Build started: Project: aom_aom_scale_rtcd, Configuration: RelWithDebInfo x64 ------
10>------ Build started: Project: aom_aom_dsp_rtcd, Configuration: RelWithDebInfo x64 ------
11>------ Build started: Project: dav1d_build_version_h, Configuration: RelWithDebInfo x64 ------
12>------ Build started: Project: PNG_png_config, Configuration: RelWithDebInfo x64 ------
13>------ Build started: Project: tensorstore_proto_index_transform.proto__cc_protoc, Configuration: RelWithDebInfo x64 ------
14>------ Build started: Project: tensorstore_proto_array.proto__cc_protoc, Configuration: RelWithDebInfo x64 ------
15>------ Build started: Project: tensorstore_proto_schema.proto__cc_protoc, Configuration: RelWithDebInfo x64 ------
16>------ Build started: Project: tensorstore_internal_metrics_metrics.proto__cc_protoc, Configuration: RelWithDebInfo x64 ------
17>------ Build started: Project: tensorstore_driver_cast_cast_test, Configuration: RelWithDebInfo x64 ------
18>------ Skipped Build: Project: Continuous, Configuration: RelWithDebInfo x64 ------
18>Project not selected to build for this solution configuration
19>------ Skipped Build: Project: Nightly, Configuration: RelWithDebInfo x64 ------
19>Project not selected to build for this solution configuration
20>------ Skipped Build: Project: NightlyMemoryCheck, Configuration: RelWithDebInfo x64 ------
20>Project not selected to build for this solution configuration
21>------ Skipped Build: Project: Experimental, Configuration: RelWithDebInfo x64 ------
21>Project not selected to build for this solution configuration
22>------ Skipped Build: Project: RUN_TESTS, Configuration: RelWithDebInfo x64 ------
22>Project not selected to build for this solution configuration
17>cast_test.cc
17>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(59,1): error C2607: static assertion failed
17>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(61,1): error C2607: static assertion failed
17>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(63,1): error C2607: static assertion failed
17>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(65,1): error C2607: static assertion failed
17>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(83,1): error C2607: static assertion failed
17>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(93,1): error C2607: static assertion failed
17>Done building project "tensorstore_driver_cast_cast_test.vcxproj" -- FAILED.
23>------ Skipped Build: Project: ALL_BUILD, Configuration: RelWithDebInfo x64 ------
23>Project not selected to build for this solution configuration
========== Build: 16 succeeded, 1 failed, 645 up-to-date, 6 skipped ==========
VS2022 has more build errors:
Build started...
1>------ Build started: Project: dav1d_build_version_h, Configuration: Release x64 ------
2>------ Build started: Project: dav1d_build_vcs_version_h, Configuration: Release x64 ------
3>------ Build started: Project: aom_config_version_tmpl, Configuration: Release x64 ------
4>------ Build started: Project: aom_config_h_tmpl, Configuration: Release x64 ------
5>------ Build started: Project: aom_config_asm_tmpl, Configuration: Release x64 ------
6>------ Skipped Build: Project: RUN_TESTS, Configuration: Release x64 ------
6>Project not selected to build for this solution configuration
7>------ Build started: Project: PNG_png_config, Configuration: Release x64 ------
8>------ Skipped Build: Project: NightlyMemoryCheck, Configuration: Release x64 ------
8>Project not selected to build for this solution configuration
9>------ Skipped Build: Project: Nightly, Configuration: Release x64 ------
9>Project not selected to build for this solution configuration
10>------ Build started: Project: tensorstore_proto_schema.proto__cc_protoc, Configuration: Release x64 ------
11>------ Build started: Project: tensorstore_proto_index_transform.proto__cc_protoc, Configuration: Release x64 ------
12>------ Build started: Project: tensorstore_proto_array.proto__cc_protoc, Configuration: Release x64 ------
13>------ Build started: Project: tensorstore_internal_metrics_metrics.proto__cc_protoc, Configuration: Release x64 ------
14>------ Build started: Project: JPEG_jversion_config, Configuration: Release x64 ------
15>------ Build started: Project: JPEG_configure_internal, Configuration: Release x64 ------
16>------ Build started: Project: JPEG_configure, Configuration: Release x64 ------
17>------ Skipped Build: Project: Experimental, Configuration: Release x64 ------
17>Project not selected to build for this solution configuration
18>------ Skipped Build: Project: Continuous, Configuration: Release x64 ------
18>Project not selected to build for this solution configuration
19>------ Build started: Project: tensorstore_internal_nditerable_copy_test, Configuration: Release x64 ------
20>------ Build started: Project: tensorstore_index_space_transpose_op_test, Configuration: Release x64 ------
21>------ Build started: Project: aom_av1_rtcd, Configuration: Release x64 ------
22>------ Build started: Project: aom_aom_scale_rtcd, Configuration: Release x64 ------
23>------ Build started: Project: aom_aom_dsp_rtcd, Configuration: Release x64 ------
24>------ Build started: Project: tensorstore_index_space_translate_op_test, Configuration: Release x64 ------
25>------ Build started: Project: tensorstore_index_space_single_index_slice_op_test, Configuration: Release x64 ------
26>------ Build started: Project: tensorstore_index_space_interval_slice_op_test, Configuration: Release x64 ------
27>------ Build started: Project: tensorstore_index_space_index_array_slice_op_test, Configuration: Release x64 ------
28>------ Build started: Project: tensorstore_driver_virtual_chunked_virtual_chunked_test, Configuration: Release x64 ------
29>------ Build started: Project: tensorstore_driver_cast_cast_test, Configuration: Release x64 ------
26>interval_slice_op_test.cc
27>index_array_slice_op_test.cc
20>transpose_op_test.cc
25>single_index_slice_op_test.cc
24>translate_op_test.cc
19>nditerable_copy_test.cc
28>virtual_chunked_test.cc
19>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(202,1): error C2678: binary '|': no operator found which takes a left-hand operand of type 'tensorstore::Array<tensorstore::Shared<int>,1,tensorstore::ArrayOriginKind::zero,tensorstore::ContainerKind::container>' (or there is no acceptable conversion)
19>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\cstddef(42,27): message : could be 'std::byte std::operator |(const std::byte,const std::byte) noexcept' [found using argument-dependent lookup]
19>C:\Misc\tensorstore\tensorstore/data_type.h(376,42): message : or 'tensorstore::DataTypeConversionFlags tensorstore::operator |(tensorstore::DataTypeConversionFlags,tensorstore::DataTypeConversionFlags)' [found using argument-dependent lookup]
19>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(204,1): message : while trying to match the argument list '(tensorstore::Array<tensorstore::Shared<int>,1,tensorstore::ArrayOriginKind::zero,tensorstore::ContainerKind::container>, tensorstore::DimExpression<tensorstore::internal_index_space::IndexArraySliceOp<false,1,std::array<tensorstore::Array<tensorstore::Shared<const tensorstore::Index>,-1,tensorstore::ArrayOriginKind::zero,tensorstore::ContainerKind::view>,1>>,tensorstore::internal_index_space::DimensionList<std::array<tensorstore::DimensionIndex,1>>>)'
19>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(204,1): error C3536: 'tensorstore_assign_or_return_204': cannot be used before it is initialized
19>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(204,1): error C3539: a template-argument cannot be a type that contains 'auto'
19>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(202,1): error C2338: static_assert failed: 'TENSORSTORE_ASSIGN_OR_RETURN requires a Result value.'
19>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(204,1): error C3536: '_': cannot be used before it is initialized
19>C:\Misc\tensorstore\tensorstore\internal\nditerable_copy_test.cc(202,1): error C2100: illegal indirection
19>Done building project "tensorstore_internal_nditerable_copy_test.vcxproj" -- FAILED.
29>cast_test.cc
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): error C3889: call to object of class type 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>': no matching call operator found
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2018,51): message : could be 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexTransform<'function',OutputRank,tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexTransform<InputRank,OutputRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,17): message : Failed to specialize function template 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexTransform<'function',OutputRank,tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexTransform<InputRank,OutputRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2018): message : see declaration of 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : With the following template arguments:
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : 'InputRank=1'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : 'OutputRank=1'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,1): message : 'CKind=tensorstore::ContainerKind::container'
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2043,31): message : or 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexDomain<'function',tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexDomain<OtherRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const'
25>C:\Misc\tensorstore\tensorstore/index_space/internal/dim_expression_testutil.h(288,17): message : 'tensorstore::Result<enable_if<true&&'function'>=-1,tensorstore::IndexDomain<'function',tensorstore::ContainerKind::container>>::type> tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()(tensorstore::IndexDomain<OtherRank,OtherCKind>,tensorstore::DimensionIndexBuffer *) const': could not deduce template argument for 'tensorstore::IndexDomain<OtherRank,OtherCKind>' from 'const OriginalTransform'
25> with
25> [
25> OriginalTransform=tensorstore::IndexTransform<1,1,tensorstore::ContainerKind::container>
25> ]
25>C:\Misc\tensorstore\tensorstore/index_space/dim_expression.h(2043): message : see declaration of 'tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::span<const tensorstore::Index,-1>>,tensorstore::internal_index_space::AllDims>::operator ()'
..........
28>C:\Misc\tensorstore\tensorstore/data_type.h(376,42): message : or 'tensorstore::DataTypeConversionFlags tensorstore::operator |(tensorstore::DataTypeConversionFlags,tensorstore::DataTypeConversionFlags)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/open_mode.h(72,27): message : or 'tensorstore::OpenMode tensorstore::operator |(tensorstore::OpenMode,tensorstore::OpenMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/open_mode.h(117,32): message : or 'tensorstore::ReadWriteMode tensorstore::operator |(tensorstore::ReadWriteMode,tensorstore::ReadWriteMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/index_space/alignment.h(55,41): message : or 'tensorstore::DomainAlignmentOptions tensorstore::operator |(tensorstore::DomainAlignmentOptions,tensorstore::DomainAlignmentOptions)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/resize_options.h(55,36): message : or 'tensorstore::ResolveBoundsMode tensorstore::operator |(tensorstore::ResolveBoundsMode,tensorstore::ResolveBoundsMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/resize_options.h(128,29): message : or 'tensorstore::ResizeMode tensorstore::operator |(tensorstore::ResizeMode,tensorstore::ResizeMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(441,61): message : while trying to match the argument list '(tensorstore::Result<tensorstore::TensorStore<int,1,tensorstore::ReadWriteMode::write>>, tensorstore::DimExpression<tensorstore::internal_index_space::IntervalSliceOp<tensorstore::Index,tensorstore::Index,tensorstore::Index>,tensorstore::internal_index_space::DimensionList<std::array<tensorstore::DimensionIndex,1>>>)'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(439,38): error C2672: 'tensorstore::Write': no matching overloaded function found
28>C:\Misc\tensorstore\tensorstore/tensorstore.h(632,1): message : could be 'enable_if<tensorstore::internal::IsTensorStoreThatSupportsMode<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,tensorstore::ReadWriteMode::write>&&tensorstore::IsTransformedArrayLike<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type>&&tensorstore::internal::AreElementTypesCompatible<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type,internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,std::true_type>,tensorstore::WriteFutures>::type tensorstore::Write(SourceArray &&,Target &&,tensorstore::WriteOptions)'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(439,38): message : 'enable_if<tensorstore::internal::IsTensorStoreThatSupportsMode<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,tensorstore::ReadWriteMode::write>&&tensorstore::IsTransformedArrayLike<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type>&&tensorstore::internal::AreElementTypesCompatible<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type,internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,std::true_type>,tensorstore::WriteFutures>::type tensorstore::Write(SourceArray &&,Target &&,tensorstore::WriteOptions)': expects 3 arguments - 1 provided
28>C:\Misc\tensorstore\tensorstore/tensorstore.h(632): message : see declaration of 'tensorstore::Write'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(442,17): error C3536: 'write_future': cannot be used before it is initialized
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(457,61): error C2678: binary '|': no operator found which takes a left-hand operand of type 'tensorstore::Result<tensorstore::TensorStore<int,1,tensorstore::ReadWriteMode::write>>' (or there is no acceptable conversion)
28>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\cstddef(42,27): message : could be 'std::byte std::operator |(const std::byte,const std::byte) noexcept' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/data_type.h(376,42): message : or 'tensorstore::DataTypeConversionFlags tensorstore::operator |(tensorstore::DataTypeConversionFlags,tensorstore::DataTypeConversionFlags)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/open_mode.h(72,27): message : or 'tensorstore::OpenMode tensorstore::operator |(tensorstore::OpenMode,tensorstore::OpenMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/open_mode.h(117,32): message : or 'tensorstore::ReadWriteMode tensorstore::operator |(tensorstore::ReadWriteMode,tensorstore::ReadWriteMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/index_space/alignment.h(55,41): message : or 'tensorstore::DomainAlignmentOptions tensorstore::operator |(tensorstore::DomainAlignmentOptions,tensorstore::DomainAlignmentOptions)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/resize_options.h(55,36): message : or 'tensorstore::ResolveBoundsMode tensorstore::operator |(tensorstore::ResolveBoundsMode,tensorstore::ResolveBoundsMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/resize_options.h(128,29): message : or 'tensorstore::ResizeMode tensorstore::operator |(tensorstore::ResizeMode,tensorstore::ResizeMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(457,61): message : while trying to match the argument list '(tensorstore::Result<tensorstore::TensorStore<int,1,tensorstore::ReadWriteMode::write>>, tensorstore::DimExpression<tensorstore::internal_index_space::IntervalSliceOp<tensorstore::Index,tensorstore::Index,tensorstore::Index>,tensorstore::internal_index_space::DimensionList<std::array<tensorstore::DimensionIndex,1>>>)'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(455,38): error C2672: 'tensorstore::Write': no matching overloaded function found
28>C:\Misc\tensorstore\tensorstore/tensorstore.h(632,1): message : could be 'enable_if<tensorstore::internal::IsTensorStoreThatSupportsMode<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,tensorstore::ReadWriteMode::write>&&tensorstore::IsTransformedArrayLike<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type>&&tensorstore::internal::AreElementTypesCompatible<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type,internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,std::true_type>,tensorstore::WriteFutures>::type tensorstore::Write(SourceArray &&,Target &&,tensorstore::WriteOptions)'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(455,38): message : 'enable_if<tensorstore::internal::IsTensorStoreThatSupportsMode<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,tensorstore::ReadWriteMode::write>&&tensorstore::IsTransformedArrayLike<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type>&&tensorstore::internal::AreElementTypesCompatible<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type,internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,std::true_type>,tensorstore::WriteFutures>::type tensorstore::Write(SourceArray &&,Target &&,tensorstore::WriteOptions)': expects 3 arguments - 1 provided
28>C:\Misc\tensorstore\tensorstore/tensorstore.h(632): message : see declaration of 'tensorstore::Write'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(458,17): error C3536: 'write_future': cannot be used before it is initialized
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(494,1): error C2678: binary '|': no operator found which takes a left-hand operand of type 'tensorstore::Result<tensorstore::TensorStore<int,1,tensorstore::ReadWriteMode::write>>' (or there is no acceptable conversion)
28>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\cstddef(42,27): message : could be 'std::byte std::operator |(const std::byte,const std::byte) noexcept' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/data_type.h(376,42): message : or 'tensorstore::DataTypeConversionFlags tensorstore::operator |(tensorstore::DataTypeConversionFlags,tensorstore::DataTypeConversionFlags)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/open_mode.h(72,27): message : or 'tensorstore::OpenMode tensorstore::operator |(tensorstore::OpenMode,tensorstore::OpenMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/open_mode.h(117,32): message : or 'tensorstore::ReadWriteMode tensorstore::operator |(tensorstore::ReadWriteMode,tensorstore::ReadWriteMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/index_space/alignment.h(55,41): message : or 'tensorstore::DomainAlignmentOptions tensorstore::operator |(tensorstore::DomainAlignmentOptions,tensorstore::DomainAlignmentOptions)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/resize_options.h(55,36): message : or 'tensorstore::ResolveBoundsMode tensorstore::operator |(tensorstore::ResolveBoundsMode,tensorstore::ResolveBoundsMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/resize_options.h(128,29): message : or 'tensorstore::ResizeMode tensorstore::operator |(tensorstore::ResizeMode,tensorstore::ResizeMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(500,1): message : while trying to match the argument list '(tensorstore::Result<tensorstore::TensorStore<int,1,tensorstore::ReadWriteMode::write>>, tensorstore::DimExpression<tensorstore::internal_index_space::SingleIndexSliceOp<tensorstore::Index>,tensorstore::internal_index_space::DimensionList<std::array<tensorstore::DimensionIndex,1>>>)'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(494,1): error C2672: 'tensorstore::Write': no matching overloaded function found
28>C:\Misc\tensorstore\tensorstore/tensorstore.h(632,1): message : could be 'enable_if<tensorstore::internal::IsTensorStoreThatSupportsMode<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,tensorstore::ReadWriteMode::write>&&tensorstore::IsTransformedArrayLike<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type>&&tensorstore::internal::AreElementTypesCompatible<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type,internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,std::true_type>,tensorstore::WriteFutures>::type tensorstore::Write(SourceArray &&,Target &&,tensorstore::WriteOptions)'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(494,1): message : 'enable_if<tensorstore::internal::IsTensorStoreThatSupportsMode<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,tensorstore::ReadWriteMode::write>&&tensorstore::IsTransformedArrayLike<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type>&&tensorstore::internal::AreElementTypesCompatible<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type,internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,std::true_type>,tensorstore::WriteFutures>::type tensorstore::Write(SourceArray &&,Target &&,tensorstore::WriteOptions)': expects 3 arguments - 1 provided
28>C:\Misc\tensorstore\tensorstore/tensorstore.h(632): message : see declaration of 'tensorstore::Write'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(494,1): error C3889: call to object of class type 'testing::internal::PredicateFormatterFromMatcher<tensorstore::internal_status::StatusIsMatcher>': no matching call operator found
28>C:\Misc\tensorstore-vs22\_deps\gtest-src\googlemock\include\gmock/gmock-matchers.h(1575,19): message : could be 'testing::AssertionResult testing::internal::PredicateFormatterFromMatcher<tensorstore::internal_status::StatusIsMatcher>::operator ()(const char *,const T &) const'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(494,1): message : 'testing::AssertionResult testing::internal::PredicateFormatterFromMatcher<tensorstore::internal_status::StatusIsMatcher>::operator ()(const char *,const T &) const': expects 2 arguments - 1 provided
28>C:\Misc\tensorstore-vs22\_deps\gtest-src\googlemock\include\gmock/gmock-matchers.h(1575): message : see declaration of 'testing::internal::PredicateFormatterFromMatcher<tensorstore::internal_status::StatusIsMatcher>::operator ()'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(494,1): error C2737: 'gtest_ar': const object must be initialized
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(510,1): error C2678: binary '|': no operator found which takes a left-hand operand of type 'tensorstore::Result<tensorstore::TensorStore<int,1,tensorstore::ReadWriteMode::write>>' (or there is no acceptable conversion)
28>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\cstddef(42,27): message : could be 'std::byte std::operator |(const std::byte,const std::byte) noexcept' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/data_type.h(376,42): message : or 'tensorstore::DataTypeConversionFlags tensorstore::operator |(tensorstore::DataTypeConversionFlags,tensorstore::DataTypeConversionFlags)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/open_mode.h(72,27): message : or 'tensorstore::OpenMode tensorstore::operator |(tensorstore::OpenMode,tensorstore::OpenMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/open_mode.h(117,32): message : or 'tensorstore::ReadWriteMode tensorstore::operator |(tensorstore::ReadWriteMode,tensorstore::ReadWriteMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/index_space/alignment.h(55,41): message : or 'tensorstore::DomainAlignmentOptions tensorstore::operator |(tensorstore::DomainAlignmentOptions,tensorstore::DomainAlignmentOptions)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/resize_options.h(55,36): message : or 'tensorstore::ResolveBoundsMode tensorstore::operator |(tensorstore::ResolveBoundsMode,tensorstore::ResolveBoundsMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore/resize_options.h(128,29): message : or 'tensorstore::ResizeMode tensorstore::operator |(tensorstore::ResizeMode,tensorstore::ResizeMode)' [found using argument-dependent lookup]
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(512,1): message : while trying to match the argument list '(tensorstore::Result<tensorstore::TensorStore<int,1,tensorstore::ReadWriteMode::write>>, tensorstore::DimExpression<tensorstore::internal_index_space::IntervalSliceOp<tensorstore::Index,tensorstore::Index,tensorstore::Index>,tensorstore::internal_index_space::DimensionList<std::array<tensorstore::DimensionIndex,1>>>)'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(510,1): error C2672: 'tensorstore::Write': no matching overloaded function found
28>C:\Misc\tensorstore\tensorstore/tensorstore.h(632,1): message : could be 'enable_if<tensorstore::internal::IsTensorStoreThatSupportsMode<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,tensorstore::ReadWriteMode::write>&&tensorstore::IsTransformedArrayLike<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type>&&tensorstore::internal::AreElementTypesCompatible<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type,internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,std::true_type>,tensorstore::WriteFutures>::type tensorstore::Write(SourceArray &&,Target &&,tensorstore::WriteOptions)'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(510,1): message : 'enable_if<tensorstore::internal::IsTensorStoreThatSupportsMode<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,tensorstore::ReadWriteMode::write>&&tensorstore::IsTransformedArrayLike<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type>&&tensorstore::internal::AreElementTypesCompatible<internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty>::type>::type>::type,internal_result::UnwrapResultHelper<remove_cv<remove_reference<_Ty1>::type>::type>::type,std::true_type>,tensorstore::WriteFutures>::type tensorstore::Write(SourceArray &&,Target &&,tensorstore::WriteOptions)': expects 3 arguments - 1 provided
28>C:\Misc\tensorstore\tensorstore/tensorstore.h(632): message : see declaration of 'tensorstore::Write'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(510,1): error C3889: call to object of class type 'testing::internal::PredicateFormatterFromMatcher<tensorstore::internal_status::IsOkMatcher>': no matching call operator found
28>C:\Misc\tensorstore-vs22\_deps\gtest-src\googlemock\include\gmock/gmock-matchers.h(1575,19): message : could be 'testing::AssertionResult testing::internal::PredicateFormatterFromMatcher<tensorstore::internal_status::IsOkMatcher>::operator ()(const char *,const T &) const'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(510,1): message : 'testing::AssertionResult testing::internal::PredicateFormatterFromMatcher<tensorstore::internal_status::IsOkMatcher>::operator ()(const char *,const T &) const': expects 2 arguments - 1 provided
28>C:\Misc\tensorstore-vs22\_deps\gtest-src\googlemock\include\gmock/gmock-matchers.h(1575): message : see declaration of 'testing::internal::PredicateFormatterFromMatcher<tensorstore::internal_status::IsOkMatcher>::operator ()'
28>C:\Misc\tensorstore\tensorstore\driver\virtual_chunked\virtual_chunked_test.cc(510,1): error C2737: 'gtest_ar': const object must be initialized
28>Done building project "tensorstore_driver_virtual_chunked_virtual_chunked_test.vcxproj" -- FAILED.
29>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(59,1): error C2607: static assertion failed
29>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(61,1): error C2607: static assertion failed
29>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(63,1): error C2607: static assertion failed
29>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(65,1): error C2607: static assertion failed
29>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(83,1): error C2607: static assertion failed
29>C:\Misc\tensorstore\tensorstore\driver\cast\cast_test.cc(93,1): error C2607: static assertion failed
29>Done building project "tensorstore_driver_cast_cast_test.vcxproj" -- FAILED.
30>------ Skipped Build: Project: ALL_BUILD, Configuration: Release x64 ------
30>Project not selected to build for this solution configuration
========== Build: 16 succeeded, 8 failed, 638 up-to-date, 6 skipped ==========
These are not important to library users (e.g. me), so you can close this issue if you do not plan to fix it in the near future.
We can probably comment out the cast_test.cc lines.
Both issues are now fixed --- tensorstore now compiles with VS 2022 17.5, and also all of the tests compile in Release mode.