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

Bug 228265

Summary: app-admin/prelude-manager-0.9.9.1 fails to start with libtool 2.2.4, works with previous versions :(
Product: Gentoo Linux Reporter: Scott M. Likens <damm>
Component: Current packagesAssignee: Netmon Herd <netmon>
Status: RESOLVED FIXED    
Severity: normal CC: halcy0n, luckyluke, mike
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 212763    
Attachments: Build Log from configure to complete install.
Updated ebuild that works for me.
patch, stick in files/
updated ebuild

Description Scott M. Likens 2008-06-19 01:28:35 UTC
Prelude-Manager fails to start...

desolation ~ # gdb prelude-manager
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
(gdb) run
Starting program: /usr/bin/prelude-manager 
[Thread debugging using libthread_db enabled]
[New Thread 0x7f864f9936f0 (LWP 14149)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f864f9936f0 (LWP 14149)]
0x00007f864e0c6690 in strcmp () from /lib/libc.so.6

(gdb) bt
#0  0x00007f864e0c6690 in strcmp () from /lib/libc.so.6
#1  0x00007f864de4c672 in lt_dlpreload_open () from /usr/lib/libltdl.so.7
#2  0x00007f864f319530 in prelude_plugin_load_from_dir () from /usr/lib/libprelude.so.2
#3  0x000000000040a81a in report_plugins_init ()
#4  0x0000000000408695 in main ()


Reproducible: Always

Steps to Reproduce:
1. Update libtool
2. install libprelude & prelude-manager
3. start prelude-manager (or prelude-lml

Actual Results:  
desolation ~ # prelude-manager
Segmentation fault


Expected Results:  
desolation ~ # prelude-manager
desolation ~ #

I have rebuilt everything since updating to the new libtool, using revdep-rebuild.

Downgrading libtool fixes it, should I file a bug upstream?

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-libs/libprelude-0.9.15.2  USE="doc perl python swig" 0 kB 

Total: 1 package (1 reinstall), Size of downloads: 0 kB

emerge --info

Portage 2.1.5.5 (default/linux/amd64/2008.0, gcc-4.2.4, glibc-2.7-r2, 2.6.26-rc6 x86_64)
=================================================================
System uname: 2.6.26-rc6 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
Timestamp of tree: Tue, 17 Jun 2008 09:45:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.3-r4, 2.5.2-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18.50.0.7
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-mtune=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.llarian.net/"
LDFLAGS=""
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mmx mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rafał Mużyło 2008-06-19 10:13:58 UTC
First, try to rebuild dev-libs/libprelude, as it seems that this is the package that fails.
If that doesn't help, try to add eautoreconf at the end of src_unpack in  libprelude ebuild, and add --with-system-ltdl=/usr to configure options there, just to make sure.
Are there any warnings during compilation of libprelude ?
Comment 2 Scott M. Likens 2008-06-19 11:08:52 UTC
Include autotools also :)

No change,

(gdb) where
#0  0x00007f5891244690 in strcmp () from /lib/libc.so.6
#1  0x00007f5890db5672 in lt_dlpreload_open () from /usr/lib/libltdl.so.7
#2  0x00007f5892496470 in prelude_plugin_load_from_dir () from /usr/lib/libprelude.so.2
#3  0x000000000040a81a in report_plugins_init ()
#4  0x0000000000408695 in main ()

Done exactly as requested, fails at the same exact spot, no warnings from configure, nothing glaring from the build log.

However I will attach it, as you may find it of use.

Comment 3 Scott M. Likens 2008-06-19 11:17:02 UTC
Created attachment 157571 [details]
Build Log from configure to complete install.
Comment 4 Rafał Mużyło 2008-06-19 13:11:32 UTC
Does `ldd -r /usr/lib/libprelude.so.2` show anything interesting ?
It looks like something prelude_plugin_set_preloaded_symbols does
may be incorrect.
Comment 5 Rafał Mużyło 2008-06-19 13:19:03 UTC
There was once bug 212723, not quite similar, that had problems with
preloaded_symbols, maybe it's somehow related.
Comment 6 Rafał Mużyło 2008-06-19 15:32:14 UTC
OK, see if adding AC_LIB_LTDL after AC_PROG_LIBTOOL in configure.in
fixes that (it seems that this crash happens during lt_dlinit).
(this is in hope that LTDLOPEN string doesn't get set properly).
Comment 7 Scott M. Likens 2008-06-19 22:15:23 UTC
Starting from the last comment.

Created the patch, aclocal fails to run

>> Emerging (1 of 1) dev-libs/libprelude-0.9.15.2 to /
 * libprelude-0.9.15.2.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                                                 [ ok ]
 * checking ebuild checksums ;-) ...                                                                                          [ ok ]
 * checking auxfile checksums ;-) ...                                                                                         [ ok ]
 * checking miscfile checksums ;-) ...                                                                                        [ ok ]
 * checking libprelude-0.9.15.2.tar.gz ;-) ...                                                                                [ ok ]
