elerac / EasyPySpin

cv2.VideoCapture like wrapper for FLIR Spinnaker SDK
MIT License
99 stars 19 forks source link

ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol:ffi_type_uint32, version LIBFFI_BASE_7.0 #12

Open SantiDiazC opened 2 years ago

SantiDiazC commented 2 years ago

Hi, I have installed the spinnaker sdk and the easypyspin library however when running the example examples/video.py I got the following error:

Traceback (most recent call last):
  File "/home/hri/PycharmProjects/flir_test2/main.py", line 3, in <module>
    import EasyPySpin
  File "/home/hri/anaconda3/envs/flir_test2/lib/python3.8/site-packages/EasyPySpin/__init__.py", line 1, in <module>
    from .videocapture import VideoCapture
  File "/home/hri/anaconda3/envs/flir_test2/lib/python3.8/site-packages/EasyPySpin/videocapture.py", line 6, in <module>
    import PySpin
  File "/home/hri/anaconda3/envs/flir_test2/lib/python3.8/site-packages/PySpin.py", line 15, in <module>
    import _PySpin
ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

If you find any solution I will appreciate it! Thanks in advance

elerac commented 1 year ago

Hello @SantiDiazC

It seems you haven't completely installed PySpin. PySpin is a part of Spinnaker SDK provided by FLIR. So your problem is out of the scope of EasyPySpin. I'm sorry, but I cannot help you.

I recommend you read the installation method of PySpin carefully (NOT EasyPySpin). And check whether you can execute import PySpin.

faridelya commented 1 year ago

Hi @ everyone i got same error but did not find any solution, please help me I have install PyGObject
but when I run .py module it got me error.

ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

Full error log

python ds_app.py 
Traceback (most recent call last):
  File "ds_app.py", line 23, in <module>
    from deepstream.utils.common import is_aarch64
  File "/home/experts-vision/Documents/Jetson-app/Jetson_client/deepstream/../deepstream/utils/common.py", line 7, in <module>
    import gi
  File "/home/experts-vision/anaconda3/envs/deep/lib/python3.8/site-packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0
damvantai commented 1 year ago

In terminal, you can add export or add to bashrc after update bashrc export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libffi.so.7

chky commented 1 year ago

Hi @ everyone i got same error but did not find any solution, please help me I have install PyGObject but when I run .py module it got me error.

ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

Full error log

python ds_app.py 
Traceback (most recent call last):
  File "ds_app.py", line 23, in <module>
    from deepstream.utils.common import is_aarch64
  File "/home/experts-vision/Documents/Jetson-app/Jetson_client/deepstream/../deepstream/utils/common.py", line 7, in <module>
    import gi
  File "/home/experts-vision/anaconda3/envs/deep/lib/python3.8/site-packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

I meet the same error on ubuntu20.04 when I follow the installation process for ubuntu in the README.MD file. however, after I change to another computer with windows11 system, and follow the the installation process for windows in the README.MD file, it just works! without any error. So maybe change to windows11 platform helps.

GVMCOTESA commented 1 year ago

I have the same issue

guanjinquan commented 1 year ago

In terminal, you can add export or add to bashrc after update bashrc export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libffi.so.7

Thanks! Your solution to export the LD_PRELOAD is helpful!

tdzz1102 commented 11 months ago

I'm using conda. When I do pip install conda and import openslide I get this error. The solution is to do conda install openslide -c conda-forge together.

WangFengtu1996 commented 9 months ago

export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libffi.so.7 in aarch64

Mike001-wq commented 7 months ago

In terminal, you can add export or add to bashrc after update bashrc export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libffi.so.7

Thank you so much! I spent 4 hours looking for a solution to this problem. The methods mentioned by others are all complicated, but your method is simple and effective!

Fawadjamshidi commented 7 months ago

i have the same issue try install the package using conda.

chg0901 commented 4 months ago

Hi @ everyone i got same error but did not find any solution, please help me I have install PyGObject but when I run .py module it got me error.

ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

Full error log

python ds_app.py 
Traceback (most recent call last):
  File "ds_app.py", line 23, in <module>
    from deepstream.utils.common import is_aarch64
  File "/home/experts-vision/Documents/Jetson-app/Jetson_client/deepstream/../deepstream/utils/common.py", line 7, in <module>
    import gi
  File "/home/experts-vision/anaconda3/envs/deep/lib/python3.8/site-packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

I have the same error