-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[MSVC] Z3 build failed due to error C2666 and error C2512 under msvc x86 mode #6114
Comments
I don't understand the error message. It doesn't occur on other platforms. File a bug against the piece that produces the message.
The bracket '[' is not matched. |
Hi @NikolajBjorner , I didn't understand what you meant and your error message doesn't look the same as ours. |
You have
My error message is slightly different with the right ] missing. |
@NikolajBjorner Ok, I got it. Thanks for your reply. |
The error from the compiler is legitimate for the x86 MSVC compiler because The ambiguity here is in resolving the overload between the |
Issue description:
Hi,
Recently we updated the Z3 commit, it built failed due to error C2666 and C2512 under msvc x86 mode. Could you please take a look? Thanks.
Repro steps:
Expected result:
build successfully.
Actual result:
example.cpp 1>F:\gitP\Z3Prover\z3\examples\c++\example.cpp(931,27): error C2666: 'z3::ast_vector_tpl<z3::func_decl>::operator []': 2 overloads have similar conversions [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example.vcxproj] F:\gitP\Z3Prover\z3\src\api\c++\z3++.h(547,11): message : could be 'T z3::ast_vector_tpl<T>::operator [](unsigned int) const' [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] with [ T=z3::func_decl ] F:\gitP\Z3Prover\z3\examples\c++\example.cpp(931,27): message : or 'built-in C++ operator[](Z3_ast_vector, int)' [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] F:\gitP\Z3Prover\z3\examples\c++\example.cpp(931,27): message : while trying to match the argument list '(z3::func_decl_vector, int)' [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] 1>F:\gitP\Z3Prover\z3\examples\c++\example.cpp(931,12): error C2512: 'z3::expr': no appropriate default constructor available [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example.vcxproj] F:\gitP\Z3Prover\z3\src\api\c++\z3++.h(756,11): message : see declaration of 'z3::expr' [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] 1>F:\gitP\Z3Prover\z3\examples\c++\example.cpp(932,27): error C2666: 'z3::ast_vector_tpl<z3::func_decl>::operator []': 2 overloads have similar conversions [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example.vcxproj] F:\gitP\Z3Prover\z3\src\api\c++\z3++.h(547,11): message : could be 'T z3::ast_vector_tpl<T>::operator [](unsigned int) const' [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] with [ T=z3::func_decl ] F:\gitP\Z3Prover\z3\examples\c++\example.cpp(932,27): message : or 'built-in C++ operator[](Z3_ast_vector, int)' [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] F:\gitP\Z3Prover\z3\examples\c++\example.cpp(932,27): message : while trying to match the argument list '(z3::func_decl_vector, int)' [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] 1>F:\gitP\Z3Prover\z3\examples\c++\example.cpp(932,12): error C2512: 'z3::expr': no appropriate default constructor available [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example.vcxproj] F:\gitP\Z3Prover\z3\src\api\c++\z3++.h(756,11): message : see declaration of 'z3::expr' [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example_build_dir\cpp_example.vcxproj] 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'F:\gitP\Z3Prover\z3\build_x86\CMakeFiles\4609bd6cd9cc5fb43033028daf6957b5\cpp_example-mkdir.rule;F:\gitP\Z3Prover\z3\build_x86\CMakeFiles\4609bd6cd9cc5fb43033028daf6957b5\cpp_example-download.rule;F:\gitP\Z3Prover\z3\build_x86\CMakeFiles\4609bd6cd9cc5fb43033028daf6957b5\cpp_example-update.rule;F:\gitP\Z3Prover\z3\build_x86\CMakeFiles\4609bd6cd9cc5fb43033028daf6957b5\cpp_example-patch.rule;F:\gitP\Z3Prover\z3\build_x86\CMakeFiles\4609bd6cd9cc5fb43033028daf6957b5\cpp_example-configure.rule;F:\gitP\Z3Prover\z3\build_x86\CMakeFiles\4609bd6cd9cc5fb43033028daf6957b5\cpp_example-build.rule;F:\gitP\Z3Prover\z3\build_x86\CMakeFiles\4609bd6cd9cc5fb43033028daf6957b5\cpp_example-install.rule;F:\gitP\Z3Prover\z3\build_x86\CMakeFiles\782db93e8c89b44bf5185765149ccfc7\cpp_example-complete.rule;F:\gitP\Z3Prover\z3\build_x86\CMakeFiles\7e1b667b19f6561c54638f80932b54dc\cpp_example.rule;F:\gitP\Z3Prover\z3\examples\CMakeLists.txt' exited with code 1. [F:\gitP\Z3Prover\z3\build_x86\examples\cpp_example.vcxproj]
Detailed log:
build.log
More info:
the commit we use is: 470bf27
and I tried the currently latest commit: 30165ed, the issue is persisting.
Windows version: Windows server 2019
VS version: VS2019 (VS16.11.11)
The text was updated successfully, but these errors were encountered: