I'm trying to build
TERM::ReadLine::Gnu and have been getting two types of failures.

First -- when the ".a" library was present it tried to link
to it w/o success -- not sure why it tried linking to the ".a"
over the ".so", since I didn't specify "static" but built perl
with "-shared". Isn't the ".a" only for static links?
The CPAN build looked like:
================================================================================
 install Term::ReadLine::Gnu
Database was generated on Fri, 03 Feb 2017 23:10:13 GMT

Running install for module 'Term::ReadLine::Gnu'
Checksum for /Share/CPAN/sources/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz ok
Scanning cache /home/CPAN-ishtar-build-cache for sizes
............................................................................DONE
Configuring H/HA/HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz with Makefile.PL
Found `/usr/lib64/libtermcap.a'.
gcc -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H rlver.c -o rlver -g -fstack-protector -fPIC -lreadline -ltermcap
<<<It seems that you have the GNU Readline Library version 6.2.>>>
gcc -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0602 rlmalloc.c -o rlmalloc -g -fstack-protector -fPIC -lreadline -ltermcap
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Term::ReadLine::Gnu
Writing MYMETA.yml and MYMETA.json
(/usr/bin/perl Makefile.PL exited with 0)
CPAN::Reporter: Makefile.PL result is 'pass', No errors.
 HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz
 /usr/bin/perl Makefile.PL -- OK
Running make for H/HA/HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz
"/usr/bin/perl" "/home/perl/perl-5.16.3/lib/site/ExtUtils/xsubpp" -typemap "/home/perl/perl-5.16.3/lib/ExtUtils/typemap" -typemap "typemap" Gnu.xs > Gnu.xsc && mv Gnu.xsc Gnu.c
cp eg/perlsh blib/script/perlsh
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/perlsh
Running Mkbootstrap for Term::ReadLine::Gnu ()
chmod 644 "Gnu.bs"
cp Gnu.pm blib/lib/Term/ReadLine/Gnu.pm
cp Gnu/XS.pm blib/lib/Term/ReadLine/Gnu/XS.pm
AutoSplitting blib/lib/Term/ReadLine/Gnu/XS.pm (blib/lib/auto/Term/ReadLine/Gnu/XS) blib/lib/Term/ReadLine/Gnu/XS.pm: some names are not unique when truncated to 8 characters:
directory blib/lib/auto/Term/ReadLine/Gnu/XS:
rl_bind_key.al, rl_bind_key_if_unbound.al, rl_bind_keyseq.al, rl_bind_keyseq_if_unbound.al truncate to rl_bind_
 rl_set_keymap.al, rl_set_key.al truncate to rl_set_k
gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -DVERSION=\"1.35\" -DXS_VERSION=\"1.35\" -fPIC "-I/home/perl/perl-5.16.3/lib/x86_64-linux-thread-multi-ld/CORE" -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0602 Gnu.c
rm -f blib/arch/auto/Term/ReadLine/Gnu/Gnu.so
LD_RUN_PATH="/usr/lib64" gcc -shared -g -O2 -fstack-protector -fPIC Gnu.o -o blib/arch/auto/Term/ReadLine/Gnu/Gnu.so \
  -lreadline -ltermcap   \

/usr/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../lib64/libtermcap.a(termcap.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../lib64/libtermcap.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:494: recipe for target 'blib/arch/auto/Term/ReadLine/Gnu/Gnu.so' failed
make: *** [blib/arch/auto/Term/ReadLine/Gnu/Gnu.so] Error 1
(/usr/bin/make -j -j exited with 512)
CPAN::Reporter: make result is 'unknown', Stopped with an error.
================================================================================

Of note, above, was the blib/.../XS.pm statement of:

some names are not unique when truncated to 8 characters:
directory blib/lib/auto/Term/ReadLine/Gnu/XS:
rl_bind_key.al, rl_bind_key_if_unbound.al, rl_bind_keyseq.al, rl_bind_keyseq_if_unbound.al truncate to rl_bind_
 rl_set_keymap.al, rl_set_key.al truncate to rl_set_k

--------

It's not likely these names will ever be under 8 characters, 8 characters seems a bit "MS-DOSish"... I don't know how C++ names would ever resolved with the
type-info encoded on the end of a symbol -- isn't there some way to increase
the matching limit?  In addition to those errors, I don't think fPIC is
going to work with a static lib, so still not sure why it chose
".a" over ".so".  So renamed the ".a" file and ended up with:


 install Term::ReadLine::Gnu
Database was generated on Fri, 03 Feb 2017 23:10:13 GMT

Running install for module 'Term::ReadLine::Gnu'
Checksum for /Share/CPAN/sources/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz ok
Scanning cache /home/CPAN-ishtar-build-cache for sizes
............................................................................DONE
DEL(1/1): /home/CPAN-ishtar-build-cache/prefs
Configuring H/HA/HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz with Makefile.PL
Found `/lib64/libtermcap.a'.
gcc -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H rlver.c -o rlver -g -fstack-protector -fPIC -lreadline -ltermcap
<<<It seems that you have the GNU Readline Library version 6.2.>>>
gcc -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0602 rlmalloc.c -o rlmalloc -g -fstack-protector -fPIC -lreadline -ltermcap
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Term::ReadLine::Gnu
Writing MYMETA.yml and MYMETA.json
(/usr/bin/perl Makefile.PL exited with 0)
CPAN::Reporter: Makefile.PL result is 'pass', No errors.
 HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz
 /usr/bin/perl Makefile.PL -- OK
