Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] MythTV / Perl binding issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Wed Sep 10, 2008 10:37 pm    Post subject: [SOLVED] MythTV / Perl binding issue Reply with quote

I'm trying to run /usr/share/mythtv/contrib/ipodexport.pl script from within Mythtv backend as a user job.

But it fails with
Code:
Net::UPnP::ControlPoint is not installed!
Please install Net::UPnP or copy ~/.mythtv/config.xml
from a working MythTV installation to /home/mythtv/.mythtv/config.xml.
Compilation failed in require at /usr/share/mythtv/contrib/ipodexport.pl line 19.
BEGIN failed--compilation aborted at /usr/share/mythtv/contrib/ipodexport.pl line 19.


Line 17-20 of ipodexport.pl:
Code:

  use DBI;
  use DBD::mysql;
> use MythTV;
   


So i'm assuming it can't find the perl bindings. Here is everything I know:

1) If I run ipodexport.pl from command line as 'root' it works perfect.

2) I changed my mythtv user login from:
Code:
mythtv:x:102:27:added by portage for mythtv:/dev/null:/bin/false

TO
Code:
mythtv:x:102:27:added by portage for mythtv:/home/mythtv:/bin/bash

so I could login as the mythtv user and run from command line, this also fails with the same error.


3) perl -V (as root)
Code:
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.19-gentoo-r5, archname=i686-linux
    uname='linux livecd 2.6.19-gentoo-r5 #1 smp tue apr 3 01:19:22 utc 2007 i686 intel(r) pentium(r) 4 cpu 2.40ghz genuineintel gnulinux '
    config_args='-des -Darchname=i686-linux -Dcccdlflags=-fPIC -Dccdlflags=-rdynamic -Dcc=i686-pc-linux-gnu-gcc -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dlocincpth=  -Doptimize=-O2 -march=i686 -funroll-loops -pipe -Duselargefiles -Dd_semctl_semun -Dscriptdir=/usr/bin -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dinstallman1dir=/usr/share/man/man1 -Dinstallman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dinc_version_list=5.8.0 5.8.0/i686-linux 5.8.2 5.8.2/i686-linux 5.8.4 5.8.4/i686-linux 5.8.5 5.8.5/i686-linux 5.8.6 5.8.6/i686-linux 5.8.7 5.8.7/i686-linux  -Dcf_by=Gentoo -Ud_csh -Dusenm -Di_ndbm -Di_gdbm -Di_db'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='i686-pc-linux-gnu-gcc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -march=i686 -funroll-loops -pipe',
    cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement'
    ccversion='', gccversion='4.1.2 (Gentoo 4.1.2 p1.1)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='i686-pc-linux-gnu-gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lpthread -lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.6.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.6.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO
  Built under linux
  Compiled at Aug 30 2008 12:13:30
  @INC:
    /etc/perl
    /usr/lib/perl5/vendor_perl/5.8.8/i686-linux
    /usr/lib/perl5/vendor_perl/5.8.8
    /usr/lib/perl5/vendor_perl/5.8.2
    /usr/lib/perl5/vendor_perl/5.8.2/i686-linux
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/site_perl/5.8.8/i686-linux
    /usr/lib/perl5/site_perl/5.8.8
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i686-linux
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/5.8.8/i686-linux
    /usr/lib/perl5/5.8.8
    /usr/local/lib/site_perl
    .


4) perl -V (as mythtv)
Code:

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.19-gentoo-r5, archname=i686-linux
    uname='linux livecd 2.6.19-gentoo-r5 #1 smp tue apr 3 01:19:22 utc 2007 i686 intel(r) pentium(r) 4 cpu 2.40ghz genuineintel gnulinux '
    config_args='-des -Darchname=i686-linux -Dcccdlflags=-fPIC -Dccdlflags=-rdynamic -Dcc=i686-pc-linux-gnu-gcc -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dlocincpth=  -Doptimize=-O2 -march=i686 -funroll-loops -pipe -Duselargefiles -Dd_semctl_semun -Dscriptdir=/usr/bin -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dinstallman1dir=/usr/share/man/man1 -Dinstallman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dinc_version_list=5.8.0 5.8.0/i686-linux 5.8.2 5.8.2/i686-linux 5.8.4 5.8.4/i686-linux 5.8.5 5.8.5/i686-linux 5.8.6 5.8.6/i686-linux 5.8.7 5.8.7/i686-linux  -Dcf_by=Gentoo -Ud_csh -Dusenm -Di_ndbm -Di_gdbm -Di_db'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='i686-pc-linux-gnu-gcc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -march=i686 -funroll-loops -pipe',
    cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement'
    ccversion='', gccversion='4.1.2 (Gentoo 4.1.2 p1.1)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='i686-pc-linux-gnu-gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lpthread -lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.6.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.6.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO
  Built under linux
  Compiled at Aug 30 2008 12:13:30
  @INC:
    /etc/perl
    /usr/lib/perl5/vendor_perl/5.8.8/i686-linux
    /usr/lib/perl5/vendor_perl/5.8.8
    /usr/lib/perl5/vendor_perl/5.8.2
    /usr/lib/perl5/vendor_perl/5.8.2/i686-linux
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/site_perl/5.8.8/i686-linux
    /usr/lib/perl5/site_perl/5.8.8
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i686-linux
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/5.8.8/i686-linux
    /usr/lib/perl5/5.8.8
    /usr/local/lib/site_perl
    .


