Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 707164

Summary: sci-astronomy/skymaker-3.10.5 : fails to build with -fno-common or gcc-10
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Astronomy project <sci-astronomy>
Status: RESOLVED FIXED    
Severity: normal CC: eschwartz93
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/astromatic/skymaker/pull/1
https://bugs.gentoo.org/show_bug.cgi?id=862246
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705764    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
sci-astronomy:skymaker-3.10.5:20200129-015411.log
temp.tbz2

Description Toralf Förster gentoo-dev 2020-01-29 17:51:31 UTC
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..     -O2 -pipe -march=native -fno-common -c simul.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..     -O2 -pipe -march=native -fno-common -c stars.c
/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -O2 -pipe -march=native -fno-common  -Wl,-O1 -Wl,--as-needed -o sky alterimage.o fft.o fitswcs.o galaxies.o image.o imaout.o list.o main.o makeit.o poly.o prefs.o psf.o random.o simul.o stars.o ./fits/libfits.a ./wcs/libwcs_c.a -lfftw3f -lm 
libtool: link: x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fno-common -Wl,-O1 -Wl,--as-needed -o sky alterimage.o fft.o fitswcs.o galaxies.o image.o imaout.o list.o main.o makeit.o poly.o prefs.o psf.o random.o simul.o stars.o  ./fits/libfits.a ./wcs/libwcs_c.a -lfftw3f -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: fft.o:(.bss+0x1b80): multiple definition of `gstr'; alterimage.o:(.bss+0x1b60): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: fft.o:(.bss+0x20): multiple definition of `prefs'; alterimage.o:(.bss+0x0): first defined here

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1-libressl-20200125-183534

  -------------------------------------------------------------------

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.40.0 *
java-config:
The following VMs are available for generation-2:
*)	AdoptOpenJDK 8.242_p08 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm
ghc:
The Glorious Glasgow Haskell Compilation System, version 7.10.3

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Wed, 29 Jan 2020 00:26:22 +0000

emerge -qpvO sci-astronomy/skymaker
[ebuild  N    ] sci-astronomy/skymaker-3.10.5  USE="-threads"
Comment 1 Toralf Förster gentoo-dev 2020-01-29 17:51:33 UTC
Created attachment 607616 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-01-29 17:51:36 UTC
Created attachment 607618 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-01-29 17:51:39 UTC
Created attachment 607620 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-01-29 17:51:41 UTC
Created attachment 607622 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-01-29 17:51:44 UTC
Created attachment 607624 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-01-29 17:51:47 UTC
Created attachment 607626 [details]
sci-astronomy:skymaker-3.10.5:20200129-015411.log
Comment 7 Toralf Förster gentoo-dev 2020-01-29 17:51:49 UTC
Created attachment 607628 [details]
temp.tbz2
Comment 8 Larry the Git Cow gentoo-dev 2020-10-03 23:10:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15811784574e3886dd48185511c0b8444bae5c52

commit 15811784574e3886dd48185511c0b8444bae5c52
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2020-10-03 23:09:53 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2020-10-03 23:09:53 +0000

    sci-astronomy/skymaker: Fix -fno-common
    
    Closes: https://bugs.gentoo.org/707164
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: David Seifert <soap@gentoo.org>

 .../files/skymaker-3.10.5-fno-common.patch         | 66 ++++++++++++++++++++++
 sci-astronomy/skymaker/skymaker-3.10.5.ebuild      | 10 ++--
 2 files changed, 72 insertions(+), 4 deletions(-)
Comment 9 Eli Schwartz 2024-03-17 18:28:40 UTC
libtool: link: x86_64-pc-linux-gnu-gcc -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types -Wl,-O1 -Wl,--as-needed -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0 -o sky alterimage.o fft.o fitswcs.o galaxies.o image.o imaout.o list.o main.o makeit.o poly.o prefs.o psf.o random.o simul.o stars.o  ./fits/libfits.a ./wcs/libwcs_c.a -lfftw3f -lm
globals.h:32:25: error: type of 'gstr' does not match original declaration [-Werror=lto-type-mismatch]
   32 | extern char             gstr[MAXCHAR];
      |                         ^
fits/fitscat.c:46:9: note: array types have different bounds
   46 | char    gstr[MAXCHAR];
      |         ^
fits/fitscat.c:46:9: note: 'gstr' was previously declared here
lto1: some warnings being treated as errors
lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status




The failing code was added by this fix. Upstream added a different fix.