Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 690232 - app-shells/hstr-2.0 : /.../ld: hstr_curses.o: undefined reference to symbol keypad
Summary: app-shells/hstr-2.0 : /.../ld: hstr_curses.o: undefined reference to symbol k...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrice Clement
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: tinfo
  Show dependency tree
 
Reported: 2019-07-19 16:02 UTC by Toralf Förster
Modified: 2019-11-28 22:01 UTC (History)
6 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,16.25 KB, text/plain)
2019-07-19 16:02 UTC, Toralf Förster
Details
app-shells:hstr-2.0:20190719-081624.log (app-shells:hstr-2.0:20190719-081624.log,15.26 KB, text/plain)
2019-07-19 16:02 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,243.32 KB, text/plain)
2019-07-19 16:02 UTC, Toralf Förster
Details
environment (environment,57.56 KB, text/plain)
2019-07-19 16:02 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,16.41 KB, application/x-bzip)
2019-07-19 16:02 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,6.28 KB, application/x-bzip)
2019-07-19 16:02 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,18.15 KB, application/x-bzip)
2019-07-19 16:02 UTC, Toralf Förster
Details
Use pkg-config for ncurses (pkg-config.patch,2.56 KB, patch)
2019-07-19 18:05 UTC, Dan Goodliffe
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 2019-07-19 16:02:15 UTC
x86_64-pc-linux-gnu-gcc --pedantic -Wall -std=c99  -O2 -pipe -march=native  -Wl,-O1 -Wl,--as-needed -o hstr hashset.o hstr_curses.o hstr_history.o hstr_utils.o hstr_favorites.o hstr_blacklist.o hstr_regexp.o radixsort.o hstr.o main.o  -lreadline -lm -lncursesw 
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: hstr_curses.o: undefined reference to symbol 'keypad'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libtinfo.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:386: hstr] Error 1

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_systemd-libressl-20190714-193026

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.1.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.36.0 *



emerge -qpvO app-shells/hstr
[ebuild  N    ] app-shells/hstr-2.0
Comment 1 Toralf Förster gentoo-dev 2019-07-19 16:02:18 UTC
Created attachment 583642 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-07-19 16:02:20 UTC
Created attachment 583644 [details]
app-shells:hstr-2.0:20190719-081624.log
Comment 3 Toralf Förster gentoo-dev 2019-07-19 16:02:23 UTC
Created attachment 583646 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2019-07-19 16:02:26 UTC
Created attachment 583648 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2019-07-19 16:02:29 UTC
Created attachment 583650 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-07-19 16:02:31 UTC
Created attachment 583652 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2019-07-19 16:02:34 UTC
Created attachment 583654 [details]
temp.tbz2
Comment 8 Dan Goodliffe 2019-07-19 17:30:01 UTC
Looks like configure isn't picking up the libs from pkg-config for some reason:

Makefile.in
NCURSESW_LIBS = @NCURSESW_LIBS@

Makefile
NCURSESW_LIBS = 

$ pkg-config --libs ncursesw
-lncursesw -ltinfow

My configure skills probably aren't good enough to dig much deeper.
Comment 9 Dan Goodliffe 2019-07-19 17:57:59 UTC
OK, I dug anyway... learnt some configure foo on the way...

I *think* the problem is two parts:
a) configure.ac 50-82 only uses pkg-config for ncurses if killwchar isn't in either libncursesw or libncurses (which it is)
b) src/Makefile.am 40 uses NCURSES_LIBS, but configure.ac sets up NCURSESW_LIBS, so even when configure does use pkg-config, the linking problems still exist (they actually get worse)
Comment 10 Dan Goodliffe 2019-07-19 18:05:51 UTC
Created attachment 583662 [details, diff]
Use pkg-config for ncurses

Attached patch produces a successful build and a working hstr.
It also causes configure to produce lots of warnings along the lines of:

checking assert.h presence... no
configure: WARNING: assert.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: assert.h: proceeding with the compiler's result
checking for assert.h... yes
Comment 11 Larry the Git Cow gentoo-dev 2019-11-28 22:01:07 UTC
The bug has been closed via the following commit(s):

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

commit 50942d513fa2c878cd975a822cc3ca70b55e8b56
Author:     Patrice Clement <monsieurp@gentoo.org>
AuthorDate: 2019-11-28 22:00:48 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2019-11-28 22:01:02 +0000

    app-shells/hstr: fix ncurses configure.
    
    Patch courtesy of Dan Goodliffe <gentoo@randomdan.homeip.net>.
    
    Closes: https://bugs.gentoo.org/690232
    Package-Manager: Portage-2.3.79, Repoman-2.3.16
    Signed-off-by: Patrice Clement <monsieurp@gentoo.org>

 .../files/hstr-2.0-fix-ncurses-configure.patch     | 81 ++++++++++++++++++++++
 app-shells/hstr/hstr-2.0.ebuild                    |  2 +
 2 files changed, 83 insertions(+)