netgen icon indicating copy to clipboard operation
netgen copied to clipboard

Noticing occasional issues when running netgen-mesher

Open olly-writes-code opened this issue 1 year ago • 0 comments

Hi,

I've occasionally got this error when using netgen-mesher on a Ubuntu 22.04 machine installed via poetry

  File "/home/ubuntu/.cache/pypoetry/virtualenvs/path-py3.11/lib/python3.11/site-packages/netgen/meshing.py", line 1, in <module>
    from .libngpy._meshing import *
ImportError: libTKOffset.so.7.8.1: cannot open shared object file: No such file or directory

I have confirmed that libTKOffset.so.7.8.1 is installed.

sudo find / -name "libTKOffset.so*"
/home/ubuntu/.cache/pypoetry/virtualenvs/path-py3.11/lib/libTKOffset.so.7.8.1

But when I run LDD to check the dependencies, I see that several upstream dependencies are missing.

ldd /home/ubuntu/.cache/pypoetry/virtualenvs/path-py3.11/lib/libTKOffset.so.7.8.1
	linux-vdso.so.1 (0x00007ffe6dbfb000)
	libTKFillet.so.7.8.1 => not found
	libTKBool.so.7.8.1 => not found
	libTKBO.so.7.8.1 => not found
	libTKShHealing.so.7.8.1 => not found
	libTKPrim.so.7.8.1 => not found
	libTKTopAlgo.so.7.8.1 => not found
	libTKGeomAlgo.so.7.8.1 => not found
	libTKBRep.so.7.8.1 => not found
	libTKGeomBase.so.7.8.1 => not found
	libTKG3d.so.7.8.1 => not found
	libTKG2d.so.7.8.1 => not found
	libTKMath.so.7.8.1 => not found
	libTKernel.so.7.8.1 => not found
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x0000776cae8e4000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x0000776cae8dd000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x0000776cae600000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x0000776cae8d8000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000776cae519000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000776cae8b8000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000776cae200000)
	/lib64/ld-linux-x86-64.so.2 (0x0000776caeab6000)

However, these packages do exist

ls /home/ubuntu/.cache/pypoetry/virtualenvs/path-py3.11/lib/
cmake                  libTKCDF.so.7.8.1        libTKDEVRML.so.7.8.1    libTKMath.so.7.8.1       libTKTObj.so.7.8.1     libTKXmlTObj.so.7.8.1
libTKBO.so.7.8.1       libTKDE.so.7.8.1         libTKFeat.so.7.8.1      libTKMesh.so.7.8.1       libTKTopAlgo.so.7.8.1  libTKXmlXCAF.so.7.8.1
libTKBRep.so.7.8.1     libTKDECascade.so.7.8.1  libTKFillet.so.7.8.1    libTKOffset.so.7.8.1     libTKV3d.so.7.8.1      libTKernel.so.7.8.1
libTKBin.so.7.8.1      libTKDEGLTF.so.7.8.1     libTKG2d.so.7.8.1       libTKPrim.so.7.8.1       libTKVCAF.so.7.8.1     python3.11
libTKBinL.so.7.8.1     libTKDEIGES.so.7.8.1     libTKG3d.so.7.8.1       libTKRWMesh.so.7.8.1     libTKXCAF.so.7.8.1
libTKBinTObj.so.7.8.1  libTKDEOBJ.so.7.8.1      libTKGeomAlgo.so.7.8.1  libTKService.so.7.8.1    libTKXMesh.so.7.8.1
libTKBinXCAF.so.7.8.1  libTKDEPLY.so.7.8.1      libTKGeomBase.so.7.8.1  libTKShHealing.so.7.8.1  libTKXSBase.so.7.8.1
libTKBool.so.7.8.1     libTKDESTEP.so.7.8.1     libTKHLR.so.7.8.1       libTKStd.so.7.8.1        libTKXml.so.7.8.1
libTKCAF.so.7.8.1      libTKDESTL.so.7.8.1      libTKLCAF.so.7.8.1      libTKStdL.so.7.8.1       libTKXmlL.so.7.8.1

It seems like something might be messed up with the CMake RPATH or RUNPATH for the installed libraries.

olly-writes-code avatar Jul 18 '24 17:07 olly-writes-code