mapillary / mapillary/OpenSfM

Building 0.5.1 from source / errors within libakaze.so related to OpenCV

Open
#757 0 comments 0 reactions 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

All,

I'm building 0.5.1 from source, with a few other packages from source. Everything has compiled fine, but when I go to run opensfm to try the berlin example, I get the following error:

bentleykw@centos:~/src/SupportPackages/build$ opensfm
Traceback (most recent call last):
  File "/home/bentleykw/src/SupportPackages/bin/opensfm", line 4, in <module>
    __import__('pkg_resources').run_script('opensfm==0.4.0', 'opensfm')
  File "/home/bentleykw/src/SupportPackages/lib/python3.9/site-packages/pkg_resources/__init__.py", line 651, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/bentleykw/src/SupportPackages/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1448, in run_script
    exec(code, namespace, namespace)
  File "/home/bentleykw/src/SupportPackages/lib/python3.9/site-packages/opensfm-0.4.0-py3.9.egg/EGG-INFO/scripts/opensfm", line 10, in <module>
    from opensfm import commands
  File "/home/bentleykw/src/SupportPackages/lib/python3.9/site-packages/opensfm-0.4.0-py3.9.egg/opensfm/commands/__init__.py", line 2, in <module>
    from . import extract_metadata
  File "/home/bentleykw/src/SupportPackages/lib/python3.9/site-packages/opensfm-0.4.0-py3.9.egg/opensfm/commands/extract_metadata.py", line 5, in <module>
    from opensfm import dataset
  File "/home/bentleykw/src/SupportPackages/lib/python3.9/site-packages/opensfm-0.4.0-py3.9.egg/opensfm/dataset.py", line 13, in <module>
    from opensfm import io
  File "/home/bentleykw/src/SupportPackages/lib/python3.9/site-packages/opensfm-0.4.0-py3.9.egg/opensfm/io.py", line 20, in <module>
    from opensfm import features
  File "/home/bentleykw/src/SupportPackages/lib/python3.9/site-packages/opensfm-0.4.0-py3.9.egg/opensfm/features.py", line 10, in <module>
    from opensfm import pyfeatures
ImportError: /home/bentleykw/src/SupportPackages/build/opensfm/src/opensfm/opensfm/src/third_party/akaze/libakaze.so: undefined symbol: _ZTVN2cv11_InputArrayE

Any advice? C++filt translates that symbol to vtable for cv::_InputArray, but ldd shows everything linked correctly to the opencv libs. I'm more of a c++ expert than python, so I'm not really sure what's causing the error.

Any advice? Using gcc 9, opencv 4.5.2, and python 3.9.

Thanks!

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 by reproducing the opensfm command and trace its import through opensfm/features.py to third_party/akaze/libakaze.so. Inspect the OpenCV 4.5.2 libraries linked by libakaze.so and the undefined _InputArray symbol. Done means the source build imports and launches without this OpenCV-related error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, opencv, python
Domain
build-system, computer-vision
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.