How do you build MythTV version 27 with QT5 on Debian Linux

For discussion of topics specific to MythTV on linux
Post Reply
dgriffin
Junior
Posts: 17
Joined: Fri Jan 02, 2015 11:08 pm
United States of America

How do you build MythTV version 27 with QT5 on Debian Linux

Post by dgriffin » Sun Feb 08, 2015 11:47 pm

How do you build MythTV version 27 with QT5 on Debian Linux?

I have all that I can find of QT5 installed from the Debian distribution, but I still get this message

<quote>
Error! QtWebkit headers not found
If you think configure made a mistake, make sure that you are using the latest
version of MythTV from git. If the latest version fails, report the problem to the
mythtv-dev@mythtv.org mailing list or IRC #mythtv on irc.freenode.net
Include the log file "config.ep" produced by configure as this will help
solving the problem.
</quote>

I am using the MythTV version for the "official" tarball
mythtv-fixes-0.27.tar.gz downloaded sometime in early November. "config.ep" is attached

Dan
Attachments
config.ep.txt
(236.53 KiB) Downloaded 117 times

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

Re: How do you build MythTV version 27 with QT5 on Debian Li

Post by stuarta » Mon Feb 09, 2015 3:17 pm

Lemme spin up a vm and do some tests on this...

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

Re: How do you build MythTV version 27 with QT5 on Debian Li

Post by stuarta » Mon Feb 09, 2015 4:51 pm

Well there's the error, it's not running the test with -DPIC on the compile line. I've built a 64bit VM and don't see that. What specific debian version are you trying to install?

Code: Select all

check_cxx -I//usr/include/i386-linux-gnu/qt5 -I//usr/include/i386-linux-gnu/qt5/QtCore
BEGIN /tmp/mythtv_conf.jJdUoOh2.cpp
    1	#include <QtWebKit/QtWebKit>
    2	int main(void){ return 0; }
END /tmp/mythtv_conf.jJdUoOh2.cpp
g++ -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DNDEBUG -fomit-frame-pointer -DQT_DISABLE_DEPRECATED_BEFORE -pthread -g -Wall -Wpointer-arith -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I//usr/include/i386-linux-gnu/qt5 -I//usr/include/i386-linux-gnu/qt5/QtCore -c -o /tmp/mythtv_conf.uVCPnGVl.o /tmp/mythtv_conf.jJdUoOh2.cpp
In file included from //usr/include/i386-linux-gnu/qt5/QtCore/qnamespace.h:45:0,
                 from //usr/include/i386-linux-gnu/qt5/QtCore/qobjectdefs.h:49,
                 from //usr/include/i386-linux-gnu/qt5/QtCore/qobject.h:48,
                 from //usr/include/i386-linux-gnu/qt5/QtCore/qabstractanimation.h:45,
                 from //usr/include/i386-linux-gnu/qt5/QtCore/QtCore:4,
                 from //usr/include/i386-linux-gnu/qt5/QtWebKit/QtWebKitDepends:2,
                 from //usr/include/i386-linux-gnu/qt5/QtWebKit/QtWebKit:3,
                 from /tmp/mythtv_conf.jJdUoOh2.cpp:1:
//usr/include/i386-linux-gnu/qt5/QtCore/qglobal.h:1034:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC or -fPIE."
Error! QtWebkit headers not found

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

Re: How do you build MythTV version 27 with QT5 on Debian Li

Post by stuarta » Mon Feb 09, 2015 9:30 pm

Okay, so I see the same error as you when I try to build on my Linux Mint 17 on a 32bit host. i'll investigate further

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

Re: How do you build MythTV version 27 with QT5 on Debian Li

Post by stuarta » Wed Feb 11, 2015 2:07 pm

So the issue is that the PIC code check is failing, however the difference is on 64bit platforms we move on regardless and add -fPIC to the compile flags, whilst on 32bit platforms we don't add -fPIC and it all blows up. Manually rerunning the QtWebKit test with -fPIC shows that it works, so just need to fix configure.

Code: Select all

check_cpp_condition stdlib.h defined(__PIC__) || defined(__pic__) || defined(PIC)
check_cpp
BEGIN /tmp/mythtv_conf.DIjrMGrE.c
    1   #include <stdlib.h>
    2   #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
    3   #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
    4   #endif
END /tmp/mythtv_conf.DIjrMGrE.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -E -o /tmp/mythtv_conf.fNSlSSuV.o /tmp/mythtv_conf.DIjrMGrE.c
/tmp/mythtv_conf.DIjrMGrE.c:3:2: error: #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
 #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
  ^

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

Re: How do you build MythTV version 27 with QT5 on Debian Li

Post by stuarta » Wed Feb 11, 2015 3:43 pm

Workaround is to pass `--enable-pic` to configure. Please be aware that 0.27 and Qt5 there are some things that just don't work. It's a configuration that we don't support.

Regards
Stuart

User avatar
stuartm
Developer
Posts: 129
Joined: Wed Feb 05, 2014 5:17 pm
Great Britain

Re: How do you build MythTV version 27 with QT5 on Debian Li

Post by stuartm » Thu Feb 12, 2015 6:48 pm

I'd just like to repeat what StuartA said, being able to build against QT5 does not mean 0.27 will work with QT5, it won't, there are a number of changes in QT5 which make it incompatible with applications developed against QT4. We don't support QT5 with 0.27, but we will in 0.28.

dgriffin
Junior
Posts: 17
Joined: Fri Jan 02, 2015 11:08 pm
United States of America

Re: How do you build MythTV version 27 with QT5 on Debian Li

Post by dgriffin » Mon Feb 16, 2015 5:51 pm

Thanks for the update, and information about not actually working until MythTV .28

Dan Griffin

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

Re: How do you build MythTV version 27 with QT5 on Debian Li

Post by stuarta » Wed Feb 18, 2015 12:02 pm

I've also pushed a fix to the git repo which will allow it to build. The basic things like playback work fine, there will be some things that just inexplicably do not work

Regards
Stuart

User avatar
stuartm
Developer
Posts: 129
Joined: Wed Feb 05, 2014 5:17 pm
Great Britain

Re: How do you build MythTV version 27 with QT5 on Debian Li

Post by stuartm » Thu Feb 19, 2015 5:18 pm

Scheduling is one of those things that won't work correctly, which means no recordings.

It's also likely to crash immediately upon startup without fixes which have been applied to 0.28

Post Reply