Skip to content

Install of XMLTV::Usage is impossible on armhf/perl #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Paullux opened this issue Sep 10, 2017 · 12 comments
Closed

Install of XMLTV::Usage is impossible on armhf/perl #45

Paullux opened this issue Sep 10, 2017 · 12 comments

Comments

@Paullux
Copy link

Paullux commented Sep 10, 2017

I need to install XMLTV to run a script on my Raspberry Pi with an ARM CPU.

~ # docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp armhf/perl:5.24.1 perl 
tv_grab_fr_telerama --config-file=/storage/.xmltv/tv_grab_fr_telerama.conf --output=/media/My\ Passport/IPTV/xmltv/complet.xml
Can't locate XMLTV/Usage.pm in @INC (you may need to install the XMLTV::Usage module) (@INC contains: /usr/local/lib/perl5/site_perl/5.24.1/arm-linux-gnueabihf-64int /usr/local/lib/perl5/site_perl/5.24.1 /usr/local/lib/perl5/5.24.1/arm-linux-gnueabihf-64int /usr/local/lib/perl5/5.24.1 .) at tv_grab_fr_telerama line 333.
BEGIN failed--compilation aborted at tv_grab_fr_telerama line 333.

But I have an error when i try to install it :

~ # docker run armhf/perl:latest cpan install XMLTV::Usage
Loading internal null logger. Install Log::Log4perl for logging messages

CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.

Would you like to configure as much as possible automatically? [yes] yes
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/01mailrc.txt.gz
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/02packages.details.txt.gz
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Sat, 09 Sep 2017 23:17:03 GMT
  HTTP::Date not available
.............
  New CPAN.pm version (v2.16) available.
  [Currently running version is v2.11]
  You might want to try
    install CPAN
    reload cpan
  to both upgrade CPAN.pm and run the new version without leaving
  the current session.


...............................................................DONE
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/03modlist.data.gz
Reading '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Writing /root/.cpan/Metadata
Running install for module 'XMLTV::Usage'
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/E/ED/EDAVIS/xmltv-0.5.33.tar.gz
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/E/ED/EDAVIS/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/E/ED/EDAVIS/xmltv-0.5.33.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring E/ED/EDAVIS/xmltv-0.5.33.tar.gz with Makefile.PL

Choose which optional components of xmltv you want to install.  The
XMLTV.pm library and the filter programs such as tv_grep and tv_sort
are installed by default; here you choose grabbers for different
countries and front-ends for managing listings.

Alternative grabber for Britain (tv_grab_uk_rt)                    [no]
Grabber for Italy (tv_grab_it)                                     [yes]
Grabber for North America using DataDirect (tv_grab_na_dd)         [no]
Grabber for North American Channel Icons (tv_grab_na_icons)        [no]
Grabber for New Zealand (tv_grab_nz)                               [yes]
Grabber for Finland (tv_grab_fi)                                   [no]
Grabber for Spain - Analogic Terrestrial/Cable (tv_grab_es)        [no]
Grabber for Spain - Digital Satellite (D+) (tv_grab_es_digital)    [no]
Grabber for the Netherlands (tv_grab_nl)                           [no]
Alternative grabber for the Netherlands (tv_grab_nl_wolf)          [no]
Grabber for Hungary (tv_grab_hu)                                   [no]
Grabber for Denmark (tv_grab_dk)                                   [no]
Grabber for Japan (tv_grab_jp)                                     [no]
Grabber for Germany (tv_grab_de_tvtoday)                           [no]
Grabber for Sweden (tv_grab_se)                                    [no]
Grabber for France (tv_grab_fr)                                    [no]
Grabber for Norway (tv_grab_no)                                    [no]
Grabber for Portugal (tv_grab_pt)                                  [no]
Program to report exceptions and changes in a schedule (tv_check)  [no]
CGI program to filter listings (to install manually) (tv_pick_cgi) [no]

Do you want to proceed with this configuration? [yes,no (default=yes)] 
* Alternative grabber for Britain (tv_grab_uk_rt)

These dependencies are missing for tv_grab_uk_rt:

HTML::Entities (version 1.27 or higher)

Do you wish to install tv_grab_uk_rt? [yes,no (default=no)] 
* Grabber for Italy (tv_grab_it)

Do you wish to install tv_grab_it? [yes,no (default=yes)] 
* Grabber for North America using DataDirect (tv_grab_na_dd)

These dependencies are missing for tv_grab_na_dd:

SOAP::Lite

Do you wish to install tv_grab_na_dd? [yes,no (default=no)] 
* Grabber for North American Channel Icons (tv_grab_na_icons)

These dependencies are missing for tv_grab_na_icons:

HTML::TableExtract
WWW::Mechanize (version 1.02 or higher)

Do you wish to install tv_grab_na_icons? [yes,no (default=no)] 
* Grabber for New Zealand (tv_grab_nz)

Do you wish to install tv_grab_nz? [yes,no (default=yes)] 
* Grabber for Finland (tv_grab_fi)

These dependencies are missing for tv_grab_fi:

HTML::TreeBuilder

Do you wish to install tv_grab_fi? [yes,no (default=no)] 
* Grabber for Spain - Analogic Terrestrial/Cable (tv_grab_es)

These dependencies are missing for tv_grab_es:

HTML::TreeBuilder

Do you wish to install tv_grab_es? [yes,no (default=no)] 
* Grabber for Spain - Digital Satellite (D+) (tv_grab_es_digital)

These dependencies are missing for tv_grab_es_digital:

HTML::TreeBuilder

Do you wish to install tv_grab_es_digital? [yes,no (default=no)] 
* Grabber for the Netherlands (tv_grab_nl)

These dependencies are missing for tv_grab_nl:

HTML::TreeBuilder

Do you wish to install tv_grab_nl? [yes,no (default=no)] 
* Alternative grabber for the Netherlands (tv_grab_nl_wolf)

These dependencies are missing for tv_grab_nl_wolf:

HTML::TreeBuilder

Do you wish to install tv_grab_nl_wolf? [yes,no (default=no)] 
* Grabber for Hungary (tv_grab_hu)

These dependencies are missing for tv_grab_hu:

HTML::TreeBuilder

Do you wish to install tv_grab_hu? [yes,no (default=no)] 
* Grabber for Denmark (tv_grab_dk)

These dependencies are missing for tv_grab_dk:

HTML::TreeBuilder

Do you wish to install tv_grab_dk? [yes,no (default=no)] 
* Grabber for Japan (tv_grab_jp)

These dependencies are missing for tv_grab_jp:

HTML::TreeBuilder
Text::Kakasi

Do you wish to install tv_grab_jp? [yes,no (default=no)] 
* Grabber for Germany (tv_grab_de_tvtoday)

These dependencies are missing for tv_grab_de_tvtoday:

HTML::Entities (version 1.27 or higher)
HTML::TreeBuilder

Do you wish to install tv_grab_de_tvtoday? [yes,no (default=no)] 
* Grabber for Sweden (tv_grab_se)

These dependencies are missing for tv_grab_se:

XML::LibXML

Do you wish to install tv_grab_se? [yes,no (default=no)] 
* Grabber for France (tv_grab_fr)

These dependencies are missing for tv_grab_fr:

HTML::Entities (version 1.27 or higher)
HTML::TreeBuilder

Do you wish to install tv_grab_fr? [yes,no (default=no)] 
* Grabber for Norway (tv_grab_no)

These dependencies are missing for tv_grab_no:

HTML::Entities (version 1.27 or higher)
HTML::LinkExtractor
HTML::TableExtract

Do you wish to install tv_grab_no? [yes,no (default=no)] 
* Grabber for Portugal (tv_grab_pt)

These dependencies are missing for tv_grab_pt:

HTML::TreeBuilder

Do you wish to install tv_grab_pt? [yes,no (default=no)] 
* Program to report exceptions and changes in a schedule (tv_check)

These dependencies are missing for tv_check:

Tk
Tk::TableMatrix

Do you wish to install tv_check? [yes,no (default=no)] 
* CGI program to filter listings (to install manually) (tv_pick_cgi)

These dependencies are missing for tv_pick_cgi:

CGI

Do you plan to run tv_pick_cgi? [yes,no (default=no)] Module Date::Manip seems not to be installed.
Module LWP seems not to be installed.
Module XML::Parser seems not to be installed.
Module XML::Twig seems not to be installed.
Module XML::Writer seems not to be installed.
Module Lingua::EN::Numbers::Ordinate seems not to be installed.
Module Lingua::Preferred seems not to be installed.
Module Term::ProgressBar seems not to be installed.
Module Unicode::String seems not to be installed.
Required modules missing, 'make' is unlikely to work
Warning: prerequisite Date::Manip 5.42 not found.
Warning: prerequisite LWP 5.65 not found.
Warning: prerequisite XML::Parser 2.34 not found.
Warning: prerequisite XML::Twig 3.1 not found.
Warning: prerequisite XML::Writer 0.4.6 not found.
Date::Manip 5.42 is required.
LWP 5.65 is required.
XML::Parser 2.34 is required.
XML::Twig 3.1 is required.
XML::Writer 0.4.6 is required.
Lingua::EN::Numbers::Ordinate is recommended.
Lingua::Preferred 0.2.4 is recommended.
Term::ProgressBar 2.03 is recommended.
Unicode::String is recommended.
Checking if your kit is complete...
Looks good
bad makefile line: '	$(NOECHO) $(NOOP)' at Makefile.PL line 944.
Warning: No success on command[/usr/local/bin/perl Makefile.PL]
  EDAVIS/xmltv-0.5.33.tar.gz
  /usr/local/bin/perl Makefile.PL -- NOT OK

