or-toolsxpress-optimizer

Unable to build OR-Tools with XPRESS enabled in Windows 11


What version of OR-Tools and what language are you using? Version: Stable Language: Java

I want to enable XPRESS in the google-or. But Unable to do so. Getting the following error:

"C:\Users*\Documents*\Projects\or-tools\build\ALL_BUILD.vcxproj" (default target) (1) -> "C:\Users*\Documents*\Projects\or-tools\build\ortools\graph\samples\assignment_linear _sum_assignment.vcxproj" (default target) (14) -> "C:\Users*\Documents*\Projects\or-tools\build_deps\scip-build\src\libscip.vcxproj" ( default target) (86) -> "C:\Users*\Documents*\Projects\or-tools\build_deps\scip-build\scip_update_githash.vc xproj" (default target) (88) -> (CustomBuild target) -> C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets (254,5): error MSB8066: Custom build for 'C:\Users*\Documents*\Projects\or-tools\buil d\CMakeFiles\7e2c4873001c5a9dbebf1c1a1b7cc43f\scip_update_githash.rule' exited with code 1. [C:\Users\SnehasishC har\Documents**\Projects\or-tools\build_deps\scip-build\scip_update_githash.vcxproj]

My operating system is Windows 11 64-bit. I have installed all the requirements like, Java, Maven, Visual Studio Enterprise 2022, Swig, and ProtoBuf. Also, I have XPRESS installed with a license.

I have run the following commands:

cmake -S . -B build -DBUILD_DEPS=ON -DBUILD_JAVA=ON -DUSE_XPRESS=ON -DXPRESS_ROOT=C:\xpressmp -DXPRESS_LIBRARIES=C:\xpressmp\lib -DXPRESS_INCLUDE_DIRS=C:\xpressmp\include -A x64

The above command worked fine. But when I am running the below command

cmake --build build --config Release --target ALL_BUILD -j4 -v --clean-first

I am getting the quoted error.


Solution

  • As answered before on the mailing list, in OR-Tools version 9.9, XPressMP is precompiled.

    Like with Gurobi, it will try to sideload the shared library. You do not need to recompile the library.