develooper Front page | perl.perl5.porters | Postings from December 2016

Re: [perl #129354] Default configuration on x86_64-linux-gnu cannotbuild binary extension modules

Thread Previous
From:
Leon Timmermans
Date:
December 31, 2016 13:09
Subject:
Re: [perl #129354] Default configuration on x86_64-linux-gnu cannotbuild binary extension modules
Message ID:
CAHhgV8gaeG-p99wtV9q0RVKho5fR_K7NFdteOuskgMPoaqW3zQ@mail.gmail.com
On Sun, Sep 25, 2016 at 10:47 PM, Daniel Schepler <perlbug-followup@perl.org
> wrote:

> For example, when subsequently configuring texinfo, I got these errors
> under tp/Texinfo/Convert/XSParagraph:
>
> /bin/sh ./libtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I.
> -I../../../../../tp/Texinfo/Convert/XSParagraph
> -I../../../../../tp/Texinfo/Convert/XSParagraph
> -I../../../../../tp/Texinfo/Convert/XSParagraph/lib -I./lib  -fwrapv
> -fno-strict-aliasing -pipe -fstack-protector-strong
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -DVERSION=\"6.3\" -DXS_VERSION=\"6.3\"
> "-I/usr/lib/perl5/5.24.0/x86_64-linux/CORE"  -MT TestXS_la-TestXS.lo
> -MD -MP -MF .deps/TestXS_la-TestXS.Tpo -c -o TestXS_la-TestXS.lo `test
> -f 'TestXS.c' || echo
> '../../../../../tp/Texinfo/Convert/XSParagraph/'`TestXS.c
> libtool: compile:  cc -DHAVE_CONFIG_H -I.
> -I../../../../../tp/Texinfo/Convert/XSParagraph
> -I../../../../../tp/Texinfo/Convert/XSParagraph
> -I../../../../../tp/Texinfo/Convert/XSParagraph/lib -I./lib -fwrapv
> -fno-strict-aliasing -pipe -fstack-protector-strong
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -DVERSION=\"6.3\" -DXS_VERSION=\"6.3\"
> -I/usr/lib/perl5/5.24.0/x86_64-linux/CORE -MT TestXS_la-TestXS.lo -MD
> -MP -MF .deps/TestXS_la-TestXS.Tpo -c
> ../../../../../tp/Texinfo/Convert/XSParagraph/TestXS.c  -fPIC -DPIC -o
> .libs/TestXS_la-TestXS.o
> libtool: compile:  cc -DHAVE_CONFIG_H -I.
> -I../../../../../tp/Texinfo/Convert/XSParagraph
> -I../../../../../tp/Texinfo/Convert/XSParagraph
> -I../../../../../tp/Texinfo/Convert/XSParagraph/lib -I./lib -fwrapv
> -fno-strict-aliasing -pipe -fstack-protector-strong
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -DVERSION=\"6.3\" -DXS_VERSION=\"6.3\"
> -I/usr/lib/perl5/5.24.0/x86_64-linux/CORE -MT TestXS_la-TestXS.lo -MD
> -MP -MF .deps/TestXS_la-TestXS.Tpo -c
> ../../../../../tp/Texinfo/Convert/XSParagraph/TestXS.c -o
> TestXS_la-TestXS.o >/dev/null 2>&1
> mv -f .deps/TestXS_la-TestXS.Tpo .deps/TestXS_la-TestXS.Plo
> /bin/sh ./libtool  --tag=CC   --mode=link cc -fwrapv
> -fno-strict-aliasing -pipe -fstack-protector-strong
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -DVERSION=\"6.3\" -DXS_VERSION=\"6.3\"
> "-I/usr/lib/perl5/5.24.0/x86_64-linux/CORE"  -no-undefined
> -L/usr/lib/perl5/5.24.0/x86_64-linux/CORE -lperl -avoid-version
> -module -Wl,-E  -o TestXS.la -rpath /usr/lib/texinfo
> TestXS_la-TestXS.lo
> libtool: link: cc -shared  -fPIC -DPIC  .libs/TestXS_la-TestXS.o
> -L/usr/lib/perl5/5.24.0/x86_64-linux/CORE -lperl
> -fstack-protector-strong -Wl,-E   -Wl,-soname -Wl,TestXS.so -o
> .libs/TestXS.so
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(op.o): relocation
> R_X86_64_32S against symbol `PL_opargs' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(perl.o): relocation
> R_X86_64_32 against `.text' can not be used when making a shared
> object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(gv.o): relocation
> R_X86_64_32 against `.rodata.str1.1' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(toke.o): relocation
> R_X86_64_32 against `.rodata.str1.1' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(perly.o): relocation
> R_X86_64_32S against `.rodata' can not be used when making a shared
> object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(pad.o): relocation
> R_X86_64_32 against symbol `PL_memory_wrap' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(regcomp.o):
> relocation R_X86_64_32S against symbol `PL_utf8skip' can not be used
> when making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(dump.o): relocation
> R_X86_64_32 against `.rodata.str1.1' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(util.o): relocation
> R_X86_64_32S against symbol `PL_fold' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(mg.o): relocation
> R_X86_64_32 against `.text' can not be used when making a shared
> object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(mro_core.o):
> relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(keywords.o):
> relocation R_X86_64_32S against `.rodata' can not be used when making
> a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(hv.o): relocation
> R_X86_64_32 against `.rodata.str1.1' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(av.o): relocation
> R_X86_64_32 against symbol `PL_memory_wrap' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(pp_hot.o):
> relocation R_X86_64_32 against undefined symbol `PL_sv_undef' can not
> be used when making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(sv.o): relocation
> R_X86_64_32S against undefined symbol `PL_sv_undef' can not be used
> when making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(pp.o): relocation
> R_X86_64_32 against symbol `PL_memory_wrap' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(scope.o): relocation
> R_X86_64_32 against symbol `PL_memory_wrap' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(pp_ctl.o):
> relocation R_X86_64_32 against symbol `PL_memory_wrap' can not be used
> when making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(pp_sys.o):
> relocation R_X86_64_32 against `.rodata.str1.1' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(doop.o): relocation
> R_X86_64_32 against `.rodata.str1.1' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(doio.o): relocation
> R_X86_64_32 against symbol `PL_memory_wrap' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(regexec.o):
> relocation R_X86_64_32S against `.rodata' can not be used when making
> a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(utf8.o): relocation
> R_X86_64_32S against symbol `PL_charclass' can not be used when making
> a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(taint.o): relocation
> R_X86_64_32 against symbol `PL_no_security' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(deb.o): relocation
> R_X86_64_32 against `.rodata.str1.1' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(universal.o):
> relocation R_X86_64_32 against `.rodata.str1.1' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(perlio.o):
> relocation R_X86_64_32 against symbol `PL_memory_wrap' can not be used
> when making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(numeric.o):
> relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(mathoms.o):
> relocation R_X86_64_32 against `.rodata.str1.1' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(locale.o):
> relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(pp_pack.o):
> relocation R_X86_64_32S against symbol `PL_uuemap' can not be used
> when making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(pp_sort.o):
> relocation R_X86_64_32 against `.text' can not be used when making a
> shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(caretx.o):
> relocation R_X86_64_32 against `.rodata.str1.1' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(dquote.o):
> relocation R_X86_64_32S against symbol `PL_charclass' can not be used
> when making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> /usr/lib/perl5/5.24.0/x86_64-linux/CORE/libperl.a(time64.o):
> relocation R_X86_64_32S against `.rodata.str1.1' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-
> pc-linux-gnu/bin/ld:
> final link failed: Nonrepresentable section on output
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:916: TestXS.la] Error 1
> checking whether we can build Perl extension (XS) modules... no
> checking for prove... prove
> checking parser tests requirements... no
>

If you want to use libperl in a shared library, you need to compile your
libperl as a shared library, this can be done by adding -Duseshrplib to
your Configure arguments.

Leon

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About