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
Created attachment 583642 [details] emerge-info.txt
Created attachment 583644 [details] app-shells:hstr-2.0:20190719-081624.log
Created attachment 583646 [details] emerge-history.txt
Created attachment 583648 [details] environment
Created attachment 583650 [details] etc.portage.tbz2
Created attachment 583652 [details] logs.tbz2
Created attachment 583654 [details] temp.tbz2
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.
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)
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
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(+)