Running make for H/HA/HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz
"/usr/bin/perl" "/home/perl/perl-5.16.3/lib/site/ExtUtils/xsubpp" -typemap "/home/perl/perl-5.16.3/lib/ExtUtils/typemap" -typemap "typemap" Gnu.xs > Gnu.xsc && mv Gnu.xsc Gnu.c
cp eg/perlsh blib/script/perlsh
Running Mkbootstrap for Term::ReadLine::Gnu ()
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/perlsh
chmod 644 "Gnu.bs"
cp Gnu.pm blib/lib/Term/ReadLine/Gnu.pm
cp Gnu/XS.pm blib/lib/Term/ReadLine/Gnu/XS.pm
AutoSplitting blib/lib/Term/ReadLine/Gnu/XS.pm (blib/lib/auto/Term/ReadLine/Gnu/XS) blib/lib/Term/ReadLine/Gnu/XS.pm: some names are not unique when truncated to 8 characters:
directory blib/lib/auto/Term/ReadLine/Gnu/XS:
rl_bind_key.al, rl_bind_key_if_unbound.al, rl_bind_keyseq.al, rl_bind_keyseq_if_unbound.al truncate to rl_bind_
 rl_set_keymap.al, rl_set_key.al truncate to rl_set_k
gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -DVERSION=\"1.35\" -DXS_VERSION=\"1.35\" -fPIC "-I/home/perl/perl-5.16.3/lib/x86_64-linux-thread-multi-ld/CORE" -DHAVE_STRING_H -DTRG_READLINE_VERSION=0x0602 Gnu.c
rm -f blib/arch/auto/Term/ReadLine/Gnu/Gnu.so
LD_RUN_PATH="/usr/lib64" gcc -shared -g -O2 -fstack-protector -fPIC Gnu.o -o blib/arch/auto/Term/ReadLine/Gnu/Gnu.so \
  -lreadline -ltermcap   \

chmod 755 blib/arch/auto/Term/ReadLine/Gnu/Gnu.so
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Gnu.bs blib/arch/auto/Term/ReadLine/Gnu/Gnu.bs 644
Manifying 1 pod document
Manifying 1 pod document
(/usr/bin/make -j -j exited with 0)
CPAN::Reporter: make result is 'pass', No errors.
 HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz
 /usr/bin/make -j -j -- OK
Running make test
Running Mkbootstrap for Term::ReadLine::Gnu ()
chmod 644 "Gnu.bs"
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
Cannot do `initialize' in Term::ReadLine::Gnu at t/00checkver.t line 31.
# Looks like you planned 4 tests but ran 1.
# Looks like your test exited with 255 just after 1.
t/00checkver.t ...
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 3/4 subtests
Cannot do `initialize' in Term::ReadLine::Gnu at t/callback.t line 37.
# Looks like you planned 8 tests but ran 1.
# Looks like your test exited with 255 just after 1.
t/callback.t .....
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 7/8 subtests
Cannot do `initialize' in Term::ReadLine::Gnu at t/history.t line 41.
# Looks like you planned 88 tests but ran 1.
# Looks like your test exited with 255 just after 1.
t/history.t ......
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 87/88 subtests
Cannot do `initialize' in Term::ReadLine::Gnu at t/readline.t line 57.
# Looks like you planned 147 tests but ran 1.
# Looks like your test exited with 255 just after 1.
t/readline.t .....
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 146/147 subtests
# PERL_UNICODE is defined or -C option is specified. Skipped...
t/utf8_binary.t .. ok
Cannot do `initialize' in Term::ReadLine::Gnu at t/utf8_text.t line 105.
# Looks like you planned 13 tests but ran 5.
# Looks like your test exited with 25 just after 5.
t/utf8_text.t ....
Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 8/13 subtests

Test Summary Report
-------------------
t/00checkver.t (Wstat: 65280 Tests: 1 Failed: 0)
 Non-zero exit status: 255
 Parse errors: Bad plan.  You planned 4 tests but ran 1.
t/callback.t   (Wstat: 65280 Tests: 1 Failed: 0)
 Non-zero exit status: 255
 Parse errors: Bad plan.  You planned 8 tests but ran 1.
t/history.t    (Wstat: 65280 Tests: 1 Failed: 0)
 Non-zero exit status: 255
 Parse errors: Bad plan.  You planned 88 tests but ran 1.
t/readline.t   (Wstat: 65280 Tests: 1 Failed: 0)
 Non-zero exit status: 255
 Parse errors: Bad plan.  You planned 147 tests but ran 1.
t/utf8_text.t  (Wstat: 6400 Tests: 5 Failed: 0)
 Non-zero exit status: 25
 Parse errors: Bad plan.  You planned 13 tests but ran 5.
Files=6, Tests=21, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.26 cusr 0.04 csys = 0.35 CPU)
Result: FAIL
Failed 5/6 test programs. 0/21 subtests failed.
Makefile:1063: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 25
(/usr/bin/make test exited with 512)
CPAN::Reporter: Test result is 'fail', One or more tests failed.
CPAN::Reporter: preparing a CPAN Testers report for Term-ReadLine-Gnu-1.35
CPAN::Reporter: sending test report with 'fail' via Metabase
 HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz
 /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
 reports HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz
Failed during this command:
HAYASHI/Term-ReadLine-Gnu-1.35.tar.gz        : make_test NO

================================================================================

In this one, it linked, but with the "too-short symbols", and, unsurprisingly,
it failed as well -- since I'm fairly sure the bit about using
only 8-chars for linking is anachronistic besides being likely
to cause a fail for many links.

It seems the common fail part of trying to link with symbols that are too
short, seems to be the problem.

Any idea why this module would be triggering an 8-char link limit?

I find it hard to believe all the rest of the modules I've installed
and linked all fit under 8-chars, so I think it likely they used more
than 8-chars, any idea what would be triggering such a limit in this
situation?

Also as shows below, perl is linked shared.  Why would it try for a
static linkage when the modules should be built for shared as well?

uname shows:

Linux Ishtar 4.9.0-Isht-Van #1 SMP PREEMPT Fri Dec 16 16:56:53 PST 2016 x86_64 GNU/Linux



perl -V shows:

 perl -V
Summary of my perl5 (revision 5 version 16 subversion 3) configuration:
Platform: osname=linux, osvers=3.12.0-isht-van, archname=x86_64-linux-thread-multi-ld uname='linux ishtar 3.12.0-isht-van #1 smp preempt wed nov 13 16:50:51 pst 2013 x86_64 x86_64 x86_64 gnulinux '
   config_args=''
   hint=previous, useposix=true, d_sigaction=define
   useithreads=define, usemultiplicity=define
   useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
   use64bitint=define, use64bitall=define, uselongdouble=define
   usemymalloc=n, bincompat5005=undef
 Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
   optimize='-g -O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' ccversion='', gccversion='4.8.1 20130909 [gcc-4_8-branch revision 202388]', gccosandvers=''
   intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
   d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
   alignbytes=16, prototype=define
 Linker and Libraries:
   ld='gcc', ldflags ='-g -fstack-protector -fPIC'
   libpth=/usr/lib64 /lib64
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
   perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.18.so, so=so, useshrplib=true, libperl=libperl-5.16.3.so
   gnulibc_version='2.18'
 Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/home/perl/perl-5.16.3/lib/x86_64-linux-thread-multi-ld/CORE'
   cccdlflags='-fPIC', lddlflags='-shared -g -O2 -fstack-protector -fPIC'


Characteristics of this binary (from libperl):
 Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                       PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
                       PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
                       USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                       USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                       USE_LOCALE_NUMERIC USE_LONG_DOUBLE USE_PERLIO
                       USE_PERL_ATOF USE_REENTRANT_API
 Built under linux
 Compiled at Jan 23 2014 00:35:49
 @INC:
   /home/perl/perl-5.16.3/lib/site/x86_64-linux-thread-multi-ld
   /home/perl/perl-5.16.3/lib/site
   /home/perl/perl-5.16.3/lib/x86_64-linux-thread-multi-ld
   /home/perl/perl-5.16.3/lib

Thanks for any hints...
-l

Reply via email to