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

libgap.so.0: No such file or directory #21

Open
DanieleMarchei opened this issue Dec 1, 2023 · 1 comment
Open

libgap.so.0: No such file or directory #21

DanieleMarchei opened this issue Dec 1, 2023 · 1 comment

Comments

@DanieleMarchei
Copy link

DanieleMarchei commented Dec 1, 2023

I installed gappy-system using
pip3 install gappy-system
I also downloaded GAP from https://www.gap-system.org/Releases/4.12.2.html, ran ./configure && make, the BuildPackages.sh script and make install-libgap.
When I try to import gappy in python

from gappy import gap

I get the following error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/daniele/.local/lib/python3.10/site-packages/gappy/__init__.py", line 2, in <module>
    from .core import gap, Gap
ImportError: libgap.so.0: cannot open shared object file: No such file or directory

I checked and my /usr/local/lib contains the file libgap.so, but not the libgap.so.0.
Creating a symbolic link using
ln -s libgap.so libgap.so.0
does not raise the error, but then if I try running

from gappy import gap
gap.SymmetricGroup(4)

it gives a segmentation fault.

I then tried cloning the repo and installing it from there with
pip3 install .
but I get the following error

Defaulting to user installation because normal site-packages is not writeable
Processing /home/daniele/Scrivania/polytime_algo/gappy
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: cysignals in /home/daniele/.local/lib/python3.10/site-packages (from gappy-system==0.1.0a4.dev5+ga0642c4) (1.11.4)
Requirement already satisfied: psutil in /home/daniele/.local/lib/python3.10/site-packages (from gappy-system==0.1.0a4.dev5+ga0642c4) (5.9.6)
Building wheels for collected packages: gappy-system
  Building wheel for gappy-system (pyproject.toml) ... error
  error: subprocess-exited-with-error
  × Building wheel for gappy-system (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [55 lines of output]
      /tmp/pip-build-env-bs5nmqmd/overlay/local/lib/python3.10/dist-packages/setuptools/dist.py:472: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!
              ********************************************************************************
              Usage of dash-separated 'author-email' will not be supported in future
              versions. Please use the underscore name 'author_email' instead.
              By 2024-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      !!
        opt = self.warn_dash_deprecation(opt, section)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/conftest.py -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/__init__.py -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/gap_globals.py -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/exceptions.py -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/context_managers.py -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/version.py -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/gap_functions.py -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/_version.py -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/operations.py -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/core.pxd -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/gap_includes.pxd -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/gmp.pxd -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/gapobj.pxd -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/core.pyx -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/gapobj.pyx -> build/lib.linux-x86_64-cpython-310/gappy
      copying gappy/utils.pyx -> build/lib.linux-x86_64-cpython-310/gappy
      running build_ext
      Compiling gappy/core.pyx because it changed.
      Compiling gappy/gapobj.pyx because it changed.
      Compiling gappy/utils.pyx because it changed.
      [1/3] Cythonizing gappy/core.pyx
      [2/3] Cythonizing gappy/gapobj.pyx
      [3/3] Cythonizing gappy/utils.pyx
      building 'gappy.core' extension
      creating build/temp.linux-x86_64-cpython-310/gappy
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-build-env-bs5nmqmd/overlay/local/lib/python3.10/dist-packages/cysignals -Ibuild/temp.linux-x86_64-cpython-310/include -I/home/daniele/gap-4.12.2/gen -I/usr/include/python3.10 -c gappy/core.c -o build/temp.linux-x86_64-cpython-310/gappy/core.o
      gappy/core.c:810:23: error: conflicting types for ‘GAP_MakeStringWithLen’; have ‘struct OpaqueBag *(char *, size_t)’ {aka ‘struct OpaqueBag *(char *, long unsigned int)’}
        810 |     static inline Obj GAP_MakeStringWithLen(char *s, size_t len) {
            |                       ^~~~~~~~~~~~~~~~~~~~~
      In file included from gappy/core.c:776:
      build/temp.linux-x86_64-cpython-310/include/gap/libgap-api.h:521:5: note: previous declaration of ‘GAP_MakeStringWithLen’ with type ‘struct OpaqueBag *(const char *, UInt)’ {aka ‘struct OpaqueBag *(const char *, long unsigned int)’}
        521 | Obj GAP_MakeStringWithLen(const char * string, UInt len);
            |     ^~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gappy-system
Failed to build gappy-system
ERROR: Could not build wheels for gappy-system, which is required to install pyproject.toml-based projects
@embray
Copy link
Owner

embray commented Jun 2, 2024

If you install GAP from source it's best to make sure to set GAP_ROOT=... when installing, pointing to your GAP root.

That said , GAP 4.12 isn't supported yet. 4.11 is the highest supported version, probably hence the segfault (and possibly also the different soname)

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

2 participants