Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 440648 - dev-tcltk/tclreadline: tclsh complains with /usr/lib/libtclreadline.so: undefined symbol: _rl_executing_macro
Summary: dev-tcltk/tclreadline: tclsh complains with /usr/lib/libtclreadline.so: undef...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-31 19:00 UTC by Dean Matzkov
Modified: 2013-11-22 11:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Matzkov 2012-10-31 19:00:00 UTC
When trying to use tclreadline with tclsh, it complains about an undefined symbol.

For example:

----
$ tclsh
 % package require tclreadline
  couldn't load file "/usr/lib/libtclreadline.so": /usr/lib/libtclreadline.so: undefined symbol: _rl_executing_macro
$
----

The output of `emerge --info' will follow.
Comment 1 Dean Matzkov 2012-10-31 19:01:32 UTC
emerge --info:


Portage 2.1.11.9 (hardened/linux/x86, gcc-4.5.4, glibc-2.15-r3, 3.5.3-hardened2 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.5.3-hardened2-i686-Intel-R-_Pentium-R-_D_CPU_2.80GHz-with-gentoo-2.1
Timestamp of tree: Tue, 30 Oct 2012 17:45:01 +0000
ccache version 3.1.7 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo sunrise
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-march=i686 -O2 -pipe"
FEATURES="assume-digests binpkg-logs candy ccache compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-march=i686 -O2 -pipe"
GENTOO_MIRRORS="ftp://mirrors.tera-byte.com/pub/gentoo http://gentoo.mirrors.tera-byte.com/ ftp://gentoo.arcticnetwork.ca/pub/gentoo/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="true"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="aac acl bash-completion berkdb bzip2 cairo cgi cjk cleartype cli colordiff corefonts cracklib crypt curl custom-optimization cxx dnd dri exif fastcgi ffmpeg firefox flac fontconfig fuse gallium gdbm git gtkstyle hardened iconv javascript jpeg lame lcdfilter libmpd logrotate matroska mbox mmx modules mpd mplayer mudflap musepack ncurses nptl ntfs objc objc-gc offensive openmp openssl optimized-qmake pam pax_kernel pcre pic plugins-symlink png pppd radeon readline secure-delete session shm sqlite3 sse sse2 ssl startup-notification syslog taglib tcpd theora threads thunar toolame truetype type1 udev unicode upnp urandom v4l v4l2 vaapi vim-pager vim-syntax winetriks wma x264 x86 xattr xcomposite xinetd xrandr xvid zlib zsh-completion" 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX_MODULES_HTTP="mogilefs access status flv browser autoindex rewrite proxy xslt dav perl auth_basic gzip fastcgi uwsgi scgi mogilefs" NGINX_MODULES_MAIL="imap pop3 smtp" PHP_TARGETS="php-5.4" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19 jruby" USERLAND="GNU" VIDEO_CARDS="radeon r600 v4l vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-lang/tcl-8.5.10-r1 was built with the following:
USE="threads -debug"


dev-tcltk/tclreadline-2.1.0-r1 was built with the following:
USE=""


sys-libs/readline-6.2_p1-r1 was built with the following:
USE="static-libs"
LDFLAGS="-Wl,--as-needed -L."
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2012-11-04 19:52:10 UTC
+*tclreadline-2.1.0-r2 (04 Nov 2012)
+
+  04 Nov 2012; Justin Lecher <jlec@gentoo.org> tclreadline-2.1.0.ebuild,
+  tclreadline-2.1.0-r1.ebuild, +tclreadline-2.1.0-r2.ebuild,
+  +files/tclreadline-2.1.0-gold.patch:
+  Add fix for underlinking, #440648; pass all paths to configure for prefix
+  stability
+
Comment 3 Quentin Minster 2013-11-16 21:01:11 UTC
Just been bitten by this bug, still happening with tclreadline-2.1.0-r2. Can someone confirm and reopen?
I have a fix in the works, but it's being withheld until I fix further (non-related) problems with tclreadline.



emerge --info:

Portage 2.2.7 (default/linux/amd64/13.0/desktop, gcc-4.8.2, glibc-2.15-r3, 3.10.17-gentoo x86_64)
=================================================================
System uname: Linux-3.10.17-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.2
KiB Mem:     8063200 total,   4049092 free
KiB Swap:    6246396 total,   6236708 free
Timestamp of tree: Sat, 16 Nov 2013 16:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r3, 3.2.5-r3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo science sunrise steam-overlay x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx-i -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core-avx-i -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-march=core-avx-i -O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=core-avx-i -O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://mirror.ovh.net/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/ http://gentoo.modulix.net/gentoo/ http://mirrors.linuxant.fr/distfiles.gentoo.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /var/lib/layman/sunrise /var/lib/layman/steam /usr/local/portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb blas branding bzip2 cairo caps cdda cdr cli consolekit cracklib crypt cscope cups cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif git gmp gnutls gpm graphviz gtk iconv icu idn imagemagick ipv6 jit jpeg kde lame lapack lcms libffi libnotify lm_sensors lzma mad maildir mmx mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl ogg openal opengl openmp pam pango pcre pdf php png policykit posix ppds pulseaudio qt3support qt4 readline sdl semantic-desktop session smp spell sse sse2 sse3 ssl startup-notification subversion svg tcpd threads tiff truetype udev udisks unicode upower usb v4l vim-syntax vorbis wxwidgets x264 xattr xcb xinerama xml xmp xv xvid zeroconf zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev joystick wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver pdfimport presenter-console presenter-minimizer" LINGUAS="en en_US en_GB fr fr_FR" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="x86_64 alpha arm i386 mips mips64 sparc sparc64" QEMU_USER_TARGETS="alpha arm i386 mips mips64 sparc sparc64 x86_64" RUBY_TARGETS="ruby20 ruby19 ruby18" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 4 Quentin Minster 2013-11-22 11:28:05 UTC
Fixed it: https://github.com/laomaiweng/laomaiweng-overlay/tree/master/dev-tcltk/tclreadline

The changes fix several bugs (readline detection, symbol resolution, runtime crashes, memory leaks, misuse of readline status code), not strictly the current one, and render tclreadline usable (at least on my amd64 machine). Feel free to help yourself to the provided patches.
I'll try pushing those fixes upstream, but I'm not sure it's still responsive.


Summary of changes
------------------

Commit 08590b11e6 fixes the unresolved _rl_executing_macro bug:
* adds "-lreadline" to tclreadline-2.1.0-gold.patch
* create tclreadline-2.1.0-rl-executing-macro.patch
** fix readline rl_callbach_read_char() resolution and version detection in configure.in (now configure.ac)
** fix broken detection of rl_executing_macro in configure.in: _rl_executing_macro is a private symbol dating from readline 2.* and has been replaced with the public symbol rl_executing_macro in readline 4.*
** fix tclreadline.c wrt above #define changes in configure.in

Commit f00d1d0657 fixes basic command issue:
* create tclreadline-2.1.0-rl-free.patch to replace calls to Tcl_Free()/FREE() with calls to free() (since memory is malloc()-ed and not Tcl_Alloc()/MALLOC()-ed): fixes runtime crash at command issue
* create tclreadline-2.1.0-rl-history-expand.patch to fix history expansion: the status code returned by history_expand is not interpreted correctly (1 indicates successful expansion but was treated as an error)
* create tclreadline-2.1.0-rl-prompt.patch to fix default prompt: add a space after the last character of the prompt, as in plain tclsh

Commit a8d5e00582 fixes a runtime crash when tab-completing:
* rename tclreadline-2.1.0-rl-free.patch to tclreadline-2.1.0-alloc-free.patch
** replace all calls to Tcl_Free()/FREE() with calls to free(), where memory was malloced by regular malloc() (often through strdup())
** replace call to Tcl_Alloc()/MALLOC() and matching Tcl_Free()/FREE() when generating matches with calls to regular malloc() and free() since ownership of memory is afterwards given to readline, which frees the memory using regular free()
** fix several memory leaks
* create tclreadline-2.1.0-rl-completion.patch to use readline API function rl_completion_matches() instead of non-exported internal readline function completion_matches()
* update tclreadline-2.1.0-rl-history-expand.patch to output the returned history expansion error
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2013-11-22 11:37:14 UTC
*tclreadline-2.1.0-r3 (17 Nov 2013)

  17 Nov 2013; Justin Lecher <jlec@gentoo.org> +tclreadline-2.1.0-r3.ebuild:
  Fix the totally borked attempt to fix underlinking issues, #440648; fix
  linking with ncurses[tinfo]

Is the tree version fixed for you as well?
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2013-11-22 11:39:08 UTC
Could you please open a new bug for the enhancements you are providing? I will integrate them then.