File listing:
Code:

-r--r--r-- 1 mythtv root 1871 Aug 31 04:16 /usr/lib/perl5/vendor_perl/5.8.8/IO/Socket/INET/MythTV.pm
-r--r--r-- 1 mythtv root 33151 Aug 31 04:16 /usr/lib/perl5/vendor_perl/5.8.8/MythTV.pm
-r--r--r--  1 mythtv root  4372 Aug 31 04:16 /usr/lib/perl5/vendor_perl/5.8.8/MythTV/Channel.pm
-r--r--r--  1 mythtv root 20494 Aug 31 04:16 /usr/lib/perl5/vendor_perl/5.8.8/MythTV/Program.pm
-r--r--r--  1 mythtv root 23275 Aug 31 04:16 /usr/lib/perl5/vendor_perl/5.8.8/MythTV/Recording.pm
-r--r--r--  1 mythtv root  2601 Aug 31 04:16 /usr/lib/perl5/vendor_perl/5.8.8/MythTV/StorageGroup.pm
-rw-r--r-- 1 root root 612 Aug 31 05:01 /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/auto/MythTV/.packlist


I changed the owner to 'mythtv' user, it was 'root'.

I also noticed I still have a couple old perl libs in /usr/lib/perl5/5.8.0 and 5.8.2. Including a dir in vendor_per/5.8.2. Should I delete these old perl versions? I've already run 'perl-clearner all', it didn't help.

Any clues? I can't figure this out for the life of me.

Thanks

EDIT: just upgraded to media-tv/mythtv-0.21_p18116 and dev-lang/perl-5.8.8-r5


Last edited by BonesToo on Thu Sep 11, 2008 8:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Wed Sep 10, 2008 11:02 pm    Post subject: Reply with quote

Well, glad you got it... we never really had any input on anyone even using the perl stuff w/Myth so we just kinda slapped it in there, not knowing what anyone would do with it.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Thu Sep 11, 2008 12:37 am    Post subject: Reply with quote

ha, ok. So does that mean you are looking into it? Much appreciated.
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Thu Sep 11, 2008 5:02 pm    Post subject: Reply with quote

BonesToo wrote:
ha, ok. So does that mean you are looking into it? Much appreciated.


Not really. It was more like a "Huh, someone is actually using that thing. Interesting." kind of comment. :)
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1836

PostPosted: Thu Sep 11, 2008 8:02 pm    Post subject: Re: MythTV / Perl binding issue Reply with quote

BonesToo wrote:
I'm trying to run /usr/share/mythtv/contrib/ipodexport.pl script from within Mythtv backend as a user job.

But it fails with
Code:
Net::UPnP::ControlPoint is not installed!
Please install Net::UPnP or copy ~/.mythtv/config.xml
from a working MythTV installation to /home/mythtv/.mythtv/config.xml.
Compilation failed in require at /usr/share/mythtv/contrib/ipodexport.pl line 19.
BEGIN failed--compilation aborted at /usr/share/mythtv/contrib/ipodexport.pl line 19.



From what I've seen (someone correct me if I'm wrong) none of the gentoo perl ebuilds install Net::UPnP. However the mythtv perl scripts will still work as long as you have (as the above error indicates) the file ~/.mythtv/config.xml with the database login information (you can copy and modify /usr/share/mythtv/contrib/config.xml). This is a bit confusing, as mythtv itself does not require that, and will still use ~/.mythtv/mysql.txt as far as I know.

Another thing that can trip you up is that, when running any of those from a cron, you can't leave $HOME set to / as is the default. The last I tried, the mythtv perl stuff won't use /.mythtv/config.xml even if it exists, so you must change $HOME in any cron scripts that run them. I discovered all that when trying to get /usr/share/mythtv/contrib/optimize_mythdb.pl to run in a cron.

Tom
Back to top
View user's profile Send private message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Thu Sep 11, 2008 8:27 pm    Post subject: Reply with quote

Yup! You are right. I JUST figured this out too, as you posted it, ha.

But the weird thing I didn't notice was that gentoo uses /etc/mythtv as the backend user's home dir. As stated in first post, I changed the passwd file to use home dir /home/mythtv so I originally copied the file there and it didn't fix the backend. So now I got it all straightened out.

copy a working config.xml to /etc/mythtv/.mythtv/config.xml
got it ;)

Thanks so much! Now maybe the gentoo devs can fix this in the ebuilds.
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Thu Sep 11, 2008 10:07 pm    Post subject: Reply with quote

BonesToo wrote:
Thanks so much! Now maybe the gentoo devs can fix this in the ebuilds.


File a bug
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1836

PostPosted: Fri Sep 12, 2008 1:12 am    Post subject: Reply with quote

BonesToo wrote:

But the weird thing I didn't notice was that gentoo uses /etc/mythtv as the backend user's home dir.


Not as far as I can see:

Code:
su - mythtv
echo $HOME
/home/mythtv
grep mythtv /etc/passwd
mythtv:x:101:27:added by portage for mythtv:/home/mythtv:/bin/bash


Now I did upgrade from 0.20.2. Maybe the default when a mythtv user doesn't exist changed in 0.21, but that'd be pretty odd.

Tom
Back to top
View user's profile Send private message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Fri Sep 12, 2008 1:30 am    Post subject: Reply with quote

yeah, think it did change. Believe it or not I've been running the same gentoo box for 7 years now. It started off with 2.4.something and mythtv .11. Over the years I've been upgrading it, now i'm running 2.6.25 and myth 0.21. Never rebuilt from scratch. So who knows whats on my system.

EDIT: I think as of mythtv 0.21 it required a home/shell login for the mythtv user. 0.20 did not.
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1836

PostPosted: Fri Sep 12, 2008 2:55 pm    Post subject: Reply with quote

I originally installed at 0.20.1. That definitely created the user with a home of /home/mythtv and that's always where my working .mythtv directory and config files have been. It appears that the ebuild creates /etc/mythtv but does nothing with it at all.

Note however that I've never actually set a password for the user, as nothing ever logs in directly as mythtv. The backend runs from the init script of course, and I have the frontend starting from /etc/inittab. If I ever want to manually run anything and mythtv I just do "su - mythtv" as root.

Tom
Back to top
View user's profile Send private message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Fri Sep 12, 2008 4:08 pm    Post subject: Reply with quote

interesting

this is in my /etc/init.d/mythbackend:
Code:
start() {
        [ -z "${MYTH_VERBOSE}" ] && MYTH_VERBOSE="important,general"

        export QTDIR=/usr/qt/3
        export HOME=/etc/mythtv

        #fixes for bug #101308
        unset DISPLAY
        unset SESSION_MANAGER

        # Work around any strange permissions that may be on these files.
        chown -R mythtv /var/log/mythtv/
        chown -R mythtv /etc/mythtv/
        rm -rf /etc/mythtv/.qt

        ebegin "Starting MythTV Backend"
        start-stop-daemon --start --quiet --chuid mythtv \
                --exec /usr/bin/mythbackend \
                --make-pidfile --pidfile /var/run/mythbackend.pid \
                --background -- --verbose ${MYTH_VERBOSE} \
                --logfile /var/log/mythtv/mythbackend.log
        eend $?
}


But like I've said, this file has existed for 7 years and been merged by etc-update everytime. But, I've never edited this file by hand, so wouldn't those extra lines be removed by etc-update if they weren't in the ebuild?

The file's header:
Code:
# $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/files/mythbackend-0.18.2.rc,v 1.8 2007/06/12 15:49:37 cardoe Exp $

haha, version 0.18.2! 8O So what's that mean? Does this file not exist for 0.21? Should I convert HOME=/etc/mythtv to /home/mythtv ?

Thanks for all your help on this tld.
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1836

PostPosted: Sat Sep 13, 2008 5:18 pm    Post subject: Reply with quote

Wow...you're 100% correct! Mine is exactly like that. It's always worked because the default database connection information is in fact what I'm using. If I ever trued to change the mysql login information I would have been going nuts.

That's hard to figure given that the original ebuild I installed created the mythtv user with a home /home/mythtv. I wouldn't be surprised if that goes back to some version where the mythtv user was created with no home.

In your case (trying to run the perl script as a user job from the backend) it would in fact be using that. I never ran into problems as I never ran any of the perl stuff from within the backend.

I wonder if it wouldn't be a decent idea to have that home defined in /etc/conf.d/mythbackend....just a thought.

Tom
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 446

PostPosted: Wed Jun 17, 2009 4:56 pm    Post subject: Reply with quote

So I recently started getting the same error from my optimize_mythdb cron job. However, it still seems to run. Am I safe ignoring this error?
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1836

PostPosted: Thu Jun 18, 2009 4:00 pm    Post subject: Reply with quote

Nicias wrote:
So I recently started getting the same error from my optimize_mythdb cron job. However, it still seems to run. Am I safe ignoring this error?


Yes...as long as you're just getting this:

Code:
Net::UPnP::ControlPoint is not installed!


...and everything runs that means it found a config file with the connection information it needs.

Tom
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum