Post Reply 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
compile fails for gcc10
08-17-2020, 09:26
Post: #1
compile fails for gcc10
Dear Emmanuel and SExtractor users,

SExtractor (ver 2.19.5) fails to compile with the gcc10 compiler with hundreds of errors of the following type:

duplicate symbol '_bswapflag' in:

This occurs at the point of linking the sex binary:

libtool: link: gcc-mp-10 -g -O2 -o sex analyse.o assoc.o astrom.o back.o bpro.o catout.o check.o clean.o extract.o fft.o field.o filter.o fitswcs.o flag.o graph.o growth.o header.o image.o interpolate.o main.o makeit.o manobjlist.o misc.o neurro.o pattern.o pc.o photom.o plist.o prefs.o profit.o psf.o readimage.o refine.o retina.o scan.o som.o weight.o winpos.o xml.o ./fits/libfits.a ./wcs/libwcs_c.a ./levmar/liblevmar.a -L/opt/local/lib -llapack -lcblas -latlas -lfftw3f -lm

I have the same behaviour on macOS (10.5), Fedora 32 and Ubuntu 20.04.

On macOS and Ubuntu 20.04 it is trivial to have multiple versions of gcc installed e.g. both gcc9 and gcc10, and on both macOS and Ubuntu using gcc9 compiles without issue while gcc10 fails.

So I do not believe that this is an issue with OS, nor with a "peculiarity" of my system/configuration. It really does look like an issue caused by more rigorous checking introduced by gcc10.

While "don't use gcc10, use gcc9 or lower" is a workaround that will work in most cases (not trivially for Fedora 32+), I believe this does highlight an coding issue in the Astromatic code that should be addressed. Note I write Astromatic code, not SExtractor code because I believe this is an issue probably with most, if not all of the Astromatic code -- I have already checked SWarp and the same issue presents there. Basically I think it is in the way global variables re defined and used -- gcc10 does not like it.

Best regards
Find all posts by this user
Quote this message in a reply
08-17-2020, 09:52
Post: #2
RE: compile fails for gcc10
Dear John,

you are perfectly right! This is fixed this in the fno-common_fix branch of the SExtractor GitHub repository. Would you mind checking that it works as you expect and I will merge it into the master branch?
I have also done that fix in SCAMP, SWarp is next on the list.
Note however that if all you want to do is install and update the packages on a regular Linux distro, you may also set up binary repositories with optimized executables (the bleeding channel is the most up-to-date).
Best wishes
Visit this user's website Find all posts by this user
Quote this message in a reply
08-17-2020, 11:35 (This post was last modified: 08-17-2020 11:37 by John Pritchard.)
Post: #3
RE: compile fails for gcc10
Dear Emmanuel,

Many thanks for the quick feedback. Glad to read fix for this is already underway.

I have successfully compiled it on my three platforms (macOS-10.15 & Ubuntu 20.04 for gcc9 & gcc10 and Fedora 32 gcc10 only) and at least executed the "sex" binary just to get (for example):

$ gcc10/sextractor_fno-common_fix/src/sex

SExtractor version 2.25.2 (2020-08-17)

Written by Emmanuel BERTIN <>
Copyright 2012-2015 IAP/CNRS/UPMC


SExtractor comes with ABSOLUTELY NO WARRANTY
You may redistribute copies of SExtractor
under the terms of the GNU General Public License.

> SYNTAX: sex <image> [<image2>][-c <configuration_file>][-<keyword> <value>]
> to dump a default configuration file: sex -d
> to dump a default extended configuration file: sex -dd
> to dump a full list of measurement parameters: sex -dp

I have not, and do not have any data, to test it quickly further than this but I think you can merge it based on these results.

Best regards

P.S. Please let me know as you update (and eventually release) the fixed versions of SExtractor and the other Astromatic codes.
Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

User(s) browsing this thread: 1 Guest(s)