Hi, I have a problem with Perl deployment, sorry for the long post but I would like to explain it clearly.
Basically I'm trying to compile XMLTV (which is written in Perl) to run it on my QNAP TS-239 embedded system, which is an x86 architecture.
As I want to distribute XMLTV to others, I want also to be able to compile it for several other QNAP NAS models, which run for example x86_64 or armel but that's a further question.
Let's start with the system information: I'm using the QNAP and a Debian Lenny Virtual Machine.
GLIBC version = 2.6.1
uname = Linux NAS 2.6.33.2 i686 unknown
GLIBC version = 2.7
uname = Linux debian 2.6.26-2-686 i686 GNU/Linux
Using that VM I was able to compile any C code and then - moving those files on the QNAP - they run successfully.
I first tried building the XMLTV on the Debian VM. As I want to deploy the XMLTV application to others, I've built it together with the required modules in a custom folder: /root/out.
I first installed CPAN, changed its configuration data with:
o conf makepl_arg INSTALL_BASE=/root/out o conf commit
then I've compiled all the dependecies like LWP and Date::Manip. Sometimes CPAN fails to build a module automatically, like with XML::Parser, so I've used:
look XML::Parser perl Makefile.PL INSTALL_BASE=/root/out make && make install exit
... obviously by resolving the required dependencies first (which are printed on the console when running perl Makefile.PL).
Finally I've compiled XMLTV too in the folder /root/out/xmltv using the same commands than before; I've exported the PERL5LIB:
export PERL5LIB=/root/out/lib/perl5:/root/out/xmltv/lib/perl5Then if I run /root/out/xmltv/bin/tv_grab_it on the Debian VM it works OK.
Moving the whole "out" folder inside the QNAP /share/FTP directory, exporting the PERL5LIB (with the corresponding dirs) and running tv_grab_it however gives this error:
# /share/FTP/out/xmltv/bin/tv_grab_it Can't locate XML/Parser.pm in @INC (@INC contains: /share/FTP/out/lib/ +perl5 /share/FTP/out/xmltv/lib/perl5 /opt/lib/perl5/5.10.0/i686-linux + /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/i686-linux /op +t/lib/perl5/site_perl/5.10.0 /opt/lib/perl5/site_perl .) at /share/FT +P/out/lib/perl5/XML/Twig.pm line 100. BEGIN failed--compilation aborted at /share/FTP/out/lib/perl5/XML/Twig +.pm line 100. Compilation failed in require at /share/FTP/out/xmltv/lib/perl5/XMLTV. +pm line 106. BEGIN failed--compilation aborted at /share/FTP/out/xmltv/lib/perl5/XM +LTV.pm line 106. Compilation failed in require at /share/FTP/out/xmltv/lib/perl5/XMLTV/ +Supplement.pm line 21. BEGIN failed--compilation aborted at /share/FTP/out/xmltv/lib/perl5/XM +LTV/Supplement.pm line 21. Compilation failed in require at /share/FTP/out/xmltv/bin/tv_grab_it l +ine 233. BEGIN failed--compilation aborted at /share/FTP/out/xmltv/bin/tv_grab_ +it line 233.
Actually, the file XML/Parser.pm exists in the folder /share/FTP/out/lib/perl5/i486-linux-gnu-thread-multi; if I try to export that dir also like this:
# export PERL5LIB=/share/FTP/out/lib/perl5:/share/FTP/out/xmltv/lib/pe +rl5:/share/FTP/out/lib/perl5/i486-linux-gnu-thread-multi # /share/FTP/out/xmltv/bin/tv_grab_it /usr/bin/perl: symbol lookup error: /share/FTP/out/lib/perl5/i486-linu +x-gnu-thread-multi/auto/Storable/Storable.so: undefined symbol: Perl_ +Istack_sp_ptr
It seems that the XS modules cannot be deployed correctly.
I also tried to compile (with the same procedure) XMLTV on the QNAP using CPAN; the funny thing is that then it runs on the QNAP but it fails (with a similar error) on the Debian VM.
So my questions are: is this the correct procedure? How can I compile and deploy XML::Parser and the other Perl modules that require XS, like Storable, on another system?
I want to distribute that libraries on a custom folder and then make Perl load them; I need to build them in a virtual machine because of the other architectures (for example for armel I'm running QEMU with Debian versatile).
Please help me, I'm new to Perl and that has already been difficult for me to reach this point... Thank you, bye.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |