Build fails for commonroad-drivability-checker

System

  • Ubuntu 20.04.5 LTS
  • gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
  • cmake version 3.16.3
  • pip 22.2.2
  • Fresh Anaconda environment with Python=3.11.0

Perhaps most relevant errors

Also see the installation log files when using pip and build.sh

Using

$ bash build.sh -j JOB_COUNT --cgal -i

as in the documentation results in

[  9%] Building CXX object CMakeFiles/pycrccosy.dir/python_binding/src/module_geometry.cc.o
home/hristov/uni/commonroad-drivability-checker/third_party/pybind11/include/pybind11/cast.h: In function ‘std::string pybind11::deta
il::error_string()’:
      /home/hristov/uni/commonroad-drivability-checker/third_party/pybind11/include/pybind11/cast.h:446:36: error: invalid use of incomplete
 type ‘PyFrameObject’ {aka ‘struct _frame’}
        446 |                 "  " + handle(frame->f_code->co_filename).cast<std::string>() +
            |                                    ^~
/home/hristov/uni/commonroad-drivability-checker/third_party/pybind11/include/pybind11/cast.h:446:75: error: expected primary-expressi
on before ‘>’ token
        446 |                 "  " + handle(frame->f_code->co_filename).cast<std::string>() +
            |                                                                           ^
/home/hristov/uni/commonroad-drivability-checker/third_party/pybind11/include/pybind11/pybind11.h: In function ‘pybind11::function pybind11::detail::get_type_override(const void*, const pybind11::detail::type_info*, const char*)’:
      /home/hristov/uni/commonroad-drivability-checker/third_party/pybind11/include/pybind11/pybind11.h:2291:49: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
       2291 |     PyFrameObject *frame = PyThreadState_Get()->frame;
            |                                                 ^~~~~
            |                                                 cframe
      /home/hristov/uni/commonroad-drivability-checker/third_party/pybind11/include/pybind11/pybind11.h:2292:41: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
       2292 |     if (frame && (std::string) str(frame->f_code->co_name) == name &&
            |                                         ^~

Works fine with Python 3.8. Python>=3.10 isn’t a good idea for the project, e.g. see commonroad-reach/setup.py::74.

also 3.9 works, is there a plan to make it compatible with >=3.10 ?