Created attachment 595926 [details] output of emerge --info GDB debug: $ gdb -q mcabber Reading symbols from mcabber... Reading symbols from /usr/lib/debug//usr/bin/mcabber.debug... (gdb) run Starting program: /usr/bin/mcabber [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". MCabber 1.1.0 -- Email: mcabber [at] lilotux [dot] net [02:56:07] MCabber 1.1.0 -- Email: mcabber [at] lilotux [dot] net [02:56:07] Reading /home/plastyc/.mcabber/mcabberrc [02:56:07] Server: *** [02:56:07] User JID: ***@*** Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7db7280 in _nc_setupscreen_sp () from /lib64/libncursesw.so.6 (gdb) bt #0 0x00007ffff7db7280 in _nc_setupscreen_sp () at /lib64/libncursesw.so.6 #1 0x00007ffff7db2bdc in newterm_sp () at /lib64/libncursesw.so.6 #2 0x00007ffff7db3059 in newterm () at /lib64/libncursesw.so.6 #3 0x00007ffff7daeab4 in initscr () at /lib64/libncursesw.so.6 #4 0x0000555555576949 in scr_init_curses () at screen.c:808 #5 0x000055555556398f in main (argc=<optimized out>, argv=<optimized out>) at main.c:494 Observation: mcabber worked correctly before upgrade of gcc to sys-devel/gcc-9.2.0-r2 (from sys-devel/gcc-8.3.0-r1) and recompilation of sys-libs/ncurses-6.1_p20181020 with gcc-9.2 Info (terminal rxvt-unicode): $gcc-config -l [1] x86_64-pc-linux-gnu-9.2.0 * $echo $TERM rxvt
Created attachment 595928 [details] output of emerge --info net-im/mcabber
Created attachment 595930 [details] output of emerge --info sys-libs/ncurses
Created attachment 595932 [details] output of emerge --info sys-devel/gcc
I think the bug here is that mcabber mixes wide and non-wide libraries in the same binary: $ lddtree /usr/bin/mcabber | egrep 'ncurses|tinfo' libtinfow.so.6 => /lib64/libtinfow.so.6 libncursesw.so.6 => /lib64/libncursesw.so.6 libtinfo.so.6 => /lib64/libtinfo.so.6 It should link consistently with libtinfow.so.6. Similar bug in gdb: https://bugs.gentoo.org/649704
Looking at mcabber's configure.ac it will have to learn to find tinfow variant: AC_CHECK_FUNC(initscr,, [ cf_ncurses="ncurses" for lib in ncursesw ncurses do AC_CHECK_LIB($lib, waddnwstr, [cf_ncurses="$lib"; cf_ncurses_unicode="yes"; break]) done AC_CHECK_LIB($cf_ncurses, initscr, [LIBS="$LIBS -l$cf_ncurses" AC_CHECK_LIB(tinfo, tgetent, [LIBS="$LIBS -ltinfo"]) <<<--- if test "$cf_ncurses" = ncursesw; then AC_CHECK_HEADERS([ncursesw/ncurses.h ncursesw/panel.h],, [AC_CHECK_HEADERS([ncurses.h panel.h],, AC_MSG_ERROR([Missing header file]))]) else AC_CHECK_HEADERS([ncurses/ncurses.h ncurses/panel.h],, [AC_CHECK_HEADERS([ncurses.h panel.h],, AC_MSG_ERROR([Missing header file]))]) fi ], [CF_CURSES_LIBS]) ])
Created attachment 595948 [details, diff] mcabber-1.1.0-tinfow.patch Try the following patch. Should be enough to drop it to /etc/portage/patches/net-im/mcabber/ and rebuild mcabber.
(In reply to Sergei Trofimovich from comment #6) > Created attachment 595948 [details, diff] [details, diff] > mcabber-1.1.0-tinfow.patch > > Try the following patch. Should be enough to drop it to > /etc/portage/patches/net-im/mcabber/ and rebuild mcabber. I've tried to apply the patch, but emerge failed on missing aclocal-1.14 (build log attached): >>> Source configured. >>> Compiling source in /var/tmp/portage/net-im/mcabber-1.1.0-r1/work/mcabber-1.1.0 ... make -j5 CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /var/tmp/portage/net-im/mcabber-1.1.0-r1/work/mcabber-1.1.0/missing aclocal-1.14 -I macros /var/tmp/portage/net-im/mcabber-1.1.0-r1/work/mcabber-1.1.0/missing: line 81: aclocal-1.14: command not found WARNING: 'aclocal-1.14' is missing on your system. You should only need it if you modified 'acinclude.m4' or 'configure.ac' or m4 files included by 'configure.ac'. The 'aclocal' program is part of the GNU Automake package: <http://www.gnu.org/software/automake> It also requires GNU Autoconf, GNU m4 and Perl in order to run: <http://www.gnu.org/software/autoconf> <http://www.gnu.org/software/m4/> <http://www.perl.org/> make: *** [Makefile:413: aclocal.m4] Error 127 * ERROR: net-im/mcabber-1.1.0-r1::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=net-im/mcabber-1.1.0-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-im/mcabber-1.1.0-r1::gentoo'`. * The complete build log is located at '/var/tmp/portage/net-im/mcabber-1.1.0-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-im/mcabber-1.1.0-r1/temp/environment'. * Working directory: '/var/tmp/portage/net-im/mcabber-1.1.0-r1/work/mcabber-1.1.0' * S: '/var/tmp/portage/net-im/mcabber-1.1.0-r1/work/mcabber-1.1.0' It seems there is a hardcoded version of automake in configure (line 2451): am__api_version='1.14' I do have only versions 1.13.4-r2 and 1.16.1-r1. So, I've installed also =sys-devel/automake-1.14.1-r2 and the emerge finished successfully then. Mcabber no longer segfaults. Also linking looks OK now: lddtree /usr/bin/mcabber | egrep 'ncurses|tinfo' libncursesw.so.6 => /lib64/libncursesw.so.6 libtinfow.so.6 => /lib64/libtinfow.so.6 Thank you! :) I am wondering why emerge of mcabber without patching worked and with patching it failed as I don't see any connection of the patch with automake version. Also, it seems this bug doesn't have anything in common with gcc version.
Created attachment 596014 [details] failed mcabber emerge build log
Thanks plastyc, slyfox! Raised upstream bug https://bitbucket.org/McKael/mcabber-crew/issues/166/runtime-crash-caused-by-inconsistence-in .
Patch applied upstream. Figuring out upstream's plans on releasing soon.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=583e7f0f0b3dad688c4ba2bdce64ecdf0da417dd commit 583e7f0f0b3dad688c4ba2bdce64ecdf0da417dd Author: Andrey Utkin <andrey_utkin@gentoo.org> AuthorDate: 2019-12-31 00:30:10 +0000 Commit: Andrey Utkin <andrey_utkin@gentoo.org> CommitDate: 2019-12-31 00:47:57 +0000 net-im/mcabber: patch bug 699972 Bug: https://bugs.gentoo.org/699972 Package-Manager: Portage-2.3.66, Repoman-2.3.16 Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org> net-im/mcabber/Manifest | 1 + net-im/mcabber/mcabber-1.1.0-r2.ebuild | 8 ++++++++ 2 files changed, 9 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1332a8d46f2b52296e9bcb79242bdd6c3d8b7dc1 commit 1332a8d46f2b52296e9bcb79242bdd6c3d8b7dc1 Author: Andrey Utkin <andrey_utkin@gentoo.org> AuthorDate: 2019-12-30 22:44:40 +0000 Commit: Andrey Utkin <andrey_utkin@gentoo.org> CommitDate: 2019-12-31 00:47:53 +0000 net-im/mcabber: add new revision 1.1.0-r2 Cloned from 9999. To address a bug in a subsequent commit. Bug: https://bugs.gentoo.org/699972 Package-Manager: Portage-2.3.66, Repoman-2.3.16 Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org> net-im/mcabber/mcabber-1.1.0-r2.ebuild | 99 ++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+)