[mythtv-users] Cross-compiled win32 binaries failing to run

Lawrence Rust lvr at softsystem.co.uk
Mon Dec 19 22:24:29 UTC 2011


On Mon, 2011-12-19 at 21:19 +0200, Markus Mattinen wrote:
> Hello mythtv-users,
> 
> I've been trying to cross-compile Mythtv master branch (mainly
> interested in the frontend) for Windows.
> Compiling works fine, but the resulting .exe just doesn't seem to do
> anything (it exits immediately without any error messages).
> Cross-compiling was done in mingw32 on my laptop with 64bit Arch Linux
> and Core i5 450M cpu.
> I tried running the .exe in both Wine on the laptop and Windows 7 on
> my desktop (64 bit Windows 7 Home Premium, Core i3 2100 cpu).
> 
> For compiling, I was following the instructions on this site:
> http://www.softsystem.co.uk/mythtv/index.htm
> using the build script in
> http://www.softsystem.co.uk/download/mythtv/mythbuild-CURRENT.zip.

What version of Myth are you building?  The safe bet is fixes/0.24.1
The script sometimes falls behind git master due to adding/removing
libraries.  If that's the case then let me know and I'll get it fixed.

It's also important to apply patches for fixes/0.24.  The build script
comes with a lot of patches to workaround build and runtime problems.
Some of the later patches to Myth add functionality and can be removed
if desired.

I note that the current git master won't cross compile for Windows.
I'll bug report this later.

> I also tried the other guide that involves installing Mingw32&MSys on
> Windows, but that one resulted in a bunch of "out of memory" errors in
> make and ld.exe (I have 8GB of RAM on the Windows desktop, so must be
> that 2GB/process limitation in 32 bit Windows processes).

Building with MSys always seems to generate a lot of out of memory
errors.  I have reported this bug before but there doesn't appear to be
a fix yet.  The workaround is to simply restart the build script which
then continues for another few minutes.  The final output does appear to
be correct.

> I did eventually manage to compile a release version, but running the
> resulting mythfrontend.exe resulted in the error "The application was
> unable to start correctly (0xc0000142). Click OK to close the
> application."
> Apparently something to do with failing to load DLLs?
> I never managed to compile a debug version on Windows because of the
> ld.exe out of memory problems.

IMHO the best way to produce a debug version is to cross compile.  The
native MSys environment/tools seem too flaky.

The most common runtime problem is DirectX GUI drawing.  In my
experience it's safer to force the Qt UI painter by adding -O
ThemePainter=qt -O UIPainter=Qt to the mythfrontend command line.  Then
go to settings and specify Qt as the default UI painter.

> Any help or suggestions would be welcome.
> If some more information or log/debug output is needed, I can try to
> get it.

If you can cross compile a debug version and run that with gdb or Wine
and post me a backtrace maybe I can help.

It's most useful to start testing with Wine on the build machine.  When
that all works then copy the installer exe to the target Windows machine
and install/run it.

-- 
Lawrence


More information about the mythtv-users mailing list