Difference between revisions of "MythTV on Mac x86"

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

Revision as of 04:16, 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):

  • 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.


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

The binary is compiling now. But, when it is executed, a bus error is generated, apparently in QT:

Date/Time: 2006-03-11 18:10:55.430 -0800
OS Version: 10.4.5 (Build 8H1619)
Report Version: 4

Command: mythfrontend
Path: /Users/tji/Build/try3/MythFrontend.app/Contents/MacOS/mythfrontend
Parent: WindowServer [379]

Version: 0.19.0.svn20060312 (0.19.0.svn20060312)

PID: 8742
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x0000000c

Thread 0 Crashed:
0 qt-mt 0xb20504dd qt_macFamilyName(QString const&) + 141
1 qt-mt 0xb202b42b QFontPrivate::load(QFont::Script) + 1027
2 qt-mt 0xb202b870 QFontMetrics::width(QChar) const + 58
3 qt-mt 0xb234b729 QFontMetrics::width(char) const + 33
4 qt-mt 0xb210610e QLabel::sizeForWidth(int) const + 118
5 qt-mt 0xb21067ac QLabel::minimumSizeHint() const + 92
6 qt-mt 0xb2106890 QLabel::sizeHint() const + 36
7 qt-mt 0xb21052c2 QLabel::setText(QString const&) + 60

Thread 1:
0 libSystem.B.dylib 0x900251e7 semaphore_wait_signal_trap + 7
1 qt-mt 0xb22a87e6 QWaitCondition::wait(unsigned long) + 226
2 myth 0xc600b9c1 MythContext::waitPrivRequest() const + 33

Thread 0 crashed with i386 Thread State:
eax: 0xffff02a0 ebx: 0xb205045e ecx:0x01800038 edx: 0x01175210
edi: 0xbffff09c esi: 0x00000000 ebp:0xbffff0b8 esp: 0xbffff080
ss: 0x0000002f efl: 0x00010286 eip:0xb20504dd cs: 0x00000027
ds: 0x0000002f es: 0x0000002f fs:0x00000000 gs: 0x00000037

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.