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

undefined symbol: _ZdlPvm, version Qt_5 #341

Open
BrandonMan123 opened this issue Nov 4, 2023 · 10 comments
Open

undefined symbol: _ZdlPvm, version Qt_5 #341

BrandonMan123 opened this issue Nov 4, 2023 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@BrandonMan123
Copy link

System information: Ubuntu 22.04

Recreation steps:

  1. pip3 install pymeshlab
  2. python
  3. import pymeshlab

I then receive the following error:
/sketch2prototype/stable-dreamfusion/venv_stable-dreamfusion/lib/python3.11/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5

Not sure why this is happening. I tried installing pymesh lab on my Mac (M1 Ventura 13.4.1) and it worked. My guess is that it is a system issue but not sure where the issue lies. Would appreciate any first steps to debug. Thanks

@runjie-yan
Copy link

I meet the same issue on Ubuntu 18.04.6 LTS...

@alemuntoni
Copy link
Member

It is probably conflicting with a qt system installation. It shouldn't happen because it should first look for the bundled qt libraries.
This issue was already reported, by I've never been able to reproduce it and therefore I'm also unable to solve it...
If someone has suggestions on what could cause this issue, they are welcome!

@alemuntoni alemuntoni added the help wanted Extra attention is needed label Nov 15, 2023
@mercyshuan
Copy link

i met the same issue on ubuntu 22.04.3 LTS,
my steps:
1.pip3 install pymeshlab
2.python
3.import pymeshlab

then meet :
Traceback (most recent call last):
File "", line 1, in
File "/home/wty/.local/lib/python3.10/site-packages/pymeshlab/init.py", line 11, in
from .pmeshlab import *
ImportError: /home/wty/.local/lib/python3.10/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5

@robinsonkwame
Copy link

robinsonkwame commented Feb 10, 2024

The issue can be caused by the interaction of the user system, the specific version of Qt against which libmeshlab-common.so was compiled, and what specific version of Qt is referenced at runtime. This is likely complicated by path issues, despite pymeshlab having deploy scripts. ldd and tools like it can help track this down. But @alemuntoni doesn't have access to our Qt versions or paths, so this issue would be virtually impossible to reproduce.

My solution was to stand up a container with the requirements, and just build PyMeshLab myself and install it, e.g.

git clone --recursive https://github.com/cnr-isti-vclab/PyMeshLab.git
DEBIAN_FRONTEND=noninteractive apt-get -y update
cd PyMeshLab/ && cd scripts/Linux && chmod +x 0_setup_env.sh && yes | ./0_setup_env.sh
cd PyMeshLab/ && cd scripts/Linux && chmod +x 1_build.sh && ./1_build.sh
cd PyMeshLab/ && pip install . # installs PyMeshLab, avoids missing Qt5 symbol
echo 'export LD_LIBRARY_PATH="<path to ... /site-packages/pymeshlab/lib/:<path to ... /site-packages/pymeshlab/lib/config:$LD_LIBRARY_PATH"' >> /root/.bashrc # pymeshlab knows where to find .so s

and I can import pymeshlab without issue despite having undefined symbols when doing a pip install.

@JenZhao
Copy link

JenZhao commented Feb 22, 2024

hi I ran into the same issue on Ubuntu 20.04.6 LTS

after install the pymeshlab I

Successfully installed numpy-1.26.4 pymeshlab-2023.12.post1

I got

In [1]: import pymeshlab
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[1], line 1
----> 1 import pymeshlab

File /opt/conda/lib/python3.10/site-packages/pymeshlab/__init__.py:11
      8     os.environ['QT_PLUGIN_PATH'] = this_path
      9     os.environ['PATH'] = this_path + os.pathsep + os.environ['PATH']
---> 11 from .pmeshlab import *
     12 from .replacer import replace_pymeshlab_filter_names
     13 from .polyscope_functions import show_polyscope

ImportError: /opt/conda/lib/python3.10/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5

qt5 installed is PyQt5-Qt5-5.15.2

@ArmanMaesumi
Copy link

I ran into the same error libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5

Running the following before my python script fixed it:

export LD_LIBRARY_PATH=~/.conda/envs/<ENV_NAME>/lib/python3.9/site-packages/pymeshlab/lib/:$LD_LIBRARY_PATH

A critical detail: :$LD_LIBRARY_PATH needs to come after the .../pymeshlab/lib/ path. If you do it the other way around, i.e. $LD_LIBRARY_PATH:~/.conda/envs/... then it will cause the same error (presumably because the pymeshlab lib needs to be searched first).

@Xallt
Copy link

Xallt commented May 11, 2024

@ArmanMaesumi that fix does help, however I get different behavior depending on whether I'm trying to import pymeshlab from a Jupyter notebook or from a python script
In the python script everything goes through fine
In the jupyter notebook I get the same error:
ImportError: /media/xallt/HardDrive/.virtualenv/python38/lib/python3.8/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5

i.e. I still cant import it in the notebook

@ArmanMaesumi
Copy link

ArmanMaesumi commented May 19, 2024

@ArmanMaesumi that fix does help, however I get different behavior depending on whether I'm trying to import pymeshlab from a Jupyter notebook or from a python script In the python script everything goes through fine In the jupyter notebook I get the same error: ImportError: /media/xallt/HardDrive/.virtualenv/python38/lib/python3.8/site-packages/pymeshlab/lib/libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5

i.e. I still cant import it in the notebook

@Xallt
I would suggest googling around for "LD_LIBRARY_PATH not working in jupyter notebook"

It seems like there are some relevant threads: jupyter/notebook#1290 (comment)

Note that, the solution in that thread suggests overriding the environment variable, whereas my suggestion concatenates to it. You can try both and see if it works

@dfrEak
Copy link

dfrEak commented Sep 18, 2024

Just today, I suddenly got same error

And somehow I fix it by doing:

  1. pip remove pyqt (!!! I wonder if this one is needed, havent try it again !!!)
  2. pip install pyqt5

Because I found out that pyqt and pyqt5 is different and when I list my installed package I cant find pyqt5

@ZhaoRunyi
Copy link

I ran into the same error libmeshlab-common.so: undefined symbol: _ZdlPvm, version Qt_5

Running the following before my python script fixed it:

export LD_LIBRARY_PATH=~/.conda/envs/<ENV_NAME>/lib/python3.9/site-packages/pymeshlab/lib/:$LD_LIBRARY_PATH

A critical detail: :$LD_LIBRARY_PATH needs to come after the .../pymeshlab/lib/ path. If you do it the other way around, i.e. $LD_LIBRARY_PATH:~/.conda/envs/... then it will cause the same error (presumably because the pymeshlab lib needs to be searched first).

IT WORKS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

10 participants