Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 679942 - games-roguelike/angband-4.1.3 USE=ncurses with sys-libs/ncurses[tinfo] - ld: main-gcu.o: undefined reference to symbol 'keypad'
Summary: games-roguelike/angband-4.1.3 USE=ncurses with sys-libs/ncurses[tinfo] - ld: ...
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: PullRequest
Depends on:
Blocks: tinfo
  Show dependency tree
 
Reported: 2019-03-10 14:46 UTC by Scott McClung
Modified: 2019-04-05 05:13 UTC (History)
4 users (show)

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


Attachments
build.log (games-roguelike:angband-4.1.3:20190310-140513.log.gz,18.44 KB, application/gzip)
2019-03-10 14:46 UTC, Scott McClung
Details
emerge --info (file_679942.txt,10.06 KB, text/plain)
2019-03-10 14:47 UTC, Scott McClung
Details
angband-4.1.3.ebuild (file_679942.txt,2.30 KB, text/plain)
2019-03-11 14:27 UTC, Scott McClung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott McClung 2019-03-10 14:46:40 UTC
Created attachment 568408 [details]
build.log

games-roguelike/angband-4.1.3 fails to build with ncurses[tinfo]:

Successfully compiled main-sdl.c.
x86_64-pc-linux-gnu-gcc -o angband angband.o main.o main-gcu.o main-x11.o main-sdl.o -Wl,-O1 -Wl,--as-needed   -lncursesw  -lSM -lICE  -lX11  -lSDL -lpthread -lSDL_image -lSDL_ttf -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: main-gcu.o: undefined reference to symbol 'keypad'
/lib64/libtinfow.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Comment 1 Scott McClung 2019-03-10 14:47:36 UTC
Created attachment 568410 [details]
emerge --info
Comment 2 Jeroen Roovers gentoo-dev 2019-03-10 15:07:05 UTC
acinclude.m4 checks for ncursesw5-config but likely only ncursesw6-config is installed nowadays. It then starts assuming -lncurses is enough for the linker.

So either extend AM_PATH_NCURSESW so it also checks for ncursesw6-config, or it should switch to pkg-config:

* Add PKG_PROG_PKG_CONFIG near the top of configure.ac
* Add PKG_CHECK_MODULES(NCURSES, ncursesw) to AM_PATH_NCURSESW, replacing most of the code intended to find ncurses*-config.
Comment 3 Scott McClung 2019-03-11 14:27:08 UTC
Created attachment 568584 [details]
angband-4.1.3.ebuild
Comment 4 Scott McClung 2019-03-11 14:28:33 UTC
Thanks for pointing me in the right direction.  Making this work in my overlay was as simple as adding this to the ebuild:

--- angband-4.1.3.ebuild        2019-03-11 10:26:34.216361573 -0400
+++ angband-4.1.3-r1.ebuild     2019-03-11 10:17:54.353837909 -0400
@@ -43,6 +43,7 @@
        sed -i -e '/libpath/s#datarootdir#datadir#' configure.ac || die
        sed -i -e "/^.SILENT/d" mk/buildsys.mk.in || die
        sed -i -e '/^DOC =/s/=.*/=/' doc/Makefile || die
+       sed -i -e 's/ncursesw5-config/ncursesw6-config/g' acinclude.m4 || die
 
        if use !sound ; then
                sed -i -e 's/sounds//' lib/Makefile || die
Comment 5 Larry the Git Cow gentoo-dev 2019-04-03 09:51:19 UTC
The bug has been referenced in the following commit(s):

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

commit c69e9af7c4dc6cb7fbea73dfd356d315f0eb2470
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-04-03 09:46:55 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-04-03 09:46:55 +0000

    package.mask: Last rite games-roguelike/angband
    
    Bug: https://bugs.gentoo.org/679942
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 profiles/package.mask | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-04-03 09:57:07 UTC
(In reply to Larry the Git Cow from comment #5)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=c69e9af7c4dc6cb7fbea73dfd356d315f0eb2470
> 
> commit c69e9af7c4dc6cb7fbea73dfd356d315f0eb2470
> Author:     Michał Górny <mgorny@gentoo.org>
> AuthorDate: 2019-04-03 09:46:55 +0000
> Commit:     Michał Górny <mgorny@gentoo.org>
> CommitDate: 2019-04-03 09:46:55 +0000
> 
>     package.mask: Last rite games-roguelike/angband
>     
>     Bug: https://bugs.gentoo.org/679942
>     Signed-off-by: Michał Górny <mgorny@gentoo.org>
> 
>  profiles/package.mask | 7 +++++++
>  1 file changed, 7 insertions(+)

Reverted, as I've been corrected that Stefan bumped it.

Stefan, could you fix this bug as well?
Comment 7 Larry the Git Cow gentoo-dev 2019-04-05 05:13:26 UTC
The bug has been closed via the following commit(s):

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

commit f3045e7b24b7c267ad7152c2b964f20a59beb88d
Author:     Stefan Strogin <stefan.strogin@gmail.com>
AuthorDate: 2019-04-04 01:48:42 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-04-05 05:13:20 +0000

    games-roguelike/angband: fix build with sys-libs/ncurses[tinfo]
    
    Closes: https://bugs.gentoo.org/679942
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 games-roguelike/angband/angband-4.1.3.ebuild       |  2 ++
 .../angband/files/angband-4.1.3-tinfo.patch        | 29 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)