NatLabRockies / NatLabRockies/SAM

cmake does not find or-tools in Ubuntu 24

Open
#2,252 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
486
Forks
219
Avg merge
10h 10m
Merged PRs (30d)
2

Description

Describe the bug

I'm running into problems compiling SAM per the given instructions on Ubuntu 24. It appears that CMake cannot locate the downloaded or-tools binaries. $ORTOOLSDIR points to the right directory, and running make test there passes.

To Reproduce

Following the building instructions at https://github.com/NatLabRockies/SAM/wiki/Linux-Build-Instructions until cmake .. -DCMAKE_BUILD_TYPE=Release -DSAMAPI_EXPORT=0

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots
-- The CXX compiler identification is GNU 13.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at ssc/shared/CMakeLists.txt:178 (find_package):
  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.


-- Configuring incomplete, errors occurred!
Operating System and Version

Ubuntu 24.04

Additional context

Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ssc/shared/CMakeLists.txt at line 178 and the Linux build instructions, then trace how ORTOOLSDIR is expected to expose the downloaded OR-Tools CMake package. Reproduce the command on Ubuntu 24.04 and verify that CMake configures successfully with the documented setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.