Bug#957598: nethack: ftbfs with GCC-10

Matthias Klose doko at debian.org
Fri Apr 17 12:07:10 BST 2020


Package: src:nethack
Version: 3.6.1-1
Severity: normal
Tags: sid bullseye
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-10

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-10/g++-10, but succeeds to build with gcc-9/g++-9. The
severity of this report will be raised before the bullseye release,
so nothing has to be done for the buster release.

The full build log can be found at:
http://people.debian.org/~doko/logs/gcc10-20200225/nethack_3.6.1-1_unstable_gcc10.log
The last lines of the build log are at the end of this report.

To build with GCC 10, either set CC=gcc-10 CXX=g++-10 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++ 

Common build failures are new warnings resulting in build failures with
-Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-10/porting_to.html

[...]
                 from ../include/global.h:117,
                 from ../include/config.h:564,
                 from ../include/hack.h:10,
                 from write.c:4:
In function ‘strncpy’,
    inlined from ‘dowrite’ at write.c:161:16:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 7 bytes from a string of the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL  -c ../sys/share/posixregex.c
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL  -c ../sys/share/ioctl.c
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL  -c ../sys/unix/unixmain.c
../sys/unix/unixmain.c: In function ‘chdirx’:
../sys/unix/unixmain.c:476:16: warning: ignoring return value of ‘setgid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  476 |         (void) setgid(getgid());
      |                ^~~~~~~~~~~~~~~~
../sys/unix/unixmain.c:477:16: warning: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  477 |         (void) setuid(getuid()); /* Ron Wessels */
      |                ^~~~~~~~~~~~~~~~
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL  -c ../sys/share/unixtty.c
In file included from /usr/include/string.h:495,
                 from ../include/system.h:303,
                 from ../include/unixconf.h:320,
                 from ../include/global.h:117,
                 from ../include/config.h:564,
                 from ../include/hack.h:10,
                 from ../sys/unix/unixmain.c:8:
In function ‘strncat’,
    inlined from ‘main’ at ../sys/unix/unixmain.c:230:20:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin___strncat_chk’ output may be truncated copying between 0 and 30 bytes from a string of length 31 [-Wstringop-truncation]
  136 |   return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sys/share/unixtty.c: In function ‘linux_mapon’:
../sys/share/unixtty.c:413:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  413 |         write(1, "\033(B", 3);
      |         ^~~~~~~~~~~~~~~~~~~~~
../sys/share/unixtty.c: In function ‘linux_mapoff’:
../sys/share/unixtty.c:423:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  423 |         write(1, "\033(U", 3);
      |         ^~~~~~~~~~~~~~~~~~~~~
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL  -c ../sys/unix/unixunix.c
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL  -c ../win/tty/getline.c
../sys/unix/unixunix.c: In function ‘child’:
../sys/unix/unixunix.c:307:16: warning: ignoring return value of ‘setgid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  307 |         (void) setgid(getgid());
      |                ^~~~~~~~~~~~~~~~
../sys/unix/unixunix.c:308:16: warning: ignoring return value of ‘setuid’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  308 |         (void) setuid(getuid());
      |                ^~~~~~~~~~~~~~~~
../sys/unix/unixunix.c:310:16: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  310 |         (void) chdir(getenv("HOME"));
      |                ^~~~~~~~~~~~~~~~~~~~~
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL  -c ../win/tty/termcap.c
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL  -c ../win/tty/topl.c
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL  -c ../win/tty/wintty.c
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL    -c -o vision.o vision.c
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL    -c -o vis_tab.o vis_tab.c
/bin/sh ../sys/unix/gitinfo.sh 1 #before 'makedefs -v'
../util/makedefs -v
cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I../include -Wall -DGCC_WARN -DNOTPARMDECL    -c -o version.o version.c
Linking nethack-console.
cc -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -o nethack-console 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 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 monstr.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 -lcurses 
/usr/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
make[2]: *** [Makefile:499: Sysunix] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[1]: *** [debian/rules:19: override_dh_auto_build] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:80: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2



More information about the Pkg-games-devel mailing list