>>> Unpacking source...
>>> Unpacking libprelude-0.9.15.2.tar.gz to /var/tmp/portage/dev-libs/libprelude-0.9.15.2/work
 * Applying libprelude-0.9.15.2.patch ...                                                                                     [ ok ]
 * Running eautoreconf in '/var/tmp/portage/dev-libs/libprelude-0.9.15.2/work/libprelude-0.9.15.2/libltdl' ...
 * Running aclocal ...                                                                                                        [ ok ]
 * Running libtoolize --copy --force --automake ...                                                                           [ ok ]
 * Running aclocal ...                                                                                                        [ ok ]
 * Running autoconf ...                                                                                                       [ ok ]
 * Running autoheader ...                                                                                                     [ ok ]
 * Running automake --add-missing --copy --foreign ...                                                                        [ ok ]
 * Running eautoreconf in '/var/tmp/portage/dev-libs/libprelude-0.9.15.2/work/libprelude-0.9.15.2' ...
 * Running aclocal -I m4 -I libmissing/m4 ...                                                                                 [ !! ]

 * Failed Running aclocal !
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/dev-libs/libprelude-0.9.15.2/temp/aclocal-20221.out

cat /var/tmp/portage/dev-libs/libprelude-0.9.15.2/temp/aclocal-20221.out
***** aclocal *****
***** aclocal -I m4 -I libmissing/m4

