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

Build error #1

Closed
psteinb opened this issue Feb 6, 2025 · 6 comments
Closed

Build error #1

psteinb opened this issue Feb 6, 2025 · 6 comments

Comments

@psteinb
Copy link

psteinb commented Feb 6, 2025

I've been wanting to install pyCBC 2.7.2 and ran into trouble building python-ligo-lw. It turns out that the root cause appears to be in ligo-segments (v1.4.0), but I am unable to provide an issue to @duncanmmacleod et al on https://git.ligo.org/kipp/ligo-segments/-/issues because I can't login (neither github nor my research institution login works).

Anyway, here is the error I get on fc40 with cpython 3.12.8 trying to build ligo-segments 1.4.0 from pypi:

$ uv pip install "python-ligo-lw==1.8.1" 
Using Python 3.12.8 environment at: py312
Resolved 13 packages in 1.27s

  × Failed to build `ligo-segments==1.4.0`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

      [stderr]
      /home/steinb95/.cache/uv/builds-v0/.tmp6MxkVf/lib64/python3.12/site-packages/setuptools/dist.py:701: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
      !!

              ********************************************************************************
              Please replace its usage with implicit namespaces (PEP 420).

              See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
              ********************************************************************************

      !!
        ep.load()(self, ep.name, value)
      In file included from /usr/include/python3.12/Python.h:44,
                       from src/infinity.c:29:
      /usr/include/python3.12/object.h:142:9: error: initialization of ‘long int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
        142 |         (type)                   \
            |         ^
      src/infinity.c:271:9: note: in expansion of macro ‘PyObject_HEAD_INIT’
        271 |         PyObject_HEAD_INIT(NULL)
            |         ^~~~~~~~~~~~~~~~~~
      /usr/include/python3.12/object.h:142:9: note: (near initialization for ‘segments_Infinity_Type.ob_base.ob_size’)
        142 |         (type)                   \
            |         ^
      src/infinity.c:271:9: note: in expansion of macro ‘PyObject_HEAD_INIT’
        271 |         PyObject_HEAD_INIT(NULL)
            |         ^~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1

      hint: This usually indicates a problem with the package or the build environment.
  help: `ligo-segments` (v1.4.0) was included because `python-ligo-lw` (v1.8.1) depends on `ligo-segments`

@psteinb
Copy link
Author

psteinb commented Feb 6, 2025

Note to self: this appears to be a problem at the interplay between gcc and the python 3.12.8 C code.

The installation works just fine with python 3.11.11 and 3.10.16 coming with fc40. However, Cpython 3.12.8 and 3.13.1 are affected.

@duncanmmacleod
Copy link
Contributor

@psteinb, this is a known issue the ligo-segments, reported here: https://git.ligo.org/lscsoft/ligo-segments/-/issues/20. A patch has been merged upstream but not release has been made and, despite requests, one doesn't seem to be forthcoming.

As a result the LIGO Computing group ended up forking the project in its entirely to create https://git.ligo.org/computing/software/igwn-segments, which is available on PyPI and conda-forge as igwn-segments.

python-ligo-lw (from the same developer as ligo-segments) suffers from the same build errors and the same decision was taken there as well, please see https://git.ligo.org/computing/software/igwn-ligolw, also available on PyPI and conda-forge as igwn-ligolw.

PyCBC has migrated to igwn-segments (at least on the default branch, not sure about a release yet) and should be in the process of migrating to igwn-ligolw, please see gwastro/pycbc#4999 and gwastro/pycbc#5019.

@psteinb
Copy link
Author

psteinb commented Feb 6, 2025

Thanks so much for quick response. This provides me with more context - which is great! pyCBC 2.7.2 still depends on python-ligo-lw and thus on ligo-segments.

The github master branch points to python-ligo-lw as dependency too, see also https://github.com/gwastro/pycbc/blob/f38df69c0c3f457cd1451d1952161d2d2c625c63/requirements.txt#L38
Is the pypi version not build from this?

@psteinb
Copy link
Author

psteinb commented Feb 6, 2025

Ah, sorry. Just saw that the pycbc setup.py points to igwn-segments.
https://github.com/gwastro/pycbc/blob/f38df69c0c3f457cd1451d1952161d2d2c625c63/setup.py#L50
but the last release does not
https://github.com/gwastro/pycbc/blob/ef15a54096336fc736b1f447eb70a751222e1f77/setup.py#L50

OK, I see. Then I am hoping for an upcoming release of pycbc which fixes this.

@titodalcanton
Copy link

@psteinb I think we are waiting for a few more checks/things to be on master before making a new release, but I hope we get to that in the coming days.

@psteinb
Copy link
Author

psteinb commented Feb 6, 2025

Great to hear. I'll close this issue then. Thanks everyone for chiming in.

@psteinb psteinb closed this as completed Feb 6, 2025
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

3 participants