> On Feb 4, 2017, at 12:42 AM, L A Walsh <c...@tlinx.org> wrote:
> 
> 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:

Nope it’s your bug, not the mod.
You link a dynamic module against a static libtermcap.a.
Install a dynamic version thereof.

Or install Term::ReadLine::Gnu with LINKTYPE=static and rebuild perl against 
that.
http://search.cpan.org/~bingos/ExtUtils-MakeMaker-7.24/lib/ExtUtils/MakeMaker.pm#Static_Linking_of_a_new_Perl_Binary

> ================================================================================
>> 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.
> ================================================================================

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to