configure.in:297: error: `libltdl' is already registered with AC_CONFIG_SUBDIRS.
../../lib/autoconf/status.m4:919: AC_CONFIG_SUBDIRS is expanded from...
configure.in:297: the top level
autom4te-2.61: /usr/bin/m4 failed with exit status: 1
aclocal-1.10: autom4te failed with exit status: 1



Comment 8 Rafał Mużyło 2008-06-19 23:10:30 UTC
Damn, forgot about that, it's another incompatibility
between libtool 1.5 and 2, the latter adds libltdl to 
AC_CONFIG_SUBDIRS by itself.
As for now we just want it to build with libtool 2, simply remove the explicit
addition of that dir.
Comment 9 Rafał Mużyło 2008-06-19 23:15:03 UTC
I'd also like some input from somebody more experience with libtool/libltdl
than me cause I'm running out of ideas.
That note about lt_dlinit came simply from searching the sources of
libltdl.
Comment 10 Scott M. Likens 2008-06-19 23:26:45 UTC
I tried that, as it succesfully compiled this time,

the end result is the same segmentation fault.

I'm going to look at the function prelude_plugin_load_from_dir myself and see what I can figure out on this end.

Hopefully we can figure this out.
Comment 11 Scott M. Likens 2008-06-19 23:44:52 UTC
I have resorted to debugging symbols now...

So far,

#0  0x00007f91777ef690 in strcmp () from /lib/libc.so.6
#1  0x00007f9177360672 in lt_dlpreload_open () from /usr/lib/libltdl.so.7
#2  0x00007f9178a41470 in prelude_plugin_load_from_dir (head=0x0, dirname=0x40f700 "/usr/lib64/prelude-manager/reports", 
    symbol=0x40f9db "manager_plugin_init", ptr=0x6160e0, subscribe=0x40a963 <subscribe>, unsubscribe=0x40a911 <unsubscribe>)
    at prelude-plugin.c:525
#3  0x000000000040a81a in report_plugins_init ()
#4  0x0000000000408695 in main ()

I'm going to look at report_plugins_init now ...
Comment 12 Scott M. Likens 2008-06-20 00:01:31 UTC
Okay, so it looks like it's actually in prelude-manager and not libprelude or libpreludedb...

I'll continue digging

#0  0x00007f18e7a3e690 in strcmp () from /lib/libc.so.6
#1  0x00007f18e75af672 in lt_dlpreload_open () from /usr/lib/libltdl.so.7
#2  0x00007f18e8c90470 in prelude_plugin_load_from_dir (head=0x0, dirname=0x40fa60 "/usr/lib64/prelude-manager/reports", 
    symbol=0x40fd3b "manager_plugin_init", ptr=0x6160e0, subscribe=0x40ab25 <subscribe>, unsubscribe=0x40aacf <unsubscribe>)
    at prelude-plugin.c:525
#3  0x000000000040aa20 in report_plugins_init (dirname=0x40fa60 "/usr/lib64/prelude-manager/reports", data=0x6160e0)
    at report-plugins.c:406
#4  0x00000000004086dd in main (argc=1, argv=0x7ffff1325478) at prelude-manager.c:165


Comment 13 Scott M. Likens 2008-06-20 00:40:29 UTC
Okay, I got it working and fixed.

I will attach the working ebuild and the patch.


Comment 14 Scott M. Likens 2008-06-20 00:42:05 UTC
Created attachment 157691 [details]
Updated ebuild that works for me.
Comment 15 Scott M. Likens 2008-06-20 00:42:30 UTC
Created attachment 157693 [details]
patch, stick in files/
Comment 16 Mike Weissman 2008-07-11 22:09:59 UTC
Tried your updated ebuild on x86, should name it -r1, breaks build for me:



***** aclocal *****
***** aclocal -I m4 -I libmissing/m4

configure.in:15: error: AC_REQUIRE: circular dependency of AC_GNU_SOURCE
libmissing/m4/extensions.m4:19: AC_USE_SYSTEM_EXTENSIONS is expanded from...
../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from...
libmissing/m4/gnulib-comp.m4:21: gl_EARLY is expanded from...
configure.in:15: the top level
autom4te-2.62: /usr/bin/m4 failed with exit status: 1
aclocal-1.10: autom4te failed with exit status: 1

My Emerge --info:
Portage 2.2_rc1 (default/linux/x86/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.24-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.24-gentoo-r8-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.0
Timestamp of tree: Fri, 11 Jul 2008 11:35:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r13, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -march=core2  -pipe -fomit-frame-pointer -g -ggdb"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer -g -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect distlocks metadata-transfer nostrip parallel-fetch preserve-libs sandbox sfperms strict test unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/mike/myebuilds"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa apache2 avi bash-completion bzip2 cli compat cracklib crypt cups dbcpalsa dbus dri firefox firfox ftp gd gdbm gpm gstreamer gtk hal hddtemp iconv intel isdnlog java java5 java6 javamail jbdc jboss jpeg libwww logitech mailwrapper midi mp3 mpeg mudflap mysql ncurses nls nptl nptlonly ntp nvidia odbc opengl openmp pam pcre perl png postgres pppd python rar readline reflection session spl ssl svg tcpd unicode vim vim-completion vim-syntax vim-with-x x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 17 Scott M. Likens 2008-07-11 22:26:29 UTC
I suggest you to visit https://trac.prelude-ids.org/ticket/294#comment:12

We discussed a proper patch to libprelude instead of patching preludemanager.

Basically, you patch and reinstall libprelude, and then all you need to do is...

elibtoolize
eautoreconf

add that to prelude-lml and prelude-manager, upstream has patched this and will release a new tarball soon enough to resolve this issue for good.  However until then.

https://trac.prelude-ids.org/ticket/294

You can read over it, email me if you need any issues.
Comment 18 Mike Weissman 2008-07-14 20:48:58 UTC
Thanks Scott,
    Following that patch instructions on that link looked like it fixed the issue, but i still haven't tested it fully. Guess a version bump ticket is in order.

-Mike
Comment 19 Mike Weissman 2008-07-15 17:15:25 UTC
After testing a few times, the fix isn't working for me, after i rebuild libprelude with the patch from the trac; i am still getting the:

configure.in:15: error: AC_REQUIRE: circular dependency of AC_GNU_SOURCE

The patch only worked with prelude-manager-0.9.13. 

Comment 20 Scott M. Likens 2008-07-15 19:10:32 UTC
Created attachment 160471 [details]
updated ebuild
Comment 21 Scott M. Likens 2008-07-15 19:12:56 UTC
Updated the ebuild, you should only be required to elibtoolize and eautoconf after you patch libprelude.

However the patch to libprelude breaks on libtool 1.5.x as per https://trac.prelude-ids.org/ticket/294

Additionally I have only tested against 0.9.9.1, as that's the only version in portage.  So that's the only version I am concerned with.  
Comment 22 Mark Loeser (RETIRED) gentoo-dev 2009-04-10 20:07:18 UTC
Just put in a version bump which resolves this.