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

Bug 706320

Summary: games-roguelike/nethack-3.6.4 : fails to build with -fno-common or gcc-10
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Games <games>
Status: RESOLVED OBSOLETE    
Severity: normal CC: jer
Priority: Normal Keywords: PATCH, UPSTREAM
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/NetHack/NetHack/pull/289
https://github.com/NetHack/NetHack/pull/291
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705764    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
games-roguelike:nethack-3.6.4:20200125-124810.log
temp.tbz2
nethack-3.6.4-fno-common.patch

Description Toralf Förster gentoo-dev 2020-01-25 15:53:53 UTC
../util/makedefs -v
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fno-common -I../include -DDLB -DSECURE -DTIMED_DELAY -DVISION_TABLES -DDUMPLOG -DSCORE_ON_BOTL -DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" -DHACKDIR=\"/usr/lib64/nethack\" -DVAR_PLAYGROUND=\"/var/games/nethack\" -DDEF_PAGER=\"/usr/bin/less\" -DSYSCF -DSYSCF_FILE=\"/etc/nethack.sysconf\"   -c -o version.o version.c
Linking nethack.
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -o nethack monst.o objects.o allmain.o alloc.o apply.o artifact.o attrib.o ball.o bones.o botl.o cmd.o dbridge.o decl.o detect.o dig.o display.o dlb.o do.o do_name.o do_wear.o dog.o dogmove.o dokick.o dothrow.o drawing.o dungeon.o eat.o end.o engrave.o exper.o explode.o extralev.o files.o fountain.o hack.o hacklib.o invent.o isaac64.o light.o lock.o mail.o makemon.o mapglyph.o mcastu.o mhitm.o mhitu.o minion.o mklev.o mkmap.o mkmaze.o mkobj.o mkroom.o mon.o mondata.o monmove.o mplayer.o mthrowu.o muse.o music.o o_init.o objnam.o options.o pager.o pickup.o pline.o polyself.o potion.o pray.o priest.o quest.o questpgr.o read.o rect.o region.o restore.o rip.o rnd.o role.o rumors.o save.o shk.o shknam.o sit.o sounds.o sp_lev.o spell.o sys.o steal.o steed.o teleport.o timeout.o topten.o track.o trap.o u_init.o uhitm.o vault.o vision.o vis_tab.o weapon.o were.o wield.o windows.o wizard.o worm.o worn.o write.o zap.o posixregex.o  ioctl.o unixmain.o unixtty.o unixunix.o unixres.o getline.o termcap.o topl.o wintty.o  version.o -lncurses -ltinfo  
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: windows.o:(.bss+0x0): multiple definition of `WIN_STATUS'; decl.o:(.data+0x40): first defined here
collect2: error: ld returned 1 exit status

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no-multilib-20200124-204141

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

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


llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.40.0 *



repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Sat, 25 Jan 2020 11:46:37 +0000

emerge -qpvO games-roguelike/nethack
[ebuild  N    ] games-roguelike/nethack-3.6.4  USE="-X"
Comment 1 Toralf Förster gentoo-dev 2020-01-25 15:54:38 UTC
Created attachment 604298 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-01-25 15:55:26 UTC
Created attachment 604300 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-01-25 15:56:18 UTC
Created attachment 604302 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-01-25 15:57:04 UTC
Created attachment 604304 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-01-25 15:57:46 UTC
Created attachment 604306 [details]
games-roguelike:nethack-3.6.4:20200125-124810.log
Comment 6 Toralf Förster gentoo-dev 2020-01-25 15:58:41 UTC
Created attachment 604308 [details]
temp.tbz2
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-27 12:31:07 UTC
Created attachment 605168 [details, diff]
nethack-3.6.4-fno-common.patch
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-27 12:34:03 UTC
Comment on attachment 605168 [details, diff]
nethack-3.6.4-fno-common.patch

- include/decl.h has:

#define E extern
...
E NEARDATA winid WIN_STATUS;

- All .c files in the patch should not use `extern`.

- src/decl.c aligns nicely with include/decl.h, so keep that definition and remove those defnitions from other .c files
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-27 12:45:01 UTC
Hm, someone out  there seems to think that you can just magically test for GCC 10 / Linux. :-\
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2020-04-02 23:23:15 UTC
Obsoleted by nethack-3.6.6 bump.