Caltech-IPAC / Montage

Image Mosaics for Astronomers
Other
110 stars 47 forks source link

Montage fails to build from source with gcc-10 #49

Closed olebole closed 3 years ago

olebole commented 4 years ago

On Debian, we are currently testing to build our packages with the new gcc release 10. For Montage, this leads to an errror as reported in Debian#957558:

[…]
gcc -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -I../lib/include \
        -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c99 -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/wcstools \
        -I/usr/include/freetype2 -c  checkWCS.c
gcc -o mConvert mConvert.o debugCheck.o checkHdr.o \
    checkWCS.o -Wl,-z,relro -L../lib -lwcstools -lcfitsio -lcoord -lmtbl -lsvc -lwww -lboundaries -lpixbounds -ltwoplane -lm
/usr/bin/ld: debugCheck.o:./Montage/montage.h:2: multiple definition of `fstatus'; mConvert.o:./Montage/montage.h:2: first defined here
/usr/bin/ld: checkHdr.o:./Montage/montage.h:2: multiple definition of `fstatus'; mConvert.o:./Montage/montage.h:2: first defined here
/usr/bin/ld: checkWCS.o:./Montage/montage.h:2: multiple definition of `fstatus'; mConvert.o:./Montage/montage.h:2: first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:114: mConvert] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Montage'
make[2]: *** [Makefile:8: all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'

Full build log

Common problems with the new version are discussed here; it seems that the new -fno-common default causes this.

JohnGood commented 4 years ago

The problem has been addressed but we haven't been able to find an instance of gcc 10.1 to test against. There is a Docker image with 10.0 (different OS) but that passed the old code as well. We are hesitant to push the changes without having tested it.

olebole commented 4 years ago

Could you create a Pull Request with the changes? Then I could try to test them with Debian experimental.

koxu1996 commented 4 years ago

@JohnGood BTW I use Arch :)

$ docker run -it archlinux/base bash
# pacman -Syy && pacman -S --noconfirm gcc
# gcc --version
gcc (GCC) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
JohnGood commented 3 years ago

While we have maintained a presence for Montage on GitHub for a several years now, until recently the actual source code control and issue tracking were done through other, institution-specific, tools. So while we addressed all issues in a timely manner, we were regrettably lax about cleaning up these issues in GitHub.

This change has been propogated.