dstndstn / astrometry.net

Astrometry.net -- automatic recognition of astronomical images
http://astrometry.net
Other
666 stars 187 forks source link

Build failure with a recent version of numpy (v0.89) #262

Closed carlocab closed 2 years ago

carlocab commented 2 years ago

Building astrometry.net v0.89 with a recent version of numpy (1.23.1, in my case) fails with

  INFO: clang: util_wrap.c
  util_wrap.c:3116:50: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
          int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_UPDATEIFCOPY;
                                                   ^
  In file included from util_wrap.c:3445:
  ../util/lanczos.i:204:46: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
      int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_UPDATEIFCOPY;
                                               ^
  ../util/lanczos.i:301:46: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
      int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_UPDATEIFCOPY;
                                               ^
  In file included from util_wrap.c:3457:
  ../util/lanczos.i:204:46: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
      int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_UPDATEIFCOPY;
                                               ^
  ../util/lanczos.i:301:46: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
      int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_UPDATEIFCOPY;
                                               ^
  util_wrap.c:3684:50: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
          int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_UPDATEIFCOPY;
                                                   ^
  util_wrap.c:5062:50: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
          int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_UPDATEIFCOPY;
                                                   ^
  util_wrap.c:5149:50: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
          int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_UPDATEIFCOPY;
                                                   ^

It seems that NPY_ARRAY_UPDATEIFCOPY has been deprecated for quite a while now, since at least numpy 1.17.

numpy 1.23.1 has now removed this definition, so the build fails.

See while trying to rebuild astrometry.net for Homebrew at https://github.com/Homebrew/homebrew-core/pull/107220.

carlocab commented 2 years ago

Actually, it seems like it's been deprecated since numpy 1.14, and was removed in numpy 1.23.

carlocab commented 2 years ago

It looks like this has already been fixed on HEAD. Is there any chance a new release could be cut with the fixes for this?

dstndstn commented 2 years ago

Done (0.91) https://github.com/dstndstn/astrometry.net/releases/tag/0.91

carlocab commented 2 years ago

Thank you!