Opened 16 years ago

Closed 16 years ago

#4200 closed defect (fixed)

OSX 10.5 (Leopard); compile fails (svnrev 14931/head)

Reported by: petermartens@… Owned by: Nigel
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: high Keywords: osx
Cc: Ticket locked: no

Description

Compiling on Mac OSX Leopard fails with the following error (using osx-packager.pl):

ld: warning codegen in _sad8_xy2_mmx2 (offset 0x0000001B) prevents image from loading in dyld shared cache ld: warning codegen in _sad16_xy2_mmx2 (offset 0x00000023) prevents image from loading in dyld shared cache ld: warning codegen in _sad16_xy2_mmx2 (offset 0x0000007D) prevents image from loading in dyld shared cache ld: absolute addressing (perhaps -mdynamic-no-pic) used in _avg_qpel8_mc20_mmx2 from dsputil_mmx.o not allowed in slidable image collect2: ld returned 1 exit status make[2]: * [libmythavcodec-0.20.0.20.0.dylib] Error 1 make[1]: * [sub-libavcodec] Error 2 make: * [sub-libs] Error 2 [osx-pkg] Failed system call: " /usr/bin/make -j2 " with error code 2

Attachments (7)

leopardfixes.patch (4.4 KB) - added by morgan@… 16 years ago.
leopardintel fixes includes osx-packager fix from Ticket #4338
intelleopardmmx.patch (22.7 KB) - added by morgan@… 16 years ago.
Leopard MMX patch for osx-packager.pl
intelleopardmmx.2.patch (22.3 KB) - added by morgan@… 16 years ago.
new leopard mmx patch for contrib/OSX (use this one)
configure.patch (401 bytes) - added by morgan@… 16 years ago.
re-enable mmx in configure and have configure apply patch
Trac4200.0-20-fixes.diff (5.3 KB) - added by Nigel 16 years ago.
Patch of osx-packager.pl to attempt 10.5 builds
configure.2.patch (644 bytes) - added by morgan@… 16 years ago.
configure.3.patch (675 bytes) - added by morgan@… 16 years ago.
fix typo

Download all attachments as: .zip

Change History (23)

comment:1 Changed 16 years ago by Nigel

Owner: changed from Isaac Richards to Nigel
Status: newassigned

Yes, there are linker problems in 10.5. I have been hoping Apple will update the DevTools?, but disabling the MMX optimisations may be faster.

Changed 16 years ago by morgan@…

Attachment: leopardfixes.patch added

leopardintel fixes includes osx-packager fix from Ticket #4338

comment:2 Changed 16 years ago by morgan@…

Attached patch disables mmx for Darwin 9 and up Changes macx:LIBS += -undefined define_a_way to macx:LIBS += -undefined dynamic_lookup in filters/postprocess/postprocess.pro

And includes a fink qt3 patch

Note these changes are untested on tiger.

comment:3 Changed 16 years ago by tim@…

this works but the third part of the patch filters/postprocess/postprocess.pro is now redundant following Nigel's changes.

comment:4 Changed 16 years ago by Nigel

Resolution: fixed
Status: assignedclosed

(In [15277]) Mac OS X 10.5 compile fixes. Uses slightly different form of Morgan's patch (smarter Perl quoting, less backslashes). Closes #4200. Closes #4338. Note that I have only tested this on 10.4, and that it disables MMX for all of FFmpeg and MythTV, which will have significant performance problems on slower Intel Macs. If someone wants to work out how to limit this to libavcodec only, the Mac Mini Cire Solo users will definitely thank them!

comment:5 Changed 16 years ago by Janne Grunau

(In [15280]) replace bash substring expansion introduced by [15277] with cut for posix shells. Refs #4200

Changed 16 years ago by morgan@…

Attachment: intelleopardmmx.patch added

Leopard MMX patch for osx-packager.pl

Changed 16 years ago by morgan@…

Attachment: intelleopardmmx.2.patch added

new leopard mmx patch for contrib/OSX (use this one)

Changed 16 years ago by morgan@…

Attachment: configure.patch added

re-enable mmx in configure and have configure apply patch

comment:6 Changed 16 years ago by morgan@…

Resolution: fixed
Status: closednew

I came across a leopard ffmpeg mmx fix on the ffmpeg mailing list.

intelleopardmmx.2.patch should be added to contrib/OSX as intelleopardmmx.patch

configure.patch removes the disable mmx and adds a call to patch contrib/OSX/intelleopardmmx.patch if running darwin 9.x.x

comment:7 Changed 16 years ago by morgan@…

I almost forgot...

If it's preferable and someone wants to deal with the quoting issues the earlier intelleopardmmx.patch includes intelleopardmmx.2.patch and removes the Leopard disable mmx and could be put into osx-packager.pl. I just could rap my head around the quoting tonight.

comment:8 Changed 16 years ago by anonymous

will this work against 20 fixes?

comment:9 Changed 16 years ago by Nigel

(In [15697]) Backport of [15277] (Mac OS X 10.5 compile fixes) to 0-20-fixes. See #4200

Changed 16 years ago by Nigel

Attachment: Trac4200.0-20-fixes.diff added

Patch of osx-packager.pl to attempt 10.5 builds

comment:10 Changed 16 years ago by Nigel

I'm testing a build on 10.4 with that patch. If "anonymous" could try the same on 10.5, and report back?

comment:11 Changed 16 years ago by todd.ignasiak@…

I applied the 'intelleopardmmx2' patch to the 0.21 code, and it got my video performance back to the levels I was seeing with 0.20. Prior to that, HD video took 130-160% CPU (i.e. greater than 100% of one of the cores in my core duo 1.66GHz Mini).

Without this patch, HD is unusable on a lot of Macs

comment:12 Changed 16 years ago by anonymous

The XCode in the "Free iPhone SDK" seems to compile MythTV with MMX support on Leopard without this patch.

Changed 16 years ago by morgan@…

Attachment: configure.2.patch added

comment:13 Changed 16 years ago by morgan@…

New patch configure.3.patch

Leopard LD version 82.5 compiles myth with mmx. This patch checks ld version before disabling mmx also outputs warning if mmx gets disabled "You have a broken ld. If you are planning on playing HD videos please check bug #4200 for a patch intelleopardmmx.patch"

Once new xcode goes gold warning should be changed to download new xcode.

Changed 16 years ago by morgan@…

Attachment: configure.3.patch added

fix typo

comment:14 Changed 16 years ago by Nigel

(In [16657]) Intel MMX Leopard fix - only disable for some ld versions. See #4200.

comment:15 Changed 16 years ago by Nigel

(In [16658]) Intel MMX Leopard fix - only disable for some ld versions. See #4200.

comment:16 Changed 16 years ago by Nigel

Resolution: fixed
Status: newclosed

Morgan, thanks for the patch. I'm not 100% sure about it (may fail on Xeons [64bit], would prefer not to use -lt and only disable mmx for the defective ldver), but for now, that is much neater than patching ffmpeg for one bad ld version.

Note: See TracTickets for help on using tickets.