Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
shenxiaochenn opened this issue Feb 25, 2023 · 2 comments
Labels

Comments

@shenxiaochenn
Copy link

shenxiaochenn commented Feb 25, 2023

Operating system

Ubentu

Platform

x86_64-linux

OpenSlide Python version

None

OpenSlide version

None

Slide format

None

Issue details

import openslide
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/hpcstack/anaconda3/envs/py39/lib/python3.9/site-packages/openslide/__init__.py", line 30, in <module>
    from openslide import lowlevel
  File "/home/hpcstack/anaconda3/envs/py39/lib/python3.9/site-packages/openslide/lowlevel.py", line 84, in <module>
    _lib = cdll.LoadLibrary('libopenslide.so.0')
  File "/home/hpcstack/anaconda3/envs/py39/lib/python3.9/ctypes/__init__.py", line 460, in LoadLibrary
    return self._dlltype(name)
  File "/home/hpcstack/anaconda3/envs/py39/lib/python3.9/ctypes/__init__.py", line 382, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0

I do not know hot to solve this. Can you help me?? thanks

@bgilbert
Copy link
Member

You haven't mentioned the versions of Ubuntu, OpenSlide, and OpenSlide Python you're using. However, it seems likely that you're using some shared libraries from Anaconda and some from Ubuntu, and they're not compatible. You should get OpenSlide and its dependencies either entirely from Ubuntu or entirely from Anaconda.

@bgilbert bgilbert closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2023
@YoihenBachu
Copy link

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

just run this command in your Ubuntu terminal before running the code that uses the openslide and it works like magic. I was having issue with the same error in WSL environment with Ubuntu-20.04.

Note that it doesn't fix the issue permanently and importing openslide in VS-Code Jupyter notebook is still not working. Will give the updates if issue is fixed. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants