[Bug 785393] New: perl Term::ReadLine: undefined symbol: xmalloc
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c0 Summary: perl Term::ReadLine: undefined symbol: xmalloc Classification: openSUSE Product: openSUSE Factory Version: 12.3 Milestone 0 Platform: Other OS/Version: openSUSE 12.2 Status: NEW Severity: Critical Priority: P5 - None Component: Basesystem AssignedTo: ms@suse.com ReportedBy: suse-beta@cboltz.de QAContact: qa-bugs@suse.de CC: coolo@suse.com Found By: Beta-Customer Blocker: --- (using factory-tested, last snapshot from 2012-10-03) perl-TermReadLine-Gnu is broken in Factory: # perl -e 'use Term::ReadLine' perl: symbol lookup error: /usr/lib/perl5/vendor_perl/5.16.1/x86_64-linux-thread-multi/auto/Term/ReadLine/Gnu/Gnu.so: undefined symbol: xmalloc A side effect is that this breaks the AppArmor perl scripts :-( which won't make my AppArmor workshop at the openSUSE conference easier... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c1 Christian Boltz <suse-beta@cboltz.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@suse.com --- Comment #1 from Christian Boltz <suse-beta@cboltz.de> 2012-10-17 02:00:54 CEST --- home:cboltz:branches:devel:languages:perl/perl-TermReadLine-Gnu is updated to 1.20 (Factory and dlp have 1.16) with Term-ReadLine-Gnu-1.16.dif rebased and Term-ReadLine-Gnu-1.16-no_release.dif disabled (didn't apply as expected). Unfortunately the error is still there :-( The last comment on http://forums.gentoo.org/viewtopic-p-6844128.html indicates that this might be caused by a libreadline update - CC'ing Werner. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c2 --- Comment #2 from Dr. Werner Fink <werner@suse.com> 2012-10-17 06:57:47 UTC --- The functions xfree xmalloc xrealloc are internal and therefore _private_ libreadline functions. This you can see that the private header xmalloc.h is not part below /usr/include/ncurses _and_ that the bash also has its own xmalloc.c and xmalloc.h despite the fact that the libreadline is also part of the bash source tree. Exactly for this reason that is to avoid that xmalloc of the bash and the libreadline are mixed I do create a rl.map wused with -Wl,--version-script: { local: /* _rl*; */ xfree; xmalloc; xrealloc; }; whereas I'm also create a dyn.map to mark all rl_*stream functions to be used dynamically that is try to avoid to bind references of the symbols rl_instream and rl_outstream. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c3 --- Comment #3 from Stephan Kulow <coolo@suse.com> 2012-10-17 12:06:59 CEST --- hmm, so this was not upstream's idea? That makes it hard to report it to cpan ;( They use xmalloc on purpose: /* * Use xmalloc() and xfree() instead of New() and Safefree(), * because this block may be reallocated by the GNU Readline Library. */ if (str_tbl[id].accessed && *str_tbl[id].var) { /* * First time a variable is used by this routine, * it may be a static area. So it cannot be freed. */ xfree(*str_tbl[id].var); *str_tbl[id].var = NULL; } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c4 Marcus Schaefer <ms@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |werner@suse.com --- Comment #4 from Marcus Schaefer <ms@suse.com> 2012-10-17 10:30:24 UTC --- Hmm, but wouldn't that change in the domain of xfree/xmalloc and xrealloc affect all libreadline based programs which don't know that they are lr private and internal now ? Werner could you take a look into the perl-TermReadLine-Gnu code and provide a hint or change how to fix it according to the changes in Factory that would be great thanks -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c5 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|werner@suse.com | --- Comment #5 from Dr. Werner Fink <werner@suse.com> 2012-10-17 10:33:04 UTC --- Hmm ... not only I've detected that the xmalloc/xfree of bash and libreadline become mixed if libreadline is used as shared library, indeed the gentoo people seem to have detected it also. Maybe it's time to create something like rl_xmalloc(), rl_xrealloc(), and rl_xfree(). Nevertheless in the upstream Makefile.in the variable INSTALLED_HEADERS does clearly not install xmalloc.h, nor rlprivate.h, and also not rlshell.h. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c6 --- Comment #6 from Dr. Werner Fink <werner@suse.com> 2012-10-17 10:42:43 UTC --- (In reply to comment #4) xfree/xmalloc and xrealloc had never been in the official installed header of the readline library. Also the _rl* functions which uses e.g. the gdb heavily even with the comment in rlprivate.h: functions and variables global to the readline library, but not intended for use by applications. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c7 --- Comment #7 from Marcus Schaefer <ms@suse.com> 2012-10-17 11:08:28 UTC --- I'm building a test package, can someone tell me if there is a factory test machine where I can ssh into and test it ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c8 --- Comment #8 from Dr. Werner Fink <werner@suse.com> 2012-10-17 13:18:24 UTC --- Don't know if this help but in Base:System there is a bash with a libreadline providing weak symbols xfree/xmalloc/xrealloc ... hopefully this avoids the trouble with the name space overlap of the bash version of xfree/xmalloc/xrealloc for e.g. its loadable bash modules. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c9 Marcus Schaefer <ms@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |werner@suse.com --- Comment #9 from Marcus Schaefer <ms@suse.com> 2012-10-17 13:42:38 UTC --- Hmm, I installed: bash-4.2-186.25.x86_64.rpm from Base:System and I still have the problem. Not sure if this is the bash package you are referring too because I also see that the current state of the build of bash in Base:System is 'blocked' for Factory Other than that I tried the following patch for perl-TermReadLine-Gnu but it also did not help: --- Makefile.PL 2012-10-17 15:19:25.292958000 +0200 +++ Makefile.PL 2012-10-17 15:24:32.815468000 +0200 @@ -96,7 +96,7 @@ NAME => 'Term::ReadLine::Gnu', VERSION_FROM => 'Gnu.pm', LIBS => [ "$RLLIB $libs" ], - LDDLFLAGS => "$RLLIB $Config{lddlflags}", + LDDLFLAGS => "$RLLIB $Config{lddlflags} -Wl,--version-script=rl.map -Wl,--dynamic-list=dyn.map", dynamic_lib => { OTHERLDFLAGS => $lddflags }, DEFINE => $defs, ($Config{osname} eq 'os2' ? --- dyn.map 2012-10-17 15:28:48.147538000 +0200 +++ dyn.map 2012-10-17 15:25:52.777591000 +0200 @@ -0,0 +1,4 @@ +{ + *; + !rl_*stream; +}; --- rl.map 2012-10-17 15:28:43.600974000 +0200 +++ rl.map 2012-10-17 15:22:06.918029000 +0200 @@ -0,0 +1,7 @@ +{ + local: + /* _rl*; */ + xfree; + xmalloc; + xrealloc; +}; It's more or less a copy of what you do in bash most probably I did something wrong ? thanks -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c10 --- Comment #10 from Dr. Werner Fink <werner@suse.com> 2012-10-18 12:42:56 UTC --- Hmmm ... IMHO this does not work as the libreadline does not export xmalloc, xfree, nor xrealloc anymore. Adding the lines to a foreign tool will not help even I've used to suppress the export in the *libreadline*. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c11 --- Comment #11 from Marcus Schaefer <ms@suse.com> 2012-10-18 13:42:04 UTC --- ok got that but I then I have no clue how to fix this on the perl side of things -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c12 --- Comment #12 from Christian Boltz <suse-beta@cboltz.de> 2012-10-18 19:05:35 CEST --- Wow, you are fast! Thanks for your work on this, even if you don't have a solution yet. I also have some good news - I have a workaround :-) I rebuilt bash (which includes libreadline6) from openSUSE 12.2 in home:cboltz and downgraded to the following packages: libreadline6-6.2-51.10.1 readline-devel-6.2-51.10.1 readline-doc-6.2-51.10.1 bash-4.2-51.10.1 bash-doc-4.2-51.10.1 If someone needs working AppArmor utils on Factory, feel free to take those packages from home:cboltz. Note that I had to disable "make documentation" (to avoid fighting with the LaTeX changes), so some documentation is missing from my packages. Werner, this also means a change in the bash/libreadline package between 12.2 and current factury-tested (2012-10-03 snapshot) broke this. I hope this makes searching for the relevant change easier ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c13 --- Comment #13 from Stefan Seyfried <seife@novell.slipkontur.de> 2012-10-21 11:09:54 CEST --- I had seen this on factory, too but it fixed itself with the latest libreadline package => it looks like this is fixed already. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=785393 https://bugzilla.novell.com/show_bug.cgi?id=785393#c14 Marcus Schaefer <ms@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED InfoProvider|werner@suse.com | Resolution| |FIXED --- Comment #14 from Marcus Schaefer <ms@suse.com> 2012-10-22 07:44:28 UTC --- yep also don't see this with latest version of libreadline I update perl-TermReadLine-Gnu to 1.20 for factory though. Mainly for supporting lr 6.1 osc sr devel:languages:perl perl-TermReadLine-Gnu created request id 138966 thanks -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com