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

Bug 654146

Summary: x11-terms/kterm with sys-libs/ncurses[tinfo] - main.o: In function `spawn': main.c:(.text+0x12f1): undefined reference to `tgetent'
Product: Gentoo Linux Reporter: Sławomir Nizio <slawomir.nizio>
Component: Current packagesAssignee: CJK Team <cjk>
Status: RESOLVED FIXED    
Severity: normal CC: esigra
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 457530    

Description Sławomir Nizio 2018-04-26 19:30:02 UTC
x11-terms/kterm-6.2.0-r6

rm -f kterm
x86_64-pc-linux-gnu-gcc -o kterm -O2 -march=x86-64 -pipe     -Wl,-O1 -Wl,--as-needed -lncurses -ltinfo -L/usr/lib64   button.o charproc.o cursor.o data.o input.o            main.o menu.o misc.o screen.o scrollbar.o tabs.o                   util.o VTPrsTbl.o kanji_map.o                    gset.o convert.o xim.o kinput2.o convlib.o  -lXaw -lXmu -lXt -lSM -lICE -lXpm  -lXext -lX11     -lXpm -lncurses -lutil
main.o: In function `spawn':
main.c:(.text+0x12f1): undefined reference to `tgetent'
main.c:(.text+0x135a): undefined reference to `tgetent'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1112: kterm] Error 1
Comment 1 Sławomir Nizio 2018-04-26 20:01:04 UTC
fixes it:

--- a/x11-terms/kterm/kterm-6.2.0-r6.ebuild
+++ b/x11-terms/kterm/kterm-6.2.0-r6.ebuild
@@ -50,7 +50,7 @@ src_compile(){
        emake \
                CC="$(tc-getCC)" \
                CDEBUGFLAGS="${CFLAGS}" \
-               LOCAL_LDFLAGS="${LDFLAGS} $("$(tc-getPKG_CONFIG)" --libs ncurses)" \
+               TERMCAPLIB="${LDFLAGS} $("$(tc-getPKG_CONFIG)" --libs ncurses)" \
                XAPPLOADDIR="${EPREFIX}/usr/share/X11/app-defaults"
 }
Comment 2 Sławomir Nizio 2018-04-26 20:04:16 UTC
more like this:


--- a/x11-terms/kterm/kterm-6.2.0-r6.ebuild
+++ b/x11-terms/kterm/kterm-6.2.0-r6.ebuild
@@ -50,7 +50,8 @@ src_compile(){
        emake \
                CC="$(tc-getCC)" \
                CDEBUGFLAGS="${CFLAGS}" \
-               TERMCAPLIB="${LDFLAGS} $("$(tc-getPKG_CONFIG)" --libs ncurses)" \
+               LOCAL_LDFLAGS="${LDFLAGS}" \
+               TERMCAPLIB="$("$(tc-getPKG_CONFIG)" --libs ncurses)" \
                XAPPLOADDIR="${EPREFIX}/usr/share/X11/app-defaults"
 }



gives:

make -j8 -s CC=x86_64-pc-linux-gnu-gcc 'CDEBUGFLAGS=-O2 -march=x86-64 -pipe' 'LOCAL_LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'TERMCAPLIB=-lncurses -ltinfo' XAPPLOADDIR=/usr/share/X11/app-defaults
Comment 3 Larry the Git Cow gentoo-dev 2018-05-27 01:50:42 UTC
The bug has been closed via the following commit(s):

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

commit 06bda2e208c8a29e60c48ec6e1e8427a17771f71
Author:     Sławomir Nizio <slawomir.nizio@sabayon.org>
AuthorDate: 2018-04-26 20:01:04 +0000
Commit:     Akinori Hattori <hattya@gentoo.org>
CommitDate: 2018-05-27 01:49:10 +0000

    x11-terms/kterm: fix build with sys-libs/ncurses[tinfo]
    
    Closes: https://bugs.gentoo.org/654146
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 x11-terms/kterm/kterm-6.2.0-r6.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 4 Sławomir Nizio 2018-05-27 09:59:12 UTC
Thanks!