zju3dv / Vox-Fusion

Code for "Dense Tracking and Mapping with Voxel-based Neural Implicit Representation", ISMAR 2022
266 stars 24 forks source link

`OSError: undefined symbol` when running the demo script #26

Closed fjrdev closed 1 year ago

fjrdev commented 1 year ago

I could successfully install all requirements in my conda environment and the install process also did not throw any errors. But when I try to run the demo script I receive the following error:

Traceback (most recent call last):
  File "demo/run.py", line 8, in <module>
    from voxslam import VoxSLAM
  File "/path/to/Vox-Fusion/src/voxslam.py", line 8, in <module>
    from mapping import Mapping
  File "/path/to/Vox-Fusion/src/mapping.py", line 15, in <module>
    torch.classes.load_library(
  File "/path/to/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/_classes.py", line 48, in load_library
    torch.ops.load_library(path)
  File "/path/to/miniconda3/envs/myenv/lib/python3.8/site-packages/torch/_ops.py", line 255, in load_library
    ctypes.CDLL(path)
  File "/path/to/miniconda3/envs/myenv/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /path/to/Vox-Fusion/third_party/sparse_octree/build/lib.linux-x86_64-cpython-38/svo.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE

There seems to be a general problem with reading the shared object, but unfortunately I could not find a suitable solution for this specific error online.

eriksandstroem commented 1 year ago

Did you try to use "pip install ." while being at the directory of the setup.py file? This installation strategy worked for me. Another strategy is to try installing the library when having access to the gpu node where the code will be run, contrary to installing it on e.g. a login node (if you are using a cluster).

fjrdev commented 1 year ago

@tfy14esa Thanks, that actually solved the problem.