How to resolve this problem ?

@zakame
Copy link
Member

zakame commented Sep 10, 2017

Hi @Paullux, thanks for the report!

I just checked xmltv and it does seem to be like one of those rare modules that has been maintained elsewhere instead, as it now seems that the updated upstream dist (0.5.69, compared to CPAN's 0.5.33) is on SourceForge.

As the newest version needs at least Term::ReadKey installed first before it can even run its Makefile.PL, here's a sample Dockerfile to build a Docker image with xmltv that you can use with your script:

FROM armhf/perl:5.24.1
RUN curl -SLO https://sourceforge.net/projects/xmltv/files/xmltv/0.5.69/xmltv-0.5.69.tar.bz2 \
    && tar xjf xmltv-0.5.69.tar.bz2 \
    && cd xmltv-0.5.69 \
    && cpanm Term::ReadKey \
    && echo y | cpanm --verbose .

If you build that into e.g. an xmltv image, then you can now do

docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp xmltv perl 
tv_grab_fr_telerama <your-options-here>...

@Paullux
Copy link
Author

Paullux commented Sep 10, 2017

Thank that works correctly but i needed add modules at xmltv image :

FROM armhf/perl:5.24.1
RUN curl -SLO https://sourceforge.net/projects/xmltv/files/xmltv/0.5.69/xmltv-0.5.69.tar.bz2
&& tar xjf xmltv-0.5.69.tar.bz2
&& cd xmltv-0.5.69
&& cpanm Term::ReadKey
&& cpanm JSON
&& cpanm Date::Parse
&& cpanm LWP::Protocol::https
&& echo y | cpanm --verbose .

@Paullux Paullux closed this as completed Sep 10, 2017
@zakame
Copy link
Member

zakame commented Sep 10, 2017

Glad it worked! 👍

@Paullux
Copy link
Author

Paullux commented Sep 10, 2017

I am having another problem.
I can launch my script with docker
I can launch it from a bash script on my system
but if I launch my script from cron on my system : the script bash launched but docker command did not launched.
You know to resolve it ?

@zakame
Copy link
Member

zakame commented Sep 10, 2017

Tried using the full path to the docker executable? What error does it show?

@Paullux
Copy link
Author

Paullux commented Sep 10, 2017

error backup.log just after the launch of the script by cronie (it's like the docker isn't launch)

lancé
/storage
copie en cours
finit

script :

#!/bin/bash
echo "lancé"
echo $PWD
DIR=/storage/
/storage/.kodi/addons/service.system.docker/bin/docker run -it --rm --name my-running-script -v "$DIR":/usr/src/myapp -w /usr/src/myapp xmltv perl tv_grab_fr_telerama --config-file=tv_grab_fr_telerama.conf --output=complet.xml
echo "copie en cours"
cp complet.xml /media/My\ Passport/IPTV/complet.xml
echo "finit"
exit 0

crontab :

22 15 * * * sh -c "/storage/MiseAJourEPG.sh" > ~/backup.log &
0 4 * * * systemctl restart kodi

@zakame
Copy link
Member

zakame commented Sep 10, 2017

Hmm, try using /bin/bash instead of sh -c in your crontab (or even remove it entirely and make your script executable instead) since that's what you're using in your script's shebang.

@Paullux
Copy link
Author

Paullux commented Sep 10, 2017

I tried with /bin/bash and without
now my crontab is

39 15 * * * /storage/MiseAJourEPG.sh > ~/backup.log &
0 4 * * * systemctl restart kodi

And there is the same issue.
But the command /storage/MiseAJourEPG.sh in terminal works correctly.

@zakame
Copy link
Member

zakame commented Sep 10, 2017

Ah, I missed your invocation of docker run --rm -it ..., try without -it, since your cron won't have a tty for interactive sessions.

@zakame
Copy link
Member

zakame commented Sep 10, 2017

You might also consider to use something like https://github.com/MasteryConnect/docker-cron

@Paullux
Copy link
Author

Paullux commented Sep 10, 2017

thank you remove "-it" was the good solution

@tianon
Copy link
Contributor

tianon commented Sep 11, 2017

Also worth noting that https://hub.docker.com/r/armhf/perl/ is deprecated (as noted in the image description), and that with #43, it should be possible to build arm32v7/perl officially (just waiting on a PR to https://github.com/docker-library/official-images/blob/d9182833f0bb995e1bd022be53acaf013e3e9a6e/library/perl). 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants