Problem with Par:Packer?

[email protected] (Apostolos Syropoulos)
Newsgroups perl.par
Message-ID <CAE=GtUyjXnxy_FXQm4NOhSG2rQ8UfW5ibqBUUqvWnnPKFtLS7w@mail.gmail.com>
Hello,

Today I compiled perl-5.22.0 on my Solaris 11 box and I tried to
create a binary for biber. First here is what I did to compile Par:Packer:

apostolo@nadya>> cd PAR-Packer-1.026
apostolo@nadya>> lks
-bash: lks: command not found
apostolo@nadya>> ls
AUTHORS  contrib  lib           MANIFEST       META.yml    package  script
TODO
Changes  inc      Makefile.PL  MANIFEST.SKIP  myldr    README     t
apostolo@nadya>> perl Makefile.PL
Checking if your kit is complete...
Looks good
Prototype mismatch: sub main::prompt: none vs ($;$) at
/usr/perl5/5.22.0/lib/5.22.0/ExtUtils/MakeMaker.pm line 228.
Generating a Unix-style Makefile
Writing Makefile for myldr
Writing MYMETA.yml and MYMETA.json
Generating a Unix-style Makefile
Writing Makefile for PAR::Packer
Writing MYMETA.yml and MYMETA.json
apostolo@nadya>> vi /usr/perl5/5.22.0/lib/5.22.0/ExtUtils/MakeMaker.pm
apostolo@nadya>> ls
AUTHORS  inc       Makefile.PL      META.yml     MYMETA.yml  script
Changes  lib       MANIFEST      myldr        package       t
contrib  Makefile  MANIFEST.SKIP  MYMETA.json  README       TODO
apostolo@nadya>> make
cp lib/PAR/Packer.pm blib/lib/PAR/Packer.pm
cp lib/PAR/Filter/PodStrip.pm blib/lib/PAR/Filter/PodStrip.pm
cp lib/PAR/Filter/PatchContent.pm blib/lib/PAR/Filter/PatchContent.pm
cp lib/PAR/Filter/Bytecode.pm blib/lib/PAR/Filter/Bytecode.pm
cp lib/pp.pm blib/lib/pp.pm
cp lib/PAR/Filter.pm blib/lib/PAR/Filter.pm
cp lib/PAR/StrippedPARL/Base.pm blib/lib/PAR/StrippedPARL/Base.pm
cp lib/PAR/Filter/Obfuscate.pm blib/lib/PAR/Filter/Obfuscate.pm
cp lib/PAR/Filter/Bleach.pm blib/lib/PAR/Filter/Bleach.pm
cp lib/App/Packer/PAR.pm blib/lib/App/Packer/PAR.pm
make[1]: Entering directory
'/container/sources/lang/perl/modules/PARs/PAR-Packer-1.026/myldr'
Makefile:755: warning: overriding recipe for target '.c.o'
Makefile:337: warning: ignoring old recipe for target '.c.o'
"/usr/perl5/5.22.0/bin/perl" par_pl2c.pl my_par_pl < ../script/par.pl >
my_par_pl.c
"/usr/perl5/5.22.0/bin/perl" sha1.c.PL
/usr/bin/gcc64 -c -D_REENTRANT -fwrapv -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -I/opt/gnu/include -m64
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DPERL_USE_SAFE_PUTENV
-I/usr/perl5/5.22.0/lib/5.22.0/i86pc-solaris-thread-multi-64/CORE
-DPARL_EXE=\"parl\" -O main.c
main.c: In function ‘main’:
main.c:121:23: προειδοποίηση: assignment discards ‘const’ qualifier from
pointer target type [enabled by default]
     fakeargv[argno++] = my_par_pl;
                       ^
