-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Close?Tell stale bot that this issue/PR is staleTell stale bot that this issue/PR is staleUpstream Action RequiredWas: Upstream Fix RequiredWas: Upstream Fix Requirederfa
Milestone
Description
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Close?Tell stale bot that this issue/PR is staleTell stale bot that this issue/PR is staleUpstream Action RequiredWas: Upstream Fix RequiredWas: Upstream Fix Requirederfa