[mythtv] Building MythTV under Cygwin: Success!!! (is closer now)

Jerry Rubinow jerrymr at gmail.com
Thu May 17 01:21:45 UTC 2007

Hi Andrew,

I'm one of the people who was working on a previous Windows port, using Myth
compiled with cygwin and Q/Win (or whatever that fork was called) compiled
using mingw.

On 5/16/07, Andrei Tanas <andrei at tanas.ca> wrote:
> The culprit for mythui crashing under cygwin was the undefined references.
> Instead of masking them with -Wl,--noinhibit-exec they needed to be
> solved.
> Windows dlls work differently from *nix dynamic libraries, a code that
> imports a function needs to know exactly which library it's being imported
> from (if there's a way to "teach" cygwin/gcc to do it differently, I would
> like to know). The two main libs: myth and mythui refer each other, it was
> a typical "chicken and egg" situation: there was no way to build one
> before
> building another without having to ignore undefined references (which
> ultimately led to segfaults). I had to create export definition file and
> import library for libmythui to build libmyth and libmythtv, after that it
> was fairly simple.

I got as far as you did - I thought we ended up creating export libs in the
patches we submitted, because code would link and run, up to a point.

I am working with QT/X11 under cygwin. Apparently, this is not the best way
> to do things, it would make so much more sense to use QT/Windows with no X
> dependencies. I also think it could be the reason that DirectDraw
> initialization fails. Someone mentioned something about using QT/Windows
> libs built with mingw - can you give me some details?

Mingw was used to compile Q/Win because it wouldn't compile using cygwin.
The problem was (I believe) that QT objects were sometimes getting allocated
on mingw's heap and freed on cygwin's heap (or v.v.), leading to

I couldn't figure out a good way to fix this that didn't involve using
patched versions of mingw or cygwin so they shared a heap, and it didn't
seem like a good idea to use a patched toolchain.  Plan B was to use Visual
C++ Express, but then I ended up not having enough time.

I believe Jay Modi and Robin Neatherwood, the other two people who were
working on this with me, have started up a second attempt recently.  If you
have any other questions, I'd be happy to try to help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20070516/b14a7a1b/attachment.htm 

More information about the mythtv-dev mailing list