masadcv / FastGeodis

Fast Implementation of Generalised Geodesic Distance Transform for CPU (OpenMP) and GPU (CUDA)
https://fastgeodis.readthedocs.io
BSD 3-Clause "New" or "Revised" License
90 stars 14 forks source link

[BUG] Missing Symbol in Cpp backend #59

Closed LDenninger closed 4 months ago

LDenninger commented 4 months ago

First of all, thanks for the great work! I have been looking for something like that for quite some time.

Describe the bug Unfortunately, I do not manage to to get the library running as I get the error of an undefined symbol:

>>> import FastGeodis
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/denninger/anaconda3/envs/nimbro_soccer/lib/python3.10/site-packages/FastGeodis/__init__.py", line 34, in <module>
    import FastGeodisCpp
ImportError: /home/denninger/anaconda3/envs/nimbro_soccer/lib/python3.10/site-packages/FastGeodisCpp.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops14conv2d_padding4callERKNS_6TensorES4_RKSt8optionalIS2_EN3c108ArrayRefINS9_6SymIntEEENS9_17basic_string_viewIcEESC_SB_

To Reproduce I have installed the library via Pip and through the release published on GitHub. Both give the same error when trying to import FastGeodis

Desktop:

Maybe somebody sees what I did wrong and can help me to fix this issue! Greetings, Luis

masadcv commented 4 months ago

Hi Luis, It seems there is some issue with your installation. Can you please provide the commands/steps you did to install the library?

masadcv commented 4 months ago

Additionally, for conda can you try the following steps for installing this? https://github.com/masadcv/FastGeodis/issues/6#issuecomment-1166380502

LDenninger commented 4 months ago

I tried installing it using: pip install FastGeodis and pip install FastGeodis --no-build-isolation. Both had the same problem. But I installed PyTorch via conda previously which seems to be the issue. It seems the Torch binaries are not found/included by FastGeodis when doing it this way.

I managed to get it working when installing PyTorch through pip as well.

Now everything seems to work fine!

Thanks for the help and work again!