/usr/bin/gcc64 main.o  -fstack-protector -L/usr/local/lib -L/usr/gnu/lib
-L/opt/gnu/lib -m64
-L/usr/perl5/5.22.0/lib/5.22.0/i86pc-solaris-thread-multi-64/CORE -lperl
-lpthread -lsocket -lnsl -ldl -lm -lc  -o ./par
true
"/usr/perl5/5.22.0/bin/perl" encode_append.pl Dynamic.in ./par Dynamic.pm
"/usr/perl5/5.22.0/bin/perl" ./file2c.pl -c 30000 "./par"
"/usr/perl5/5.22.0/lib/5.22.0/i86pc-solaris-thread-multi-64/CORE/libperl.a"
> boot_embedded_files.c
/usr/bin/gcc64 -c -D_REENTRANT -fwrapv -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -I/opt/gnu/include -m64
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-DPERL_USE_SAFE_PUTENV
-I/usr/perl5/5.22.0/lib/5.22.0/i86pc-solaris-thread-multi-64/CORE
-DPARL_EXE=\"parl\" -O boot.c
/usr/bin/gcc64 boot.o    -fstack-protector -L/usr/local/lib -L/usr/gnu/lib
-L/opt/gnu/lib -m64
-L/usr/perl5/5.22.0/lib/5.22.0/i86pc-solaris-thread-multi-64/CORE -lperl
-lpthread -lsocket -lnsl -ldl -lm -lc   -o ./boot
true
"/usr/perl5/5.22.0/bin/perl" encode_append.pl Static.in ./boot Static.pm
cp Dynamic.pm ../blib/lib/PAR/StrippedPARL/Dynamic.pm
cp Static.pm ../blib/lib/PAR/StrippedPARL/Static.pm
"/usr/perl5/5.22.0/bin/perl" -Mblib=.. run_with_inc.pl ./boot -q -B -Oparl
cp parl ../blib/script/parl
true ../blib/script/parl
"/usr/perl5/5.22.0/bin/perl" -Mblib=.. run_with_inc.pl ./par -q -B -Oparldyn
cp parldyn ../blib/script/parldyn
true ../blib/script/parldyn
Manifying 2 pod documents
make[1]: Leaving directory
'/container/sources/lang/perl/modules/PARs/PAR-Packer-1.026/myldr'
cp script/pp blib/script/pp
"/usr/perl5/5.22.0/bin/perl" "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)'
-- blib/script/pp
cp script/tkpp blib/script/tkpp
"/usr/perl5/5.22.0/bin/perl" "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)'
-- blib/script/tkpp
cp script/par.pl blib/script/par.pl
"/usr/perl5/5.22.0/bin/perl" "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)'
-- blib/script/par.pl
Manifying 4 pod documents
Manifying 10 pod documents
apostolo@nadya>> pwd
/container/sources/lang/perl/modules/PARs/PAR-Packer-1.026
apostolo@nadya>> su
Password:
apostolo@nadya:/container/sources/lang/perl/modules/PARs/PAR-Packer-1.026#
PATH=/opt/gnu/bin:/usr/perl5/5.22.0/bin:$PATH
apostolo@nadya:/container/sources/lang/perl/modules/PARs/PAR-Packer-1.026#
make install
make[1]: Entering directory
'/container/sources/lang/perl/modules/PARs/PAR-Packer-1.026/myldr'
Makefile:755: warning: overriding recipe for target '.c.o'
Makefile:337: warning: ignoring old recipe for target '.c.o'
Manifying 2 pod documents
make[1]: Leaving directory
'/container/sources/lang/perl/modules/PARs/PAR-Packer-1.026/myldr'
Manifying 4 pod documents
Manifying 10 pod documents
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/pp.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/Filter.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/Packer.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/StrippedPARL/Base.pm
Installing
/usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/StrippedPARL/Dynamic.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/StrippedPARL/Static.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/Filter/PodStrip.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/Filter/Bytecode.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/Filter/PatchContent.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/Filter/Obfuscate.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/PAR/Filter/Bleach.pm
Installing /usr/perl5/5.22.0/lib/site_perl/5.22.0/App/Packer/PAR.pm
Installing /usr/perl5/5.22.0/man/man1/par.pl.1
Installing /usr/perl5/5.22.0/man/man1/parl.1
Installing /usr/perl5/5.22.0/man/man1/pp.1
Installing /usr/perl5/5.22.0/man/man1/tkpp.1
Installing /usr/perl5/5.22.0/man/man3/PAR::Filter::PodStrip.3
Installing /usr/perl5/5.22.0/man/man3/Dynamic.3
Installing /usr/perl5/5.22.0/man/man3/PAR::Filter::Bytecode.3
Installing /usr/perl5/5.22.0/man/man3/PAR::StrippedPARL::Base.3
Installing /usr/perl5/5.22.0/man/man3/Static.3
Installing /usr/perl5/5.22.0/man/man3/PAR::Filter::PatchContent.3
Installing /usr/perl5/5.22.0/man/man3/PAR::Filter::Obfuscate.3
Installing /usr/perl5/5.22.0/man/man3/PAR::Filter.3
Installing /usr/perl5/5.22.0/man/man3/App::Packer::PAR.3
Installing /usr/perl5/5.22.0/man/man3/pp.3
Installing /usr/perl5/5.22.0/man/man3/PAR::Packer.3
Installing /usr/perl5/5.22.0/man/man3/PAR::Filter::Bleach.3
Installing /usr/perl5/5.22.0/bin/parldyn
Installing /usr/perl5/5.22.0/bin/par.pl
Installing /usr/perl5/5.22.0/bin/parl
Installing /usr/perl5/5.22.0/bin/pp
Installing /usr/perl5/5.22.0/bin/tkpp
Appending installation info to
/usr/perl5/5.22.0/lib/5.22.0/i86pc-solaris-thread-multi-64/perllocal.pod
apostolo@nadya:/container/sources/lang/perl/modules/PARs/PAR-Packer-1.026#
exit
exit

