when I try to import the library I get this error:
>>> import petsc4py
>>> from petsc4py import PETSc
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
from petsc4py import PETSc
File "/opt/petsc/linux-c-opt/lib/petsc4py/PETSc.py", line 4, in <module>
PETSc = ImportPETSc(ARCH)
File "/opt/petsc/linux-c-opt/lib/petsc4py/lib/__init__.py", line 30, in ImportPETSc
return Import('petsc4py', 'PETSc', path, arch)
File "/opt/petsc/linux-c-opt/lib/petsc4py/lib/__init__.py", line 97, in Import
module = import_module(pkg, name, path, arch)
File "/opt/petsc/linux-c-opt/lib/petsc4py/lib/__init__.py", line 74, in import_module
module = importlib.util.module_from_spec(spec)
ImportError: /opt/petsc/linux-c-opt/lib/libpetsc.so.3.22: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
Pinned Comments
MartinDiehl commented on 2022-10-06 10:26 (UTC)
@jrohwer
When building PETSc (more specifically, petsc4py), one test (ex100 from ksp) will fail if a previous (major) version is installed. I could not figure out why this happens. The solution would be to build in a clean root (which is a little bit complicated due to dependency on other AUR packages) or simply uninstall the old version before.
Any help to solve this issue is welcomed.