How to change from Packaged Mythtv to git

For discussion of topics specific to MythTV on linux
Post Reply
halucigenia
Junior
Posts: 71
Joined: Tue Nov 11, 2014 11:03 am
Great Britain

How to change from Packaged Mythtv to git

Post by halucigenia » Sat Feb 21, 2015 2:29 pm

I have a working mythtv backend installation on Kubuntu 3.16.0-031600-generic which has been installed from ppa.launchpad.net/mythbuntu/0.27/ubuntu utopic main and I would like to change to a version built from git (specifically to test out code to support DVB-T2 on tuners that do not auto-switch between DVB-T and DVB-T2 https://github.com/dcjm/mythtv)

I have managed to configure and make from git but don't want to install without being sure that it will not break my working system.

An suggestions appreciated.

User avatar
bill6502
Developer
Posts: 1098
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: How to change from Packaged Mythtv to git

Post by bill6502 » Sat Feb 21, 2015 5:06 pm

Hi,

Stop the backend.

The obvious one, backup your DB with: mythconverg_backup.pl.

When I did it, I did a chmod a-x /usr/bin/myth* just so I didn't
hurt myself due to some $PATH variable not set with /usr/local/bin
before /usr/bin.

Unless you've changed the --runprefix in ./configure, the output
will be in /usr/local/... Modify /etc/init/mythtv-backend.conf to
start the backend in the new location. It's /usr/bin/mythbackend
now.

I like this upstart feature when doing something like this. In a file
named: /etc/init/mythtv-backend.override, add the single line: manual
and then if there's an unplanned reboot/restart, the backend won't
start until you change manual to #manual. When you're ready, then
start the backend like this: sudo mythbackend --user mythtv --logpath /tmp
The obvious file in /tmp is handy if your screen gets cleared.

I had no problems doing the conversion, but I seem to recall mentioning
doing a backup 1st.

akgrant0710
Newcomer
Posts: 9
Joined: Mon Jan 19, 2015 7:07 pm
Australia

Re: How to change from Packaged Mythtv to git

Post by akgrant0710 » Sat Feb 21, 2015 5:15 pm

There are also some reasonably detailed instructions from one of the developers as part of a thread titled "random livetv stalls", see:

http://www.gossamer-threads.com/lists/e ... ist=mythtv

The second response from jyavenard.

akgrant0710
Newcomer
Posts: 9
Joined: Mon Jan 19, 2015 7:07 pm
Australia

Re: How to change from Packaged Mythtv to git

Post by akgrant0710 » Sat Feb 21, 2015 5:18 pm

akgrant0710 wrote:There are also some reasonably detailed instructions from one of the developers as part of a thread titled "random livetv stalls", see:

http://www.gossamer-threads.com/lists/e ... ist=mythtv

The second response from jyavenard.
I should add: I assume that you just want to run this temporarily to test the patch, and that the compiled version is the same as the installed version, i.e. there isn't any need to do a database update.

halucigenia
Junior
Posts: 71
Joined: Tue Nov 11, 2014 11:03 am
Great Britain

Re: How to change from Packaged Mythtv to git

Post by halucigenia » Sun Feb 22, 2015 10:15 am

Thanks all. I will give this a try today.

halucigenia
Junior
Posts: 71
Joined: Tue Nov 11, 2014 11:03 am
Great Britain

Re: How to change from Packaged Mythtv to git

Post by halucigenia » Sun Feb 22, 2015 11:34 am

OK, that did not work. I followed the "The second response from jyavenard." from the link as it seems to be the best approach when testing something before going to use it in your main Mythtv setup. But I got

Code: Select all

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE

Cannot login to database

Would you like to configure the database connection now? [no]  
[console is not interactive, using default 'no']
When running

Code: Select all

LD_LIBRARY_PATH=/usr/local/mythtv-dev/lib /usr/local/mythtv-dev/bin/mythbackend --syslog local7 --user mythtv --daemon -v file 
The good news is that when I restart mythbackend normally everything seems OK.

akgrant0710
Newcomer
Posts: 9
Joined: Mon Jan 19, 2015 7:07 pm
Australia

Re: How to change from Packaged Mythtv to git

Post by akgrant0710 » Sun Feb 22, 2015 3:07 pm

halucigenia wrote:OK, that did not work. I followed the "The second response from jyavenard." from the link as it seems to be the best approach when testing something before going to use it in your main Mythtv setup. But I got

Code: Select all

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE

Cannot login to database
...
I would guess that you don't have all the necessary development libraries installed. The complete list I used when building mythtv was:

Code: Select all

$ sudo apt-get install git
$ sudo apt-get install yasm libx264-dev libxvidcore-dev libpulse-dev
$ sudo apt-get install mysql-client mysql-server libmysqlclient-dev libqt4-sql-mysql libqt4-sql
$ sudo apt-get install uuid-dev libtag1-dev libxinerama-dev
$ sudo apt-get install python-lxml python-mysqldb python-urlgrabber
$ sudo apt-get install libasound2-dev
# MythMusic plugins
$ sudo apt-get install libmad0 libmad0-dev libflac-dev libcdaudio-dev cdparanoia libfftw3-dev
My guess of what you are missing: libmysqlclient-dev libqt4-sql-mysql libqt4-sql

This was on Ubuntu, but I assume Kubuntu will be similar.

halucigenia
Junior
Posts: 71
Joined: Tue Nov 11, 2014 11:03 am
Great Britain

Re: How to change from Packaged Mythtv to git

Post by halucigenia » Mon Feb 23, 2015 7:53 am

I did do

Code: Select all

sudo apt-get build-dep mythtv
before compiling.

So I have the development libraries you think might be missing akgrant0710

Code: Select all

sudo apt-get install libmysqlclient-dev libqt4-sql-mysql libqt4-sql
[sudo] password for jeff: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libqt4-sql is already the newest version.
libqt4-sql-mysql is already the newest version.
libmysqlclient-dev is already the newest version.
Now what?
Could it be a ./configure parameter missing? I just used

Code: Select all

./configure --compile-type=debug --prefix=/usr/local/mythtv-dev
as per the link above.

I could not access MythTV HOWTO 0.27 yesterday to check the prerequisites etc. but had been through them before. Though now I see it again...
Could it be that

Code: Select all

echo /usr/local/lib >> /etc/ld.so.conf.d/mythtv.conf
Should be

Code: Select all

echo /usr/local/mythtv-dev/lib>> /etc/ld.so.conf.d/mythtv.conf
When

Code: Select all

--prefix=/usr/local/mythtv-dev
as per "response from jyavenard".

akgrant0710
Newcomer
Posts: 9
Joined: Mon Jan 19, 2015 7:07 pm
Australia

Re: How to change from Packaged Mythtv to git

Post by akgrant0710 » Wed Feb 25, 2015 5:25 am

halucigenia wrote: ...
Could it be that

Code: Select all

echo /usr/local/lib >> /etc/ld.so.conf.d/mythtv.conf
Should be

Code: Select all

echo /usr/local/mythtv-dev/lib>> /etc/ld.so.conf.d/mythtv.conf
When

Code: Select all

--prefix=/usr/local/mythtv-dev
as per "response from jyavenard".
I'm getting out of my depth here - I don't have access to my mythtv system (currently in hospital having just had my gallbladder removed), but no one else has responded, so a few points that will hopefully help:
  • Yes, it should be /usr/local/mythtv-dev/lib
  • The command above appends /usr/local/mythtv-dev/lib to mythtv.conf. Pointing to both /usr/local/lib and /usr/local/mythtv-dev/lib is likely to result in confusion.
  • Do you plan to run this configuration for an extended period of time? Modifying /etc/ld.so.conf.d is something that could easily be forgotten, causing problems later on (which is probably why JYA suggested setting LD_LIBRARY_PATH as part of the command line.
  • If you do decide to modify ld.so.conf, don't forget to run /sbin/ldconfig after updating /etc/ld.so.conf.d/mythtv.conf
  • Are you trying to run Qt4 or Qt5?
  • Did you set the PATH and QTDIR as per the HOWTO wiki page?
  • Make sure libqsqlmysql.so is installed and is pointed to by QTDIR. On my system it's: /usr/lib/x86_64-linux-gnu/qt4/plugins/sqldrivers/libqsqlmysql.so
  • Perhaps post the output of your configure command

halucigenia
Junior
Posts: 71
Joined: Tue Nov 11, 2014 11:03 am
Great Britain

Re: How to change from Packaged Mythtv to git

Post by halucigenia » Sat Feb 28, 2015 4:36 pm

akgrant0710 wrote: I'm getting out of my depth here - I don't have access to my mythtv system (currently in hospital having just had my gallbladder removed), but no one else has responded, so a few points that will hopefully help:
  • Yes, it should be /usr/local/mythtv-dev/lib
  • The command above appends /usr/local/mythtv-dev/lib to mythtv.conf. Pointing to both /usr/local/lib and /usr/local/mythtv-dev/lib is likely to result in confusion.
  • Do you plan to run this configuration for an extended period of time? Modifying /etc/ld.so.conf.d is something that could easily be forgotten, causing problems later on (which is probably why JYA suggested setting LD_LIBRARY_PATH as part of the command line.
  • If you do decide to modify ld.so.conf, don't forget to run /sbin/ldconfig after updating /etc/ld.so.conf.d/mythtv.conf
  • Are you trying to run Qt4 or Qt5?
  • Did you set the PATH and QTDIR as per the HOWTO wiki page?
  • Make sure libqsqlmysql.so is installed and is pointed to by QTDIR. On my system it's: /usr/lib/x86_64-linux-gnu/qt4/plugins/sqldrivers/libqsqlmysql.so
  • Perhaps post the output of your configure command
So, it's either Modifying /etc/ld.so.conf.d or setting LD_LIBRARY_PATH as part of the command line?

I am expecting to be running Qt4.

On my system it's: /usr/lib/x86_64-linux-gnu/qt4/plugins/sqldrivers/libqsqlmysql.so too

Does $QTDIR and $PATH require to be pointed to /usr/lib/x86_64-linux-gnu/qt4 then, or the full path?
I tried both but still no luck...
I still get the

Code: Select all

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE

Cannot login to database
...
When trying to run it with

Code: Select all

LD_LIBRARY_PATH=/usr/local/mythtv-dev/lib /usr/local/mythtv-dev/bin/mythbackend --syslog local7 --user mythtv --daemon -v file

Code: Select all

./configure --compile-type=debug --prefix=/usr/local/mythtv-dev
# Basic Settings
Compile type              debug
Compiler cache            yes
DistCC                    no
qmake                     /usr/bin/qmake
install prefix            /usr/local/mythtv-dev
runtime prefix            /usr/local/mythtv-dev
CPU                       x86 x86_64 (model name        : AMD Phenom(tm) II X4 940 Processor)
yasm                      yes
MMX enabled               yes
MMXEXT enabled            yes
3DNow! enabled            yes
3DNow! extended enabled   yes
SSE enabled               yes
SSSE3 enabled             yes
AVX enabled               yes
FMA4 enabled              yes
CMOV enabled              yes

# Input Support
Joystick menu             yes
lirc support              yes
libCEC device support     no [/usr/include]
Video4Linux support       yes
ivtv support              yes
HD-PVR support            yes
FireWire support          yes
DVB support               yes [/usr/include]
DVB-S2 support            yes
HDHomeRun support         yes
Ceton support             yes
ASI support               no

# Sound Output Support
PulseAudio support        yes
OSS support               yes
ALSA support              yes
JACK support              no
libfftw3 support          yes

# Video Output Support
x11 support               yes
xrandr support            yes
xv support                yes
VDPAU support             yes
VAAPI support             yes
CrystalHD support         yes
OpenGL video              yes
MHEG support              yes
libass subtitle support   yes

# Misc Features
multi threaded libavcodec yes
libxml2 support           yes [/usr/include/libxml2]
libdns_sd (Bonjour)       yes
libcrypto                 yes
Frontend                  yes
Backend                   yes
OpenGL ES 2.0             no
mythlogserver             yes

# Bindings
bindings_perl             yes
bindings_python           yes
bindings_php              yes

# External Codec Options
mp3lame                   no
faac                      no
xvid                      no
x264                      no
vpx                       no
SDL                       no

Creating libs/libmythbase/mythconfig.h and libs/libmythbase/mythconfig.mak

Configuring zeromq...
Configuring nzmqt...
Configuring qjson...
Configuring libhdhomerun...
Configuring libmythbluray...
Configuring libsamplerate...
At this rate the fix I am after will be in the packaged version before I can get to test it.

Thanks for the advice and rest up after the op safely.
I hope that the operation went smoothly. Keyhole was it?
When I got my gallbladder removed it was necrotic so they had to open me right up to get it out.
Good riddance to the gallbladder and the pain it caused while it was necrotising though.
Funny thing; I find that I cough after eating since the gallbladder got taken out.

akgrant0710
Newcomer
Posts: 9
Joined: Mon Jan 19, 2015 7:07 pm
Australia

Re: How to change from Packaged Mythtv to git

Post by akgrant0710 » Mon Mar 02, 2015 6:35 am

halucigenia wrote: So, it's either Modifying /etc/ld.so.conf.d or setting LD_LIBRARY_PATH as part of the command line?
I believe so.
halucigenia wrote: Does $QTDIR and $PATH require to be pointed to /usr/lib/x86_64-linux-gnu/qt4 then, or the full path?
I tried both but still no luck...
I still get the

Code: Select all

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
[/quote]

It might be worthwhile re-reading [url=https://www.mythtv.org/wiki/MythTV-HOWTO_-_0.27#Environment_variable_requirements_for_MythTV]MythTV-HOWTO_-_0.27[/url].  It shows that QTDIR should be /usr/lib/x86_64-linux-gnu/qt4, not the full path.

Note that QTDIR and PATH need to be defined at compile time, and that you should be building with qmake.

[quote="halucigenia"]
Thanks for the advice and rest up after the op safely.
I hope that the operation went smoothly. Keyhole was it?
When I got my gallbladder removed it was necrotic so they had to open me right up to get it out.
Good riddance to the gallbladder and the pain it caused while it was necrotising though.
Funny thing; I find that I cough after eating since the gallbladder got taken out.
[/quote]

Yep, keyhole surgery, thankfully.  I'm not coughing, but my digestive system is still so upset that I can't tolerate any sugar or milk, I haven't tried any oil - hopefully that will all change soon. :-)

User avatar
stuarta
Developer
Posts: 196
Joined: Wed Feb 05, 2014 5:13 pm
Great Britain

Re: How to change from Packaged Mythtv to git

Post by stuarta » Mon Mar 02, 2015 4:24 pm

halucigenia wrote:OK, that did not work. I followed the "The second response from jyavenard." from the link as it seems to be the best approach when testing something before going to use it in your main Mythtv setup. But I got

Code: Select all

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE

Cannot login to database

Would you like to configure the database connection now? [no]  
[console is not interactive, using default 'no']
Have you got the qt mysql driver installed? It's not a build time dependency, so it won't get pulled in by apt-get build-dep mythtv.

The package you are after is libqt4-sql-mysql (deb based distros), qt-mysql (rpm based distros)

Post Reply