[mythtv-users] Cross-compiled win32 binaries failing to run
Lawrence Rust
lvr at softsystem.co.uk
Wed Dec 21 10:24:04 UTC 2011
On Tue, 2011-12-20 at 23:43 +0200, Markus Mattinen wrote:
> >
> > If you're using mythbuild.sh then the script should be setting the flags
> > appropriately. Just for the record what does mythtv/config.log contain?
> >
> config.log:
> ./configure --prefix=/home/markus/packages/usr/cross-windows-mythtv-git/mythinstall
> --runprefix=. --qmake=/home/markus/packages/usr/cross-windows-mythtv-git/mythbuild/qt-everywhere-opensource-src-4.7.0/bin/qmake
> --enable-cross-compile --cross-prefix=i486-mingw32-
> --target_os=mingw32 --arch=x86
> --sysinclude=/home/markus/packages/usr/cross-windows-mythtv-git/mythinstall/include
> --extra-cflags=-I/home/markus/packages/usr/cross-windows-mythtv-git/mythinstall/include
> --extra-cxxflags=-I/home/markus/packages/usr/cross-windows-mythtv-git/mythinstall/include
> --extra-libs=-L/home/markus/packages/usr/cross-windows-mythtv-git/mythinstall/lib
> --disable-avdevice --disable-avfilter --enable-libfftw3
> --disable-joystick-menu --disable-directfb --disable-lirc
> --disable-hdhomerun --disable-symbol-visibility --compile-type=debug
No problems here.
> > I have just built git master using mythbuild.sh - it needs this patch to
> > compile:
> > --- a/mythtv/libs/libmythtv/dtvrecorder.cpp
> > +++ b/mythtv/libs/libmythtv/dtvrecorder.cpp
> > @@ -330,7 +330,7 @@ static QDateTime ts_to_qdatetime(
> > uint64_t pts, uint64_t pts_first, QDateTime &pts_first_dt)
> > {
> > if (pts < pts_first)
> > - pts += 0x1FFFFFFFF;
> > + pts += Q_UINT64_C(0x1FFFFFFFF);
> > QDateTime dt = pts_first_dt;
> > return dt.addMSecs((pts - pts_first)/90);
> > }
> >
> > The built mythfrontend will run using Wine but needs "-O
> > ThemePainter=qt -O UIPainter=Qt" options.
> >
> >
>
> Interesting that I did not need to add such a patch. It always
> compiles without any errors, it's just the final product that won't
> run.
This leads me to believe that it's a 64-bit issue - the patch is not
necessary on a 64-bit system. However, if the target is 32-bit (which
it should be here) then a conforming cross compiler should issue a
diagnostic (error). So maybe it's the 64-bit mingw tools that are
producing incorrect output. I'm sticking with a 32-bit PAE system for
the present because of these niggles. It might prove useful to setup a
32-bit VirtualBox (or similar) environment to cross compile, which is a
known good route.
Have you tried setting the cpu type i.e. adding "-c i686" to the
mythbuild.sh invocation? Maybe that might provide a solution.
--
Lawrence
More information about the mythtv-users
mailing list