astromatic / sextractor

Extract catalogs of sources from astronomical images
http://astromatic.net/software/sextractor
GNU General Public License v3.0
148 stars 43 forks source link

Installation crash on macOS: include the header <math.h> or explicitly provide a declaration for 'finite' #27

Open infantesainz opened 1 year ago

infantesainz commented 1 year ago

When trying to install Source-extractor 2.25.0 on macOs Monterey 12.3 with AppleClang 13.1.6.13160021, it crashes complaining about not having a definition of 'finite':

./lmbc_core.c:324:13: note: include the header <math.h> or explicitly provide a declaration for 'finite'

Apparently this function has been deprecated on macOS and now it is named 'isfinite'. I have been able to fix this problem and successfully install it by manually replacing

define LM_FINITE finite

by

define LM_FINITE isfinite

in the file src/levmar/compiler.h.

It would be great if for the next releases this issue can be fixed. Thanks a lot in advance.