Now when I run the resulting binary I get the following error message:

apostolo@nadya>> ./biber-solaris_x86_64
Can't locate utf8_heavy.pl in @INC (@INC contains:
/var/tmp/par-61706f73746f6c6f/cache-5d765e6374fd85eea95d209985db21b70d85f56e/inc/lib
/var/tmp/par-61706f73746f6c6f/cache-5d765e6374fd85eea95d209985db21b70d85f56e/inc
CODE(0x137f878) CODE(0x137faa0)) at /loader/HASH(0x7c5750)/utf8.pm line 16.
Compilation failed in require at
/var/tmp/par-61706f73746f6c6f/cache-5d765e6374fd85eea95d209985db21b70d85f56e/inc/lib/Biber/Utils.pm
line 20.
BEGIN failed--compilation aborted at
/var/tmp/par-61706f73746f6c6f/cache-5d765e6374fd85eea95d209985db21b70d85f56e/inc/lib/Biber/Utils.pm
line 20.
Compilation failed in require at
/var/tmp/par-61706f73746f6c6f/cache-5d765e6374fd85eea95d209985db21b70d85f56e/inc/lib/Biber/Internals.pm
line 8.
BEGIN failed--compilation aborted at
/var/tmp/par-61706f73746f6c6f/cache-5d765e6374fd85eea95d209985db21b70d85f56e/inc/lib/Biber/Internals.pm
line 8.
Compilation failed in require at /loader/HASH(0x727a78)/base.pm line 99.
    ...propagated at /loader/HASH(0x727a78)/base.pm line 108.
BEGIN failed--compilation aborted at
/var/tmp/par-61706f73746f6c6f/cache-5d765e6374fd85eea95d209985db21b70d85f56e/inc/lib/Biber.pm
line 5.
Compilation failed in require at script/biber line 20.
BEGIN failed--compilation aborted at script/biber line 20.

In order to build biber I have used the attached files. Since I have no idea
what might be the problem, I would really appreciate it if you could help
me to resolve it.

Kind regards,

Apostolos Syropoulos

-- 
Apostolos Syropoulos
Xanthi, GREECE
Web-page at http://asyropoulos.eu
Blog at http://asyropoulos.wordpress.com/
           http://hypercomputation.blogspot.com/
build.sh (application/x-sh, 3 KB)
#!/bin/bash

# For some reason, PAR::Packer on linux is clever and when processing link lines
# resolves any symlinks but names the packed lib the same as the link name. This is
# a good thing. This is a feature of PAR::Packer on ELF systems.

# Have to be very careful about Perl modules with .so binary libraries as sometimes
# (LibXML.so for example), they include RPATH which means that the PAR cache
# is not searched first, even though it's at the top of LD_LIBRARY_PATH. So, the wrong
# libraries will be found and things may well break. Strip any RPATH out of such libs
# with "chrpath -d <lib>". Check for presence with "readelf -d <lib>".
# 
# Check all perl binaries with:
# for file in `find /usr/local/perl/lib* -name \*.so`; do echo $file >> /tmp/out ;readelf -d $file >> /tmp/out; done
# and then grep the file for "RPATH"

# Had to add /etc/ld.so.conf.d/biber.conf and put "/usr/local/perl/lib" in there
# and then run "sudo ldconfig" so that libbtparse.so is found. Doesn't really make
# a difference to the build, just the running of Text::BibTeX itself.

# Using a newer locally built libz and libxml2 (and rebuilt XML::LibXML) in /usr/local because
# beginning with 32-bit Debian Wheezy, the older ones would segfault

# Have to explicitly include the Input* modules as the names of these are dynamically
# constructed in the code so Par::Packer can't auto-detect them.
# Same with some of the output modules.

PAR_VERBATIM=1 /usr/perl5/5.22.0/bin/pp \
  --compress=6 \
  --module=deprecate \
  --module=Biber::Input::file::bibtex \
  --module=Biber::Input::file::biblatexml \
  --module=Biber::Input::file::ris \
  --module=Biber::Input::file::zoterordfxml \
  --module=Biber::Input::file::endnotexml \
  --module=Biber::Output::dot \
  --module=Biber::Output::bbl \
  --module=Biber::Output::bibtex \
  --module=Biber::Output::biblatexml \
  --module=Pod::Simple::TranscodeSmart \
  --module=Pod::Simple::TranscodeDumb \
  --module=List::MoreUtils::XS \
  --module=List::MoreUtils::PP \
  --module=Encode::Byte \
  --module=Encode::CN \
  --module=HTTP::Status \
  --module=HTTP::Date \
  --module=Encode::Locale \
  --module=Encode::CJKConstants \
  --module=Encode::EBCDIC \
  --module=Encode::Encoder \
  --module=Encode::GSM0338 \
  --module=Encode::Guess \
  --module=Encode::JP \
  --module=Encode::KR \
  --module=Encode::MIME::Header \
  --module=Encode::Symbol \
  --module=Encode::TW \
  --module=Encode::Unicode \
  --module=Encode::Unicode::UTF7 \
  --module=Encode::EUCJPASCII \
  --module=Encode::JIS2K \
  --module=Encode::HanExtra \
  --module=File::Find::Rule \
  --module=IO::Socket::SSL \
  --link=/usr/perl5/5.22.0/lib/libbtparse.so \
  --link=/usr/lib/amd64/libxml2.so.2 \
  --link=/usr/lib/amd64/libz.so.1 \
  --link=/usr/lib/amd64/libxslt.so.1 \
  --link=/usr/lib/libexslt.so.0 \
  --link=/usr/lib/amd64/libssl.so.0.9.8 \
  --link=/usr/lib/amd64/libcrypto.so.0.9.8 \
  --addlist=biber.files \
  --cachedeps=scancache \
  --output=biber-solaris_x86_64 \
  /usr/perl5/5.22.0/bin/biber
biber.files (application/octet-stream, 1.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.