Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 803194 - games-misc/bsd-games-3.1-r1 - ui.c:(.text+<snip>): undefined reference to setcchar
Summary: games-misc/bsd-games-3.1-r1 - ui.c:(.text+<snip>): undefined reference to set...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-21 08:49 UTC by Toralf Förster
Modified: 2021-07-26 13:22 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.01 KB, text/plain)
2021-07-21 08:50 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,358.27 KB, text/plain)
2021-07-21 08:50 UTC, Toralf Förster
Details
environment (environment,57.56 KB, text/plain)
2021-07-21 08:50 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,28.88 KB, application/x-bzip)
2021-07-21 08:50 UTC, Toralf Förster
Details
games-misc:bsd-games-3.1-r1:20210721-032750.log (games-misc:bsd-games-3.1-r1:20210721-032750.log,21.59 KB, text/plain)
2021-07-21 08:50 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,263.97 KB, application/x-bzip)
2021-07-21 08:50 UTC, Toralf Förster
Details
Patch that fixes compilation with ncurses-6.2_p20210619 (bsd-games-3.1-ncursesw.patch,389 bytes, patch)
2021-07-26 12:46 UTC, Sven Hesse
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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(-)