6.41. XML-Parser-2.44 Fails to Compile
by rsmereka from LinuxQuestions.org on (#4VA9P)
Hi All,
I am building LFS 9.0 x64, using MX Linux x64 on a USB stick as the host. This is my first time building x64. I have built i386 three times.
I configure the package and get:
Code:(lfs chroot) root:/sources/XML-Parser-2.44# perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite LWP::UserAgent 0 not found.
Have /tools/lib/perl5/5.30.0
Want /tools/lib/perl5/5.30.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.30.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Have /tools/lib/perl5/5.30.0
Want /tools/lib/perl5/5.30.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.30.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
ERROR from evaluation of /sources/XML-Parser-2.44/Expat/Makefile.PL: Failed to opendir '/tools/lib/perl5/5.30.0/x86_64-linux/CORE' to find header files: No such file or directory at /tools/lib/perl5/5.30.0/ExtUtils/MM_Any.pm line 3047.And then I attempt to compile and get:
Code:make: *** No targets specified and no makefile found. Stop.I also went back to Perl itself, the configuration step is fine but the compile fails with:
Code:LD_LIBRARY_PATH=/sources/perl-5.30.0 ./miniperl -Ilib make_ext.pl lib/auto/Compress/Raw/Bzip2/Bzip2.so MAKE="make" LIBPERL_A=libperl.so LINKTYPE=dynamic
Warning: -Lbzip2-src changed to -L/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/bzip2-src
Generating a Unix-style Makefile
Writing Makefile for Compress::Raw::Bzip2
make[1]: Entering directory '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2'
Running Mkbootstrap for Bzip2 ()
chmod 644 "Bzip2.bs"
/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/../../miniperl "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- Bzip2.bs ../../lib/auto/Compress/Raw/Bzip2/Bzip2.bs 644
"../../miniperl" "-I../../lib" "../../lib/ExtUtils/xsubpp" -typemap '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/../../lib/ExtUtils/typemap' -typemap '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/typemap' Bzip2.xs > Bzip2.xsc
mv Bzip2.xsc Bzip2.c
cc -c -I. -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\" -fPIC "-I../.." -DBZ_NO_STDIO Bzip2.c
rm -f ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so
cc -shared -O2 -L/usr/local/lib -fstack-protector-strong Bzip2.o -o ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so \
-L/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/bzip2-src -lbz2 \
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against symbol `BZ2_crc32Table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(compress.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(decompress.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(blocksort.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:486: ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so] Error 1
make[1]: Leaving directory '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2'
make[1]: Entering directory '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2'
/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/../../miniperl "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- Bzip2.bs ../../lib/auto/Compress/Raw/Bzip2/Bzip2.bs 644
rm -f ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so
cc -shared -O2 -L/usr/local/lib -fstack-protector-strong Bzip2.o -o ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so \
-L/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/bzip2-src -lbz2 \
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against symbol `BZ2_crc32Table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(compress.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(decompress.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(blocksort.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:486: ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so] Error 1
make[1]: Leaving directory '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2'
Unsuccessful make(cpan/Compress-Raw-Bzip2): code=512 at make_ext.pl line 570.
make: *** [makefile:574: lib/auto/Compress/Raw/Bzip2/Bzip2.so] Error 25
(lfs chroot) root:/sources/perl-5.30.0# echo $BUILD_BZIP2
0
(lfs chroot) root:/sources/perl-5.30.0# cd ../XML-Parser-2.44
(lfs chroot) root:/sources/XML-Parser-2.44# ls -l
total 100
-rw-r--r-- 1 501 20 26921 Jan 12 2015 Changes
drwxr-x--- 2 501 20 4096 Jan 12 2015 Expat
-rw-r--r-- 1 501 20 3811 Jan 12 2015 MANIFEST
-rw-r----- 1 501 20 1027 Jan 12 2015 META.json
-rw-r----- 1 501 20 585 Jan 12 2015 META.yml
-rw-r--r-- 1 501 20 5204 Dec 11 2014 Makefile.PL
drwxr-x--- 4 501 20 4096 Jan 12 2015 Parser
-rw-r--r-- 1 501 20 27108 Jan 12 2015 Parser.pm
-rw-r--r-- 1 501 20 3430 Dec 11 2014 README
drwxr-x--- 3 501 20 4096 Jan 12 2015 inc
drwxr-x--- 2 501 20 4096 Jan 12 2015 samples
drwxr-x--- 2 501 20 4096 Jan 12 2015 t
(lfs chroot) root:/sources/XML-Parser-2.44# perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite LWP::UserAgent 0 not found.
Have /tools/lib/perl5/5.30.0
Want /tools/lib/perl5/5.30.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.30.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Have /tools/lib/perl5/5.30.0
Want /tools/lib/perl5/5.30.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.30.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
ERROR from evaluation of /sources/XML-Parser-2.44/Expat/Makefile.PL: Failed to opendir '/tools/lib/perl5/5.30.0/x86_64-linux/CORE' to find header files: No such file or directory at /tools/lib/perl5/5.30.0/ExtUtils/MM_Any.pm line 3047.
(lfs chroot) root:/sources/XML-Parser-2.44# make
make: *** No targets specified and no makefile found. Stop.Note that I have double-checked the presence of the variables:
Code:BUILD_ZLIB and BUILD_BZIP2and both of these are present and have appropriate values.
Ideas anyone.
TIA.


I am building LFS 9.0 x64, using MX Linux x64 on a USB stick as the host. This is my first time building x64. I have built i386 three times.
I configure the package and get:
Code:(lfs chroot) root:/sources/XML-Parser-2.44# perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite LWP::UserAgent 0 not found.
Have /tools/lib/perl5/5.30.0
Want /tools/lib/perl5/5.30.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.30.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Have /tools/lib/perl5/5.30.0
Want /tools/lib/perl5/5.30.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.30.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
ERROR from evaluation of /sources/XML-Parser-2.44/Expat/Makefile.PL: Failed to opendir '/tools/lib/perl5/5.30.0/x86_64-linux/CORE' to find header files: No such file or directory at /tools/lib/perl5/5.30.0/ExtUtils/MM_Any.pm line 3047.And then I attempt to compile and get:
Code:make: *** No targets specified and no makefile found. Stop.I also went back to Perl itself, the configuration step is fine but the compile fails with:
Code:LD_LIBRARY_PATH=/sources/perl-5.30.0 ./miniperl -Ilib make_ext.pl lib/auto/Compress/Raw/Bzip2/Bzip2.so MAKE="make" LIBPERL_A=libperl.so LINKTYPE=dynamic
Warning: -Lbzip2-src changed to -L/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/bzip2-src
Generating a Unix-style Makefile
Writing Makefile for Compress::Raw::Bzip2
make[1]: Entering directory '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2'
Running Mkbootstrap for Bzip2 ()
chmod 644 "Bzip2.bs"
/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/../../miniperl "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- Bzip2.bs ../../lib/auto/Compress/Raw/Bzip2/Bzip2.bs 644
"../../miniperl" "-I../../lib" "../../lib/ExtUtils/xsubpp" -typemap '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/../../lib/ExtUtils/typemap' -typemap '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/typemap' Bzip2.xs > Bzip2.xsc
mv Bzip2.xsc Bzip2.c
cc -c -I. -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\" -fPIC "-I../.." -DBZ_NO_STDIO Bzip2.c
rm -f ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so
cc -shared -O2 -L/usr/local/lib -fstack-protector-strong Bzip2.o -o ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so \
-L/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/bzip2-src -lbz2 \
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against symbol `BZ2_crc32Table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(compress.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(decompress.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(blocksort.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:486: ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so] Error 1
make[1]: Leaving directory '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2'
make[1]: Entering directory '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2'
/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/../../miniperl "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- Bzip2.bs ../../lib/auto/Compress/Raw/Bzip2/Bzip2.bs 644
rm -f ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so
cc -shared -O2 -L/usr/local/lib -fstack-protector-strong Bzip2.o -o ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so \
-L/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2/bzip2-src -lbz2 \
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against symbol `BZ2_crc32Table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(compress.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(decompress.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(blocksort.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:486: ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so] Error 1
make[1]: Leaving directory '/sources/perl-5.30.0/cpan/Compress-Raw-Bzip2'
Unsuccessful make(cpan/Compress-Raw-Bzip2): code=512 at make_ext.pl line 570.
make: *** [makefile:574: lib/auto/Compress/Raw/Bzip2/Bzip2.so] Error 25
(lfs chroot) root:/sources/perl-5.30.0# echo $BUILD_BZIP2
0
(lfs chroot) root:/sources/perl-5.30.0# cd ../XML-Parser-2.44
(lfs chroot) root:/sources/XML-Parser-2.44# ls -l
total 100
-rw-r--r-- 1 501 20 26921 Jan 12 2015 Changes
drwxr-x--- 2 501 20 4096 Jan 12 2015 Expat
-rw-r--r-- 1 501 20 3811 Jan 12 2015 MANIFEST
-rw-r----- 1 501 20 1027 Jan 12 2015 META.json
-rw-r----- 1 501 20 585 Jan 12 2015 META.yml
-rw-r--r-- 1 501 20 5204 Dec 11 2014 Makefile.PL
drwxr-x--- 4 501 20 4096 Jan 12 2015 Parser
-rw-r--r-- 1 501 20 27108 Jan 12 2015 Parser.pm
-rw-r--r-- 1 501 20 3430 Dec 11 2014 README
drwxr-x--- 3 501 20 4096 Jan 12 2015 inc
drwxr-x--- 2 501 20 4096 Jan 12 2015 samples
drwxr-x--- 2 501 20 4096 Jan 12 2015 t
(lfs chroot) root:/sources/XML-Parser-2.44# perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite LWP::UserAgent 0 not found.
Have /tools/lib/perl5/5.30.0
Want /tools/lib/perl5/5.30.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.30.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Have /tools/lib/perl5/5.30.0
Want /tools/lib/perl5/5.30.0/x86_64-linux
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.30.0]
Config says: [x86_64-linux]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
ERROR from evaluation of /sources/XML-Parser-2.44/Expat/Makefile.PL: Failed to opendir '/tools/lib/perl5/5.30.0/x86_64-linux/CORE' to find header files: No such file or directory at /tools/lib/perl5/5.30.0/ExtUtils/MM_Any.pm line 3047.
(lfs chroot) root:/sources/XML-Parser-2.44# make
make: *** No targets specified and no makefile found. Stop.Note that I have double-checked the presence of the variables:
Code:BUILD_ZLIB and BUILD_BZIP2and both of these are present and have appropriate values.
Ideas anyone.
TIA.