Difference between revisions of "MythTV on Mac x86"

From MythTV Official Wiki
Jump to: navigation, search
(Adding faster bswap stuff.)
(Current Status)
Line 45: Line 45:
 
== Current Status ==
 
== Current Status ==
  
The binary is compiling nowBut, when it is executed, a bus error is generated, apparently in QT:
+
Application successfully compilesMythTV menu system displays, and communicates with backend.
  
Date/Time:      2006-03-11 18:10:55.430 -0800<br>
+
Seg Faults when trying to display videoDoesn't display list of programs from backend.
OS Version:    10.4.5 (Build 8H1619)<br>
 
Report Version: 4<br>
 
 
 
Command: mythfrontend<br>
 
Path:    /Users/tji/Build/try3/MythFrontend.app/Contents/MacOS/mythfrontend<br>
 
Parent:  WindowServer [379]<br>
 
 
 
Version: 0.19.0.svn20060312 (0.19.0.svn20060312)<br>
 
 
 
PID:    8742<br>
 
Thread: 0<br>
 
 
 
Exception: EXC_BAD_ACCESS (0x0001)<br>
 
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x0000000c<br>
 
 
 
Thread 0 Crashed:<br>
 
0  qt-mt              0xb20504dd qt_macFamilyName(QString const&) + 141<br>
 
1  qt-mt              0xb202b42b QFontPrivate::load(QFont::Script) + 1027<br>
 
2  qt-mt              0xb202b870 QFontMetrics::width(QChar) const + 58<br>
 
3  qt-mt              0xb234b729 QFontMetrics::width(char) const + 33<br>
 
4  qt-mt              0xb210610e QLabel::sizeForWidth(int) const + 118<br>
 
5  qt-mt              0xb21067ac QLabel::minimumSizeHint() const + 92<br>
 
6  qt-mt              0xb2106890 QLabel::sizeHint() const + 36<br>
 
7  qt-mt              0xb21052c2 QLabel::setText(QString const&) + 60<br>
 
 
 
Thread 1:<br>
 
0  libSystem.B.dylib  0x900251e7 semaphore_wait_signal_trap + 7<br>
 
1  qt-mt              0xb22a87e6 QWaitCondition::wait(unsigned long) + 226<br>
 
2  myth                0xc600b9c1 MythContext::waitPrivRequest() const + 33<br>
 
 
 
Thread 0 crashed with i386 Thread State:<br>
 
eax: 0xffff02a0    ebx: 0xb205045e ecx:0x01800038 edx: 0x01175210<br>
 
edi: 0xbffff09c    esi: 0x00000000 ebp:0xbffff0b8 esp: 0xbffff080<br>
 
ss: 0x0000002f    efl: 0x00010286 eip:0xb20504dd  cs: 0x00000027<br>
 
ds: 0x0000002f    es: 0x0000002f  fs:0x00000000  gs: 0x00000037<br>
 
  
 
==Useful Links==
 
==Useful Links==

Revision as of 20:44, 12 March 2006

MythTV currently does not build on the new Intel based Apple Macintosh platforms. This page is intended to share information among the people attempting to get this working.

In the 'contrib' directory of the MythTV source code, there is a perl script which automates the build process for MythTV on MacOS systems. The script is called osx-packager.pl. My descriptions of changes needed assume that script as a starting point.


Changes Needed

Here's a brief summary of chages I made to get further into the build process (updated with Brendan White's config info):

  • Enable backend, 'osx-packager.pl -enable-backend'. Otherwise, the frontend fails when necessary components aren't available.
  • libdvdnav: Endian byte swapping missing from bswap.h. Probably due to not recognizing the arch. Added the generic example macro in the 'else' case & it compiled.
  • libexif: compile failed. comment out the 'static' in exif-utils.c line 83.
  • libdvdread: Endian byte swapping missing from bswap.h. Probably due to not recognizing the arch. Added the generic example macro in the 'else' case & it compiled.

Instead of the generic else case for bswap, you can use the Apple-supplied routines:

#elif defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#define B2N_16(x) x = OSSwapBigToHostConstInt16(x) 
#define B2N_32(x) x = OSSwapBigToHostConstInt32(x)
#define B2N_64(x) x = OSSwapBigToHostConstInt64(x)

MythTV changes:

  • Update osx-packager.pl to add configure parameters used in building MythTV. In the section "configure mythplugins, and mythtv, etc", the 'mythtv' portion should look something like this:
 'mythtv'
 =>  [
       '--disable-distcc',
       '--disable-mmx',
       '--arch=i686', 
       '--extra-cxxflags=-msse -msse2 -msse3', 
       '--prefix=' . $PREFIX,
     ],
  • Fix mythtv/libs/libavcodec/liba52/resample.c -- Even though mmx has been disabled, there are some silly assumptions in this file. remove the ifdef that includes resample_mmx.c. Also remove the ifdef ARCH_X86 stanzas.
  • 3rd bswap.h patch, this time in mythlibdvd
  • Fix BaseClasses.h (called from Actions.cpp), #include <malloc.h> to #include <sys/malloc.h>

Current Status

Application successfully compiles. MythTV menu system displays, and communicates with backend.

Seg Faults when trying to display video. Doesn't display list of programs from backend.

Useful Links

ffmpeg updates for mmx assembly code

Other Notes

'/proc/cpuinfo/' is used to determine CPU type in linux builds. In MacOS, "/usr/sbin/system_profiler SPHardwareDataType" could be used to determine the architecture and CPU type.