Opened 10 years ago

Closed 10 years ago

#7705 closed patch (fixed)

OSX 10.6 Compilation Fixes

Reported by: mythtv@… Owned by: Nigel
Priority: minor Milestone: 0.23
Component: Ports - OSX Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The attached patch makes updates necessary to aid compilation on OS X 10.6 with Xcode 3.2.1. The main changes are:

  • Upgrade to Qt 4.6 (the first version of Qt to officially support OS X 10.6)
  • Upgrade to MySQL 5.1 (as the current source download is no longer available)
    • This also improves the configuration of MySQL within Qt. The previous method of forcing the MySQL include paths breaks Qt 4.6 compilation. MySQL 5.1 contains a "plugin.h" file, having the MySQL include path appear first in the list of includes whilst compiling Qt causes this file to mask the "src/3rdparty/webkit/WebCore/plugins/Plugin.h" file that is part of the Qt source code resulting in compiler errors.
  • Force 32-bit compilation
    • Xcode compilers generate 64-bit binaries by default on 64-bit installs of OS X 10.6, which are the default on Macs with Intel Core2 CPUs. The MythTV code needs porting from the Carbon APIs to the Cocoa APIs in order to be compatible with 64-bit builds.

As with previous OS X 10.6 support some lines within "osx-packager.pl" require uncommenting in order to enable the support.

Attachments (3)

OSX_10.6_packaging_22953.patch (2.3 KB) - added by mythtv@… 10 years ago.
OSX_10.6_mythtv_22953.patch (2.3 KB) - added by mythtv@… 10 years ago.
OSX_10.6_mythplugins_22953.patch (302 bytes) - added by mythtv@… 10 years ago.

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by mythtv@…

Changed 10 years ago by mythtv@…

Attachment: OSX_10.6_mythtv_22953.patch added

Changed 10 years ago by mythtv@…

comment:1 Changed 10 years ago by Nigel

Status: newassigned

I have had limited success with Qt 4.6 (either beta1 or the final). There seems to be some errors with the installed headers? e.g. this compile test from mythtv configure:

#include <QtWebKit/QtWebKit>
#if QT_VERSION < 0x040400
die
#endif
...
//Volumes/Backups/MythTV/.osx-packager/build/include/QtWebKit/QtWebKit:4:39: error: QtXmlPatterns/QtXmlPatterns: No such file or directory
In file included from //Volumes/Backups/MythTV/.osx-packager/build/include/QtWebKit/QtWebKit:7,
                 from z.cpp:1:
//Volumes/Backups/MythTV/.osx-packager/build/include/QtWebKit/qwebelement.h:23:19: error: QString: No such file or directory
//Volumes/Backups/MythTV/.osx-packager/build/include/QtWebKit/qwebelement.h:24:23: error: QStringList: No such file or directory
//Volumes/Backups/MythTV/.osx-packager/build/include/QtWebKit/qwebelement.h:25:17: error: QRect: No such file or directory
//Volumes/Backups/MythTV/.osx-packager/build/include/QtWebKit/qwebelement.h:26:20: error: QVariant: No such file or directory
//Volumes/Backups/MythTV/.osx-packager/build/include/QtWebKit/qwebelement.h:27:40: error: QExplicitlySharedDataPointer: No such file or directory
In file included from //Volumes/Backups/MythTV/.osx-packager/build/include/QtWebKit/QtWebKit:13,
                 from z.cpp:1:
//Volumes/Backups/MythTV/.osx-packager/build/include/QtWebKit/qwebkitversion.h:20:21: error: qstring.h: No such file or directory

I can add a copy rule to install these, but it doesn't bode well for the reliability of 4.6.0 ?

comment:2 in reply to:  1 Changed 10 years ago by mythtv@…

Replying to nigel:

I have had limited success with Qt 4.6 (either beta1 or the final). There seems to be some errors with the installed headers?

That problem should be overcome by the modification to "mythtv/configure" (contained within "OSX_10.6_mythtv_22953.patch"?

I believe that the problem is caused by an incorrect use of include paths. The QtWebKit? headers should not be included by specifying the top level Qt include directory and using "#include <QtWebKit/QtWebkit>", but instead each Qt modules' include directory should be passed to the compiler as separate include paths and "#include <QtWebKit>" should be used instead.

Fixing the QtWebKit? compilation test in "mythtv/configure" allows me to compile everything using Qt 4.6 final (using the attached patches).

comment:3 Changed 10 years ago by Nigel

(In [23008]) Newer MySQL, different mirror (pair.com just gives me error 403 lately, and isn't listed as an official MySQL mirror, so Hurricane Electric gets it). Refs #7705, though I will not move to MySQL 5.1 yet.

comment:4 Changed 10 years ago by Nigel

(In [23100]) Qt 4.6 is better for Mac OS 10.6 (no Qt source mods required). Refs #7705.

comment:5 Changed 10 years ago by Nigel

(In [23181]) Additional argument to force 32bit compilation. Needed on 10.6 machines that have a 64bit processor. Refs #7705.

comment:6 Changed 10 years ago by Stuart Auchterlonie

Milestone: unknown0.23

comment:7 Changed 10 years ago by Nigel

Resolution: fixed
Status: assignedclosed

(In [23312]) Some MySQL 5.1 patches by Peter Stokes. Commented out, but Nokia will probably, eventually, phase out 5.0? Closes #7705

Note: See TracTickets for help on using tickets.