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

Bug 606478

Summary: app-misc/abook-0.6.1: fails to build with ncurses[tinfo]
Product: Gentoo Linux Reporter: William Pettersson <william>
Component: Current packagesAssignee: Net-Mail Packages <net-mail+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: esigra, jer, jstein, slawomir.nizio, svantoviit
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 457530    
Attachments: build.log
patch to abook to fix compile error
pkg-config hack

Description William Pettersson 2017-01-19 03:15:00 UTC
Created attachment 460582 [details]
build.log

This is another incident of a common issue, where ncurses splits its library into libncurses and libtinfo (or libncursesw and libtinfow) when the tinfo use flag is given. The fix is to add -ltinfo (or -ltinfow) to the compile line.

x86_64-pc-linux-gnu-gcc  -O2 -march=native -pipe -std=gnu89 -lvformat -Wl,-O1 -Wl,--as-needed -o abook abook.o abook_rl.o database.o edit.o filter.o getname.o getopt.o getopt1.o gettext.o ld
if.o list.o mbswidth.o misc.o options.o ui.o views.o xmalloc.o vcard.o  -lncursesw -lreadline
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: ui.o: undefined reference to symbol 'curs_set'
/lib64/libtinfow.so.6: error adding symbols: DSO missing from command line
Comment 1 William Pettersson 2017-01-19 03:16:12 UTC
Created attachment 460586 [details, diff]
patch to abook to fix compile error

Attached a patch to fix the issue. The patch should only be applied if ncurses is built with with the tinfo USE flag enabled.
Comment 2 Yarda 2017-01-28 10:01:55 UTC
Created attachment 461700 [details, diff]
pkg-config hack

I think it should use pkg-config. Attached is a hack that adds it to the ebuild, but better is probably to incorporate it into the package - i.e. add pkg-config to the first patch.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2018-03-02 10:14:57 UTC
Fixed in -r1.