astromatic / sextractor

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

check USE_MODEL before including fft.h in src/makeit.c #7

Closed kirxkirx closed 1 year ago

kirxkirx commented 5 years ago

When configured with --disable-model-fitting option, SExtractor fails to compile with the following error:

mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT makeit.o -MD -MP -MF .deps/makeit.Tpo -c -o makeit.o makeit.c
In file included from makeit.c:47:
fft.h:34:10: error: #include expects "FILENAME" or <FILENAME>
 #include FFTW_H
          ^~~~~~
make[3]: *** [Makefile:628: makeit.o] Error 1

This can be fixed by adding USE_MODEL definition check in src/makeit.c around including fft.h

#ifdef USE_MODEL 
#include        "fft.h"
#endif
kirxkirx commented 1 year ago

Still have to manually apply this simple fix whenever I update SExtractor. It's been three years. Just saying...

ebertin commented 1 year ago

Hi @kirxkirx . I applied your fix in the icx branch (b13e36d) some time ago. I just need to find the time to make more testing before merging the branch into master and doing a proper release. Sorry for that.