google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
11.22k stars 2.13k forks source link

CMake: Tests failed in Debug on Windows #3187

Closed ktnr closed 1 year ago

ktnr commented 2 years ago

What version of OR-Tools and what language are you using? Latest 9.3 on stable 49b6301e1e1e231d654d79b6032e79809868a70e

What operating system (Linux, Windows, ...) and version? Windows VS17 2022 with MSVC 19.30.30709.0 CMake 3.21.21080301-MSVC_2

What did you do? Try to build following the instructions at https://github.com/google/or-tools/tree/stable/cmake#cmake-options and https://github.com/google/or-tools/runs/5579142688?check_suite_focus=true with

cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DBUILD_DEPS=ON

cmake --build build --config Debug --target ALL_BUILD

cmake --build build --config Debug --target RUN_TESTS

cmake --build build --config Debug --target INSTALL

I get the following errors during INSTALL

  Create bundled lib...
  'C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe' '-E' 'rm' '-f' 'ortools_full.lib'
  'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/lib.exe' '/NOLOGO' '/OUT:ortools_full.lib' 'ortools.lib' 'absl_*.lib' 'zlib.lib' 're2.lib' '*protobuf.lib'
LINK : fatal error LNK1181: Eingabedatei "zlib.lib" kann nicht ge├Âffnet werden. [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]
  CMake Error at bundle-install.cmake:41 (execute_process):
    execute_process failed command indexes:

      1: "Child return code: 1181"

  Call Stack (most recent call first):
    cmake_install.cmake:185 (include)

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: Der Befehl "setlocal [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\C
Make\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :cmEnd [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [E:\ortools\or-tools-49b6301\build\INSTALL.vc
xproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :cmErrorLevel [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: exit /b %1 [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :cmDone [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :VCEnd" wurde mit dem Code 1 beendet. [E:\ortools\or-tools-49b6301\build\INSTALL.vcxproj]

In install/lib there is a zlibd.lib but no zlib.lib. When I rename the zlibd.lib in install/lib to zlib.lib, and rerun INSTALL, it finishes successfully.

Also, the following tests fail during RUN_TESTS. Many of them throw a failed debug assertion "vector subscript out of range".

The following tests FAILED:
         49 - cxx_sat_assignment_groups_sat (Failed)
         50 - cxx_sat_assignment_sat (Failed)
         51 - cxx_sat_assignment_task_sizes_sat (Failed)
         52 - cxx_sat_assignment_teams_sat (Failed)
         53 - cxx_sat_assumptions_sample_sat (Exit code 0xc0000409
  )
         54 - cxx_sat_binpacking_problem_sat (Failed)
         58 - cxx_sat_cp_is_fun_sat (Exit code 0xc0000409
  )
         59 - cxx_sat_cp_sat_example (Failed)
         64 - cxx_sat_multiple_knapsack_sat (Failed)
         66 - cxx_sat_nqueens_sat (Exit code 0xc0000409
  )
         82 - cxx_cpp_cryptarithm_sat (Exit code 0xc0000409
  )
         88 - cxx_cpp_golomb_sat (Exit code 0xc0000409
  )
         89 - cxx_cpp_integer_programming (Failed)
         91 - cxx_cpp_linear_programming (Failed)
         94 - cxx_cpp_magic_square_sat (Failed)
  Errors while running CTest
  Output from these tests are in: E:/ortools/or-tools-49b6301/build/Testing/Temporary/LastTest.log
  Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
         99 - cxx_cpp_slitherlink_sat (Failed)
        101 - cxx_cpp_variable_intervals_sat (Exit code 0xc0000409
  )

At the end of RUN_TESTS these errors occur

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: Der Befehl "setlocal [E:\ortools\or-tools-49b6301\build\RUN_TESTS.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\C
Make\bin\ctest.exe" --force-new-ctest-process -C Debug [E:\ortools\or-tools-49b6301\build\RUN_TESTS.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [E:\ortools\or-tools-49b6301\build\RUN_TESTS.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :cmEnd [E:\ortools\or-tools-49b6301\build\RUN_TESTS.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [E:\ortools\or-tools-49b6301\build\RUN_TESTS.
vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :cmErrorLevel [E:\ortools\or-tools-49b6301\build\RUN_TESTS.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: exit /b %1 [E:\ortools\or-tools-49b6301\build\RUN_TESTS.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :cmDone [E:\ortools\or-tools-49b6301\build\RUN_TESTS.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [E:\ortools\or-tools-49b6301\build\RUN_TESTS.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(156,5): error MSB3073: :VCEnd" wurde mit dem Code 8 beendet. [E:\ortools\or-tools-49b6301\build\RUN_TESTS.vcxproj]
lperron commented 1 year ago

duplicate of