Skip to content

Cannot compile examples #123

Description

@JackCaster

Describe the bug

Cannot compile examples due to missing dependencies in cmake

Describe how to reproduce the bug

Follow the instructions in https://github.com/OpenSimulationInterface/osi-sensor-model-packaging/blob/9fe6d0b1d3328667d228361d807a88a61727534e/README.md

Then, compilation fails at

osi-sensor-model-packaging/examples/build$ cmake ..
-- The C compiler identification is GNU 13.3.0
-- The CXX 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/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Debug' as none was specified.
CMake Error at osi-cpp/CMakeLists.txt:23 (file):
  file STRINGS file
  "osi-sensor-model-packaging/examples/osi-cpp/open-simulation-interface/VERSION"
  cannot be read.


CMake Error at osi-cpp/CMakeLists.txt:32 (project):
  VERSION ".." format invalid.

Describe the expected behavior

Compilation should complete. The problem is that osi-cpp has itself a submodule to clone. Therefore, the instructions should add the --recursive flag to the submodule update

$ git clone https://github.com/OpenSimulationInterface/osi-sensor-model-packaging.git
$ cd osi-sensor-model-packaging
$ git submodule update --init --recursive
$ cd examples
$ mkdir -p build
$ cd build
$ cmake ..
$ cmake --build .

With this change, the compilation ends without errors.

Describe the OS you are using

  • OS: Ubuntu 24.04

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugProblems in the build system, build scripts, etc or faults in the interface.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions