Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

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

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


andrei at tanas

May 16, 2007, 3:22 PM

Post #1 of 2 (882 views)
Permalink
Building MythTV under Cygwin: Success!!! (is closer now)

Hi all,
I've submitted a patch under new ticket #3470
(http://svn.mythtv.org/trac/ticket/3470).
The patch allows to build _working_ executables under cygwin. I'm in early
testing stages now, but so far:
- everything builds (including filters etc)
- backend works (it does not support video recording though)
- frontend somewhat works (I was able to browse recordings, see recording
preview, but I could not start playback ("cannot set direct draw
cooperative level")
- three plugins work: mythcontrols, mythvideo, mythgallery

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 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?

Regards,
Andrei Tanas.


_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


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

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.