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

Module fails to import on CentOS 7 - version GLIBC not found #157

Closed
JulieWinchester opened this issue Oct 18, 2021 · 9 comments
Closed

Comments

@JulieWinchester
Copy link

It seems that PyMeshLab has been built to rely on a version of libstdc++ that is newer than what is available on CentOS 7.

Steps to reproduce (tested using a Digital Ocean CentOS 7 VM):

  1. sudo yum install freeglut freeglut-devel (to satisfy LibGL dependency)
  2. pip3 --user install pymeshlab
  3. Run python3 and execute import pymeshlab. Error received is:
Python 3.6.8 (default, Nov 16 2020, 16:55:22) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymeshlab
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jmw110/.local/lib/python3.6/site-packages/pymeshlab/__init__.py", line 12, in <module>
    from .pmeshlab import *
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/jmw110/.local/lib/python3.6/site-packages/pymeshlab/pmeshlab.cpython-36m-x86_64-linux-gnu.so)
@alemuntoni
Copy link
Member

I don't know if there is a way to have a newer version of libstdc++ on CentOS7, but I am afraid it will be the only way to have the pip package working there.
Our automatic build system runs on ubuntu18 since ubuntu16 is not supported anymore. There is not much more I can do.
If there is no way to update libstdc++, I think that the only way to have pymeshlab running on that system would be to build it manually.

@meJevin
Copy link

meJevin commented Mar 27, 2023

Hay @alemuntoni, I built pymeshlab manually on CentOS 7, when importing it I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/mnt/c/Users/mejev/Desktop/Dev/Other/PyMeshLab/pymeshlab/__init__.py", line 11, in <module>
    from .pmeshlab import *
ModuleNotFoundError: No module named 'pymeshlab.pmeshlab'

Any idea what might be causing this issue? I followed the build instructions here: https://github.com/cnr-isti-vclab/PyMeshLab/tree/main/src

@alemuntoni
Copy link
Member

Does the module pmeshlab actually exist inside the pymeshlab directory?
could you please report the file tree of the directory after executing ninja install?
It should look like the artifacts produced by our actions, like this one (the archives called PyMeshLab_[platform]_python[version].zip)

@meJevin
Copy link

meJevin commented Mar 27, 2023

Sure, here's what's inside pymeshlab
image

@alemuntoni
Copy link
Member

I am confused, is this CentOS in a linux virtual environment running on windows?
Anyway, have you tried to run ldd and check which libraries are not linked?
Maybe just running the deploy script could solve the issue, or just adding the right paths to LD_LIBRARY_PATH

@meJevin
Copy link

meJevin commented Mar 27, 2023

You are correct, I'm using WSL to run CentOS.
Here's the output of ldd:

[root@mejevin PyMeshLab]# ldd pymeshlab/pmeshlab.cpython-36m-x86_64-linux-gnu.so
        linux-vdso.so.1 =>  (0x00007fff6dde8000)
        libmeshlab-common.so => /mnt/c/Users/mejev/Desktop/Dev/Other/PyMeshLab/pymeshlab/lib/libmeshlab-common.so (0x00007f5803c58000)
        libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f5803730000)
        libQt5OpenGL.so.5 => /usr/local/Qt-5.15.8/lib/libQt5OpenGL.so.5 (0x00007f5804007000)
        libQt5Xml.so.5 => /usr/local/Qt-5.15.8/lib/libQt5Xml.so.5 (0x00007f58036e9000)
        libexternal-glew.so => /mnt/c/Users/mejev/Desktop/Dev/Other/PyMeshLab/pymeshlab/lib/libexternal-glew.so (0x00007f580361c000)
        libGL.so.1 => /lib64/libGL.so.1 (0x00007f5803390000)
        libQt5Widgets.so.5 => /usr/local/Qt-5.15.8/lib/libQt5Widgets.so.5 (0x00007f5802d18000)
        libQt5Gui.so.5 => /usr/local/Qt-5.15.8/lib/libQt5Gui.so.5 (0x00007f580266c000)
        libQt5Network.so.5 => /usr/local/Qt-5.15.8/lib/libQt5Network.so.5 (0x00007f5802518000)
        libQt5Core.so.5 => /usr/local/Qt-5.15.8/lib/libQt5Core.so.5 (0x00007f5801ee5000)
        libgomp.so.1 => /lib64/libgomp.so.1 (0x00007f5801cbf000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5801aa3000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f580179b000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f5801499000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f5801283000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f5800eb5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5803fa3000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f5800cb1000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007f5800aae000)
        libGLX.so.0 => /lib64/libGLX.so.0 (0x00007f580087c000)
        libX11.so.6 => /lib64/libX11.so.6 (0x00007f580053e000)
        libXext.so.6 => /lib64/libXext.so.6 (0x00007f580032c000)
        libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007f5800076000)
        libpng15.so.15 => /lib64/libpng15.so.15 (0x00007f57ffe4b000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f57ffc35000)
        libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f57ffa0d000)
        libXau.so.6 => /lib64/libXau.so.6 (0x00007f57ff809000)

Everything seems to be in place, or am I missing something?

@ggxxii
Copy link

ggxxii commented Jan 3, 2024

I just encounter the similar issue, except i directly install using "pip3 install PyMeshLab", this will install pymeshlab-2023.12, but when import, the error occurred " from .pmeshlab import *
ModuleNotFoundError: No module named 'pymeshlab.pmeshlab'"

@jpainam
Copy link

jpainam commented Feb 18, 2024

Facing the same issue #360

@Value-Jack
Copy link

Hay @alemuntoni, I built pymeshlab manually on CentOS 7, when importing it I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/mnt/c/Users/mejev/Desktop/Dev/Other/PyMeshLab/pymeshlab/__init__.py", line 11, in <module>
    from .pmeshlab import *
ModuleNotFoundError: No module named 'pymeshlab.pmeshlab'

Any idea what might be causing this issue? I followed the build instructions here: https://github.com/cnr-isti-vclab/PyMeshLab/tree/main/src

do you finally solve this promblem?

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

No branches or pull requests

6 participants