mapillary / mapillary/OpenSfM

Failed to compile on macos sonoma

Open
#1,059 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.8k
Forks
899
PR merge metrics
No merged PRs in 30d

Description

I have the following issue when trying to compile on macos sonoma. Any idea why ?
To compile opensfm I had to disable openmp in the cmakelists.txt.
I have installed libomp with brew but it was not able to find it.

In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/foundation/src/types.cc:1:
In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/foundation/python_types.h:2:
In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/third_party/pybind11/include/pybind11/numpy.h:12:
In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/third_party/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/third_party/pybind11/include/pybind11/attr.h:13:
/Users/dev/OpenSFM/OpenSfM/opensfm/src/third_party/pybind11/include/pybind11/cast.h:441:36: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
" " + handle(frame->f_code->co_filename).caststd::string() +
^
/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
^
In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/foundation/src/types.cc:1:
In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/foundation/python_types.h:2:
In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/third_party/pybind11/include/pybind11/numpy.h:12:
In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/third_party/pybind11/include/pybind11/pybind11.h:43:
In file included from /Users/dev/OpenSFM/OpenSfM/opensfm/src/third_party/pybind11/include/pybind11/attr.h:13:
/Users/dev/OpenSFM/OpenSfM/opensfm/src/third_party/pybind11/include/pybind11/cast.h:443:29: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
handle(frame->f_code->co_name).caststd::string() + "\n";

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 CMakeLists.txt and reproduce the macOS Sonoma build with OpenMP enabled, then inspect src/foundation/src/types.cc, python_types.h, and the vendored pybind11 cast.h against the Python 3.11 headers. Done means OpenSfM compiles on the reported environment without disabling OpenMP or producing the PyFrameObject errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, macos, python
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.