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

Bug 699968

Summary: =app-misc/abook-0.6.1-r2 stabilization request
Product: Gentoo Linux Reporter: Robert Gill <rtgill82>
Component: StabilizationAssignee: Cédric Krier <cedk>
Status: RESOLVED FIXED    
Severity: normal CC: alexanderyt, amigadave, bruce, bugzilla, dion, Klaus+gentoo, leho, mk106c-gentoo
Priority: Normal Keywords: STABLEREQ
Version: unspecifiedFlags: nattka: sanity-check+
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
=app-misc/abook-0.6.1-r2
Runtime testing required: ---
Bug Depends on: 679322    
Bug Blocks:    
Attachments:
Description Flags
Updated tinfo patch
none
Changed tinfo patch for abook.
none
abook-0.6.1-tinfo.patch + patch from Markus Osterhoff - fixes segfault of abook none

Description Robert Gill 2019-11-13 00:14:59 UTC
I recently rebuilt my system with gcc-9.2.0 and found that the stable ebuild of abook no longer builds against recent versions of ncurses.

app-misc/abook-0.6.1-r1 has been available for a while, builds successfully, and seems stable enough on amd64. Please stabilize.

Thank you.
Comment 1 Markus Osterhoff 2019-11-23 12:24:32 UTC
(In reply to Robert Gill from comment #0)
> app-misc/abook-0.6.1-r1 has been available for a while, builds successfully,
> and seems stable enough on amd64. Please stabilize.
slightly different here:
gcc-9.2.0-r2 with sys-libs/ncurses-6.1_p20181020 (USE cxx split-usr tinfo unicode).
abook-0.6.1 fails to build, -r1 does build. But it also segfaults upon startup.

gdb shows this:

Starting program: /usr/bin/abook 

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff777b999 in termattrs_sp () from /lib64/libncursesw.so.6
(gdb) bt
#0  0x00007ffff777b999 in termattrs_sp () from /lib64/libncursesw.so.6
#1  0x00007ffff7778d0f in _nc_setupscreen_sp () from /lib64/libncursesw.so.6
#2  0x00007ffff777449e in newterm_sp () from /lib64/libncursesw.so.6
#3  0x00007ffff7774928 in newterm () from /lib64/libncursesw.so.6
#4  0x00007ffff77708a3 in initscr () from /lib64/libncursesw.so.6
#5  0x0000555555567375 in ui_init_curses ()
#6  0x00005555555673de in init_ui ()
#7  0x000055555555933c in main ()

ldd shows this:
stampy ~ $ ldd /usr/bin/abook 
	linux-vdso.so.1 (0x00007fffbcb8c000)
	libvformat.so.0 => /usr/lib64/libvformat.so.0 (0x00007f0c11e53000)
	libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f0c11c19000)
	libncursesw.so.6 => /lib64/libncursesw.so.6 (0x00007f0c119e0000)
	libreadline.so.7 => /lib64/libreadline.so.7 (0x00007f0c11792000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f0c113c5000)
	libtinfow.so.6 => /lib64/libtinfow.so.6 (0x00007f0c1118b000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0c12279000)


it starts with
export LD_PRELOAD="/lib64/libtinfow.so.6"
(note the leading w for tinfow here, while it is tinfo in the ldd output).

From abook's git repo, I got the same, but could fix it with the following:


diff --git a/configure.ac b/configure.ac
index bcb0a58..624f31a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,7 @@ AC_ARG_WITH(curses, [  --with-curses=DIR       Where ncurses is installed ],
        fi])
 
 AC_CHECK_LIB(ncursesw, initscr,
-       [LIBS="$LIBS -lncursesw"
+       [LIBS="$LIBS -ltinfow -lncursesw"
        if test x$abook_cv_curses = x/usr -a -d /usr/include/ncursesw; then
                CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
        fi
Comment 2 Robert Gill 2019-11-23 21:51:12 UTC
Yeah, I guess I didn't really test it. Although I updated the current patch in such a way that seems to fix it. I'm attaching it.
Comment 3 Robert Gill 2019-11-23 21:52:17 UTC
Created attachment 597326 [details, diff]
Updated tinfo patch
Comment 4 Dion Moult 2020-01-01 03:13:25 UTC
I can confirm that I experience the same as Markus Osterhoff except with GCC 8.3.

Markus' patch, in particular this:

-       [LIBS="$LIBS -lncursesw"
+       [LIBS="$LIBS -ltinfow -lncursesw"

... fixes the segfault upon startup for -r1 for me.

It would be great to get this applied to the tree :)
Comment 5 Georg Hopp 2020-02-05 10:59:29 UTC
Created attachment 611768 [details, diff]
Changed tinfo patch for abook.

Modified version of the current tinfo patch which make abook work again for me.
Comment 6 Georg Hopp 2020-02-05 11:00:40 UTC
I had the same issue and after I read this:

https://github.com/cgdb/cgdb/pull/220/files

I had a look in the tinfo patch and changed it to ensure to link against tinfow in the ncursesw part.
That fixed the issue for me.

Sorry, I have not the time to test more accuratly.
Comment 7 Michael Volland 2020-04-13 07:55:24 UTC
I made a patch that includes the changes from Marcus patch and the patch 
abook-0.6.1-tinfo.patch that is already in portage now. Just replace the new one
with the old one.

Thank You.
Comment 8 Michael Volland 2020-04-13 08:09:00 UTC
Created attachment 632586 [details, diff]
abook-0.6.1-tinfo.patch + patch from Markus Osterhoff - fixes segfault of abook

I made a patch that includes the changes from Markus Osterhoff's  patch and the patch abook-0.6.1-tinfo.patch, that is already in portage now. Just replace the existing patch abook-0.6.1-tinfo.patch with this one.

(In my local overlay I used the same name for the new patch, but I don't know
whether that would be OK for distribution?)

Thank You.
Comment 9 Larry the Git Cow gentoo-dev 2020-05-24 17:24:05 UTC
The bug has been referenced in the following commit(s):

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

commit 4005f7db3a9be036144792e24e1ab8446b52f3a2
Author:     Cédric Krier <cedk@gentoo.org>
AuthorDate: 2020-05-24 17:23:00 +0000
Commit:     Cédric Krier <cedk@gentoo.org>
CommitDate: 2020-05-24 17:23:54 +0000

    app-misc/abook: Fix link to tinfo and vformat
    
    Closes: https://bugs.gentoo.org/679322
    Bug: https://bugs.gentoo.org/699968
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Cédric Krier <cedk@gentoo.org>

 .../abook/{abook-0.6.1-r1.ebuild => abook-0.6.1-r2.ebuild}    |  3 ++-
 app-misc/abook/files/abook-0.6.1-tinfo.patch                  |  4 ++--
 app-misc/abook/files/abook-0.6.1-vformat.patch                | 11 +++++++++++
 app-misc/abook/metadata.xml                                   |  4 +++-
 4 files changed, 18 insertions(+), 4 deletions(-)
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-25 09:40:10 UTC
ppc/ppc64 stable
Comment 11 Agostino Sarubbo gentoo-dev 2020-05-26 19:31:32 UTC
amd64 stable
Comment 12 Agostino Sarubbo gentoo-dev 2020-05-28 15:43:40 UTC
sparc stable
Comment 13 Agostino Sarubbo gentoo-dev 2020-06-04 06:39:53 UTC
x86 stable. Closing.