
jerrymr at gmail
May 16, 2007, 6:21 PM
Post #2 of 2
(829 views)
Permalink
|
|
Re: Building MythTV under Cygwin: Success!!! (is closer now)
[In reply to]
|
|
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 unhappiness. 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. -Jerry
|