Skip Menu |

This queue is for tickets about the Term-ReadLine-Gnu CPAN distribution.

Maintainer(s)' notes

When you report a bug, please provide the following information;

- output of
	perl -V
	perl Makefile.PL verbose
	make test TEST_VERBOSE=1
	perl -Mblib t/00checkver.t
	echo $TERM
- terminal emulator which you are using
- compiler which is used to compile the GNU Readline Library (libreadline.a) if you can know.
Read INSTALL in the distribution for more details.

Report information
The Basics
Id: 107201
Status: resolved
Priority: 0/
Queue: Term-ReadLine-Gnu

People
Owner: HAYASHI [...] cpan.org
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.27
Fixed in: 1.28



Subject: Linux readline broken by version 1.27

A regression of sorts has sprung up in the release of 1.27

1.26 compiles and tests file, but 1.27 fails with:

 

Running Makefile.PL
Configuring Term-ReadLine-Gnu-1.27 ... Found `/usr/lib/libncurses.so'.
cc  -fno-stack-protector -DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -DUSE_C_BACKTRACE -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H rlver.c -o rlver     -fno-stack-protector -lbfd -fstack-protector-strong -L/usr/local/lib -lreadline -lncurses
!!!It seems that you have the GNU Readline Library version 6.3.!!!
cc  -fno-stack-protector -DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -DUSE_C_BACKTRACE -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0603  rlmalloc.c -o rlmalloc     -fno-stack-protector -lbfd -fstack-protector-strong -L/usr/local/lib -lreadline -lncurses
/tmp/cclPPV99.o: In function `main':
/home/kent/.cpanm/work/1442746068.232675/Term-ReadLine-Gnu-1.27/rlmalloc.c:18: undefined reference to `xfree'
collect2: error: ld returned 1 exit status

system(): Inappropriate ioctl for device at Makefile.PL line 319.
N/A

 

Attached are all the diagnostic context I believe is relevant.

 

Subject: report.txt
perl -V ========================== Summary of my perl5 (revision 5 version 22 subversion 0) configuration: Platform: osname=linux, osvers=4.0.0-gentoo, archname=x86_64-linux uname='linux katipo2 4.0.0-gentoo #23 smp preempt sat apr 25 06:58:21 nzst 2015 x86_64 intel(r) core(tm) i5-2410m cpu @ 2.30ghz genuineintel gnulinux ' config_args='-de -Dprefix=/home/kent/perl5/perlbrew/perls/5.22.0 -Dusecbacktrace -Doptimize= -fno-stack-protector -O3 -march=native -mtune=native -Dman1dir=none -Dman3dir=none -Accflags= -fno-stack-protector -DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -Aldflags= -fno-stack-protector -lbfd -Aeval:scriptdir=/home/kent/perl5/perlbrew/perls/5.22.0/bin' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-stack-protector -DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -DUSE_C_BACKTRACE -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize=' -fno-stack-protector -O3 -march=native -mtune=native', cppflags='-fno-stack-protector -DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong' ccversion='', gccversion='4.9.2', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fno-stack-protector -lbfd -fstack-protector-strong -L/usr/local/lib' libpth=/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include-fixed /usr/lib /usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lpthread -lnsl -lnm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lpthread -lnsl -lnm -ldl -lm -lcrypt -lutil -lc libc=libc-2.20.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.20' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -fno-stack-protector -O3 -march=native -mtune=native -L/usr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_SDBM PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Built under linux Compiled at Jun 19 2015 08:06:04 %ENV: PERLBREW_BASHRC_VERSION="0.72" PERLBREW_HOME="/home/kent/.perlbrew" PERLBREW_MANPATH="/home/kent/perl5/perlbrew/perls/5.22.0/man" PERLBREW_PATH="/home/kent/perl5/perlbrew/bin:/home/kent/perl5/perlbrew/perls/5.22.0/bin" PERLBREW_PERL="5.22.0" PERLBREW_ROOT="/home/kent/perl5/perlbrew" PERLBREW_VERSION="0.72" @INC: /home/kent/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0/x86_64-linux /home/kent/perl5/perlbrew/perls/5.22.0/lib/site_perl/5.22.0 /home/kent/perl5/perlbrew/perls/5.22.0/lib/5.22.0/x86_64-linux /home/kent/perl5/perlbrew/perls/5.22.0/lib/5.22.0 . perl Makefile.PL verbose ========================== Found `/usr/lib/libncurses.so'. cc -fno-stack-protector -DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -DUSE_C_BACKTRACE -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H rlver.c -o rlver -fno-stack-protector -lbfd -fstack-protector-strong -L/usr/local/lib -lreadline -lncurses !!!It seems that you have the GNU Readline Library version 6.3.!!! cc -fno-stack-protector -DPERL_HASH_FUNC_SDBM -DUSE_C_BACKTRACE_ON_ERROR -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -DUSE_C_BACKTRACE -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0603 rlmalloc.c -o rlmalloc -fno-stack-protector -lbfd -fstack-protector-strong -L/usr/local/lib -lreadline -lncurses /tmp/ccuk0vBS.o: In function `main': /home/kent/.cpanm/work/1442746635.232990/Term-ReadLine-Gnu-1.27/rlmalloc.c:18: undefined reference to `xfree' collect2: error: ld returned 1 exit status system(): Inappropriate ioctl for device at Makefile.PL line 319. make test TEST_VERBOSE=1 ========================== make: *** No rule to make target 'test'. Stop. perl -Mblib t/00checkver.t ========================== Cannot find blib even in /home/kent/.cpanm/work/1442746635.232990/Term-ReadLine-Gnu-1.27/../../../../.. BEGIN failed--compilation aborted. echo $TERM ========================== xterm gcc -v ========================== Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.2.0/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-5.2.0/work/gcc-5.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.2.0/include/g++-v5 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/5.2.0/python --enable-objc-gc --enable-languages=c,c++,java,go,objc,obj-c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 5.2.0 p1.1, pie-0.6.4' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --enable-lto --with-isl --disable-isl-version-check --enable-libsanitizer Thread model: posix gcc version 5.2.0 (Gentoo 5.2.0 p1.1, pie-0.6.4) qlist sys-libs/readline | xargs grep VERSION ========================== /usr/include/readline/readline.h:#define RL_READLINE_VERSION 0x0603 /* Readline 6.3 */ /usr/include/readline/readline.h:#define RL_VERSION_MAJOR 6 /usr/include/readline/readline.h:#define RL_VERSION_MINOR 3 /usr/share/doc/readline-6.3_p8-r2/html/readline.html:be treated as an integer, <CODE>RL_READLINE_VERSION</CODE>, which may /usr/share/doc/readline-6.3_p8-r2/html/readline.html:<CODE>RL_READLINE_VERSION</CODE> would be <CODE>0x0402</CODE>. qlist ncurses | xargs grep VERSION ========================== grep: /usr/lib64/terminfo: Is a directory /usr/include/ncursesw/termcap.h:#undef NCURSES_VERSION /usr/include/ncursesw/termcap.h:#define NCURSES_VERSION "6.0" /usr/include/ncursesw/ncurses.h:#define NCURSES_VERSION_MAJOR 6 /usr/include/ncursesw/ncurses.h:#define NCURSES_VERSION_MINOR 0 /usr/include/ncursesw/ncurses.h:#define NCURSES_VERSION_PATCH 20150808 /usr/include/ncursesw/ncurses.h:#undef NCURSES_VERSION /usr/include/ncursesw/ncurses.h:#define NCURSES_VERSION "6.0" /usr/include/ncursesw/ncurses.h:#define NCURSES_MOUSE_VERSION 2 /usr/include/ncursesw/ncurses.h:# define NCURSES_EVENT_VERSION 1 /usr/include/ncursesw/ncurses.h:#define curses_version() NCURSES_VERSION /usr/include/ncursesw/ncurses.h:#if NCURSES_MOUSE_VERSION > 1 /usr/include/ncursesw/ncurses.h:#if NCURSES_MOUSE_VERSION > 1 /usr/include/ncursesw/curses.h:#define NCURSES_VERSION_MAJOR 6 /usr/include/ncursesw/curses.h:#define NCURSES_VERSION_MINOR 0 /usr/include/ncursesw/curses.h:#define NCURSES_VERSION_PATCH 20150808 /usr/include/ncursesw/curses.h:#undef NCURSES_VERSION /usr/include/ncursesw/curses.h:#define NCURSES_VERSION "6.0" /usr/include/ncursesw/curses.h:#define NCURSES_MOUSE_VERSION 2 /usr/include/ncursesw/curses.h:# define NCURSES_EVENT_VERSION 1 /usr/include/ncursesw/curses.h:#define curses_version() NCURSES_VERSION /usr/include/ncursesw/curses.h:#if NCURSES_MOUSE_VERSION > 1 /usr/include/ncursesw/curses.h:#if NCURSES_MOUSE_VERSION > 1 /usr/include/ncursesw/unctrl.h:#undef NCURSES_VERSION /usr/include/ncursesw/unctrl.h:#define NCURSES_VERSION "6.0" /usr/include/ncursesw/term.h:#undef NCURSES_VERSION /usr/include/ncursesw/term.h:#define NCURSES_VERSION "6.0" /usr/include/termcap.h:#undef NCURSES_VERSION /usr/include/termcap.h:#define NCURSES_VERSION "6.0" /usr/include/ncurses.h:#define NCURSES_VERSION_MAJOR 6 /usr/include/ncurses.h:#define NCURSES_VERSION_MINOR 0 /usr/include/ncurses.h:#define NCURSES_VERSION_PATCH 20150808 /usr/include/ncurses.h:#undef NCURSES_VERSION /usr/include/ncurses.h:#define NCURSES_VERSION "6.0" /usr/include/ncurses.h:#define NCURSES_MOUSE_VERSION 2 /usr/include/ncurses.h:# define NCURSES_EVENT_VERSION 1 /usr/include/ncurses.h:#define curses_version() NCURSES_VERSION /usr/include/ncurses.h:#if NCURSES_MOUSE_VERSION > 1 /usr/include/ncurses.h:#if NCURSES_MOUSE_VERSION > 1 /usr/include/curses.h:#define NCURSES_VERSION_MAJOR 6 /usr/include/curses.h:#define NCURSES_VERSION_MINOR 0 /usr/include/curses.h:#define NCURSES_VERSION_PATCH 20150808 /usr/include/curses.h:#undef NCURSES_VERSION /usr/include/curses.h:#define NCURSES_VERSION "6.0" /usr/include/curses.h:#define NCURSES_MOUSE_VERSION 2 /usr/include/curses.h:# define NCURSES_EVENT_VERSION 1 /usr/include/curses.h:#define curses_version() NCURSES_VERSION /usr/include/curses.h:#if NCURSES_MOUSE_VERSION > 1 /usr/include/curses.h:#if NCURSES_MOUSE_VERSION > 1 /usr/include/unctrl.h:#undef NCURSES_VERSION /usr/include/unctrl.h:#define NCURSES_VERSION "6.0" /usr/include/term.h:#undef NCURSES_VERSION /usr/include/term.h:#define NCURSES_VERSION "6.0" grep: /usr/lib32/terminfo: Is a directory

Comparing the diff and toying with a few things, it seems this addition is what breaks things:

 

        system($comp_cmd);
-       unless (system($comp_cmd) || `./rlmalloc` !~ /^ok$/ || $?) {
+       if ($?) {
+           warn "\nsystem(): $!";
+           exit $err;
+       }
+       unless (`./rlmalloc` !~ /^ok$/ || $?) {
            $extra_defs = $xdef;
            last;
        }

 

This introduces an exit where there previously was none, where it was previously not necessary.

Previously, when the system call failed, it would take an alternative approach, but now exits instead.

Patching out the "exit $err" line subsequently gets me past this defect.

 

Subject: Re: [rt.cpan.org #107201] Linux readline broken by version 1.27
Date: Mon, 21 Sep 2015 10:18:29 +0900
To: bug-Term-ReadLine-Gnu [...] rt.cpan.org
From: 林宏雄 <hiroo.hayashi [...] computer.org>
Kent, Thank you for your report. You are right. I'll post a fix. 2015-09-20 20:15 GMT+09:00 Kent Fredric via RT < bug-Term-ReadLine-Gnu@rt.cpan.org>: Show quoted text
> Queue: Term-ReadLine-Gnu > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=107201 > > > Comparing the diff and toying with a few things, it seems this addition is > what > breaks things: > > system($comp_cmd);- unless (system($comp_cmd) || `./rlmalloc` !~ /^ok$/ || > $?) > {+ if ($?) {+ warn "\nsystem(): $!";+ exit $err;+ }+ unless (`./rlmalloc` > !~ > /^ok$/ || $?) { $extra_defs = $xdef; last; } > > This introduces an exit where there previously was none, where it was > previously not necessary. > > Previously, when the system call failed, it would take an alternative > approach, > but now exits instead. > > Patching out the "exit $err" line subsequently gets me past this defect. >
-- Hiroo Hayashi
I've commit the fix on SVN. https://sourceforge.net/p/perl-trg/code/496/ It will be included in the next release. Thanks!
The fix is in the 1.28.