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

Bug 803194

Summary: games-misc/bsd-games-3.1-r1 - ui.c:(.text+<snip>): undefined reference to setcchar
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal CC: drmccoy, ionen, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
games-misc:bsd-games-3.1-r1:20210721-032750.log
temp.tar.bz2
Patch that fixes compilation with ncurses-6.2_p20210619

Description Toralf Förster gentoo-dev 2021-07-21 08:49:59 UTC
Linking .o/battlestar/battlestar ...
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: .o/common/libcommon.a(ui.o): in function `mvwadd_wchw':
ui.c:(.text+0x2ab): undefined reference to `setcchar'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: ui.c:(.text+0x2be): undefined reference to `mvwadd_wch'
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -o .o/battlestar/battlestar .o/battlestar/battlestar.o .o/battlestar/cmd.o .o/battlestar/fly.o .o/battlestar/loc.o .o/battlestar/obj.o .o/battlestar/parse.o .o/common/libcommon.a -lncurses -ltinfo
collect2: error: ld returned 1 exit status
make: *** [atc/Module.mk:23: .o/atc/atc] Error 1

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_systemd-j3-20210714-221109

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-11.1.0 *
clang version 12.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/12/bin
/usr/lib/llvm/12
12.0.1
Python 3.9.6
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.53.0 *
The following VMs are available for generation-2:
*)	AdoptOpenJDK 8.292_p10 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.10.4
  [1]   php7.3
  [2]   php7.4 *
  [3]   php8.0
  HEAD of ::gentoo
commit 44221091dc9703a2f7fcfe11d006821a26ca3edf
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed Jul 21 02:16:52 2021 +0000

    2021-07-21 02:16:51 UTC

emerge -qpvO games-misc/bsd-games
[ebuild  N    ] games-misc/bsd-games-3.1-r1
Comment 1 Toralf Förster gentoo-dev 2021-07-21 08:50:00 UTC
Created attachment 725419 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-07-21 08:50:02 UTC
Created attachment 725422 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-07-21 08:50:03 UTC
Created attachment 725425 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-07-21 08:50:04 UTC
Created attachment 725428 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-07-21 08:50:05 UTC
Created attachment 725431 [details]
games-misc:bsd-games-3.1-r1:20210721-032750.log
Comment 6 Toralf Förster gentoo-dev 2021-07-21 08:50:07 UTC
Created attachment 725434 [details]
temp.tar.bz2
Comment 7 Ionen Wolkens gentoo-dev 2021-07-22 01:16:18 UTC
Hm, haven't looked in depth yet, but only happens with the new =ncurses-6.2_p20210619 snapshot.
Comment 8 Sven Hesse 2021-07-26 12:45:54 UTC
setcchar() seems to be a wide character function, so it's only available when ncurses was built --enable-widec, as the ncurses ebuild does for the ncurses*w targets.

Which means that linking the programs with -lncursesw instead of -lncurses works.

I'm attaching a patch which changes ncurses to ncursesw in the configure script. It's not really the clean way to do this (it should probably probe for ncursesw vs ncurses), but it works.
Comment 9 Sven Hesse 2021-07-26 12:46:44 UTC
Created attachment 727221 [details, diff]
Patch that fixes compilation with ncurses-6.2_p20210619
Comment 10 Ionen Wolkens gentoo-dev 2021-07-26 12:57:21 UTC
I did notice that it works with ncursesw already, but why did it work before and now doesn't?

There was no changes in the ncurses ebuild regarding regarding --enable-widec I can see.
Comment 11 Larry the Git Cow gentoo-dev 2021-07-26 13:22:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c306d7f093b372aca302cfaf7731e7d03eac0f2

commit 1c306d7f093b372aca302cfaf7731e7d03eac0f2
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2021-07-26 13:22:06 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-07-26 13:22:06 +0000

    games-misc/bsd-games: Fix ncurses[unicode(+)] breakage
    
    Closes: https://bugs.gentoo.org/803194
    Signed-off-by: David Seifert <soap@gentoo.org>

 .../{bsd-games-3.1-r1.ebuild => bsd-games-3.1-r2.ebuild}       | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)