AntaresSimulatorTeam / Antares_Simulator

Antares-Simulator is an Open Source power system simulator to quantify the adequacy or the economic performance of interconnected energy systems, at short or remote time horizons.
https://antares-simulator.org
Other
58 stars 24 forks source link

Can't build ortools locally #2305

Open payetvin opened 1 month ago

payetvin commented 1 month ago
Command used

cmake -B _build_ortools -S src -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=on -DBUILD_TESTING=on -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-linux-antares -DBUILD_ORTOOLS=on

Logs
CMake Warning at /home/payetvin/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
  By not providing "Findortools.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "ortools", but
  CMake did not find one.

  Could not find a package configuration file provided by "ortools" with any
  of the following names:

    ortoolsConfig.cmake
    ortools-config.cmake

  Add the installation prefix of "ortools" to CMAKE_PREFIX_PATH or set
  "ortools_DIR" to a directory containing one of the above files.  If
  "ortools" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:207 (find_package)
CMake Error at solver/infeasible-problem-analysis/CMakeLists.txt:18 (target_link_libraries):
  Target "infeasible_problem_analysis" links to:

    ortools::ortools

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

CMake Error at solver/utils/CMakeLists.txt:30 (target_link_libraries):
  Target "utils" links to:

    ortools::ortools

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

CMake Error at tests/src/solver/utils/CMakeLists.txt:12 (target_link_libraries):
  Target "tests-basis-status" links to:

    ortools::ortools

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

CMake Error at tests/src/solver/infeasible-problem-analysis/CMakeLists.txt:5 (target_link_libraries):
  Target "test-unfeasible-problem-analyzer" links to:

    ortools::ortools

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.
flomnes commented 1 month ago

This is because repository https://github.com/rte-france/or-tools-rte does not contain any code. It only contains instructions on how to clone the "real" repository and a patch to apply upon it.

payetvin commented 6 days ago

Should we fix it ? Or just always use ortools as a lib