Skip to content

4.0 rc1: astropy uses unreleased version of erfa #9654

Closed

Description

@olebole

That is a problem specific for those who use the system's library for erfa: The version in astropy incorporates liberfa/erfa#49, which is not merged or released yet. The function eraSetLeapSeconds() is then used in _erfa/ufunc.c and causes a build failure:

astropy/_erfa/ufunc.c: In function ‘get_leap_seconds’:
astropy/_erfa/ufunc.c:9715:5: error: unknown type name ‘eraLEAPSECOND’
 9715 |     eraLEAPSECOND *leapseconds;
      |     ^~~~~~~~~~~~~
astropy/_erfa/ufunc.c:9719:23: warning: implicit declaration of function ‘eraGetLeapSeconds’ [-Wimplicit-function-declaration]
 9719 |     count = (npy_intp)eraGetLeapSeconds(&leapseconds);
      |                       ^~~~~~~~~~~~~~~~~
astropy/_erfa/ufunc.c:9733:59: error: ‘eraLEAPSECOND’ undeclared (first use in this function); did you mean ‘dt_eraLEAPSECOND’?
 9733 |     memcpy(PyArray_DATA(array), leapseconds, count*sizeof(eraLEAPSECOND));
      |                                                           ^~~~~~~~~~~~~
      |                                                           dt_eraLEAPSECOND
astropy/_erfa/ufunc.c:9733:59: note: each undeclared identifier is reported only once for each function it appears in
astropy/_erfa/ufunc.c: In function ‘set_leap_seconds’:
astropy/_erfa/ufunc.c:9765:9: warning: implicit declaration of function ‘eraSetLeapSeconds’ [-Wimplicit-function-declaration]
 9765 |         eraSetLeapSeconds(PyArray_DATA(array), PyArray_SIZE(array));
      |         ^~~~~~~~~~~~~~~~~

It would be great if this is either wrapped with #ifdef so that it remains inactive for the old erfa version (which would require a proper #define in erfa.h, which may anyway a good idea, or to have a new release of erfa that includes the patch. Otherwise, I could also apply the patch to the Debian package.

Cc: @eteq (erfa maintainer)

Activity

  1. pllim commented on Nov 22, 2019

    @pllim
    Member

    Hmm... related to #9329 ? cc @mhvk

  2. added this to the v4.0 milestone on Nov 22, 2019
  3. bsipocz commented on Nov 22, 2019

    @bsipocz
    Member

    I suppose this means we need an erfa release 🤷‍♀

  4. mhvk commented on Nov 26, 2019

    @mhvk
    Contributor

    Fix for erfa at liberfa/erfa#58

  5. pllim commented on Dec 6, 2019

    @pllim
    Member

    @olebole , @eteq has released a new version of ERFA (see liberfa/erfa#58 (comment)). Is this now resolved?

  6. added
    Close?Tell stale bot that this issue/PR is stale
    on Dec 6, 2019
  7. olebole commented on Dec 6, 2019

    @olebole
    MemberAuthor

    I just uploaded the new version to Debian unstable, so I am fine with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Close?Tell stale bot that this issue/PR is staleUpstream Action RequiredWas: Upstream Fix Requirederfa

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions