Opened 13 years ago

Closed 13 years ago

#2212 closed defect (fixed)

libmythtv fails to compile on Mac OS X after upgrading to XCode 2.4

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

Description

libmythtv fails to compile with errors :

g++ -c -pipe -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt -faltivec -F/System/Library/Frameworks/{AGL,ApplicationServices?,Carbon,Cocoa,OpenGL,QuickTime?}.framework/Frameworks -F/System/Library/PrivateFrameworks/{DVD}.framework/Frameworks -F/Developer/FireWireSDK22/Examples/Framework -Wall -W -g -I/usr/local/include/freetype2 -I/usr/local/include -DPIC -fPIC -DUSING_FREEBOX -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -DLIBDIR=\"/usr/local/lib\" -D_LARGEFILE_SOURCE -DUSING_H264TOOLS -DUSING_FRONTEND -DUSING_CRC_IP_NETWORK_REC -DUSING_FIREWIRE -DUSING_MAC_GO7007 -DUSING_DBOX2 -DUSING_FREEBOX -DUSING_HDHOMERUN -DUSING_BACKEND -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_ACCESSIBILITY_SUPPORT -DQT_NO_DEBUG -I/Development/mythtv/qt-mac-free-3.3.6-snapshot-latest/mkspecs/default -I. -I/usr/local/include -I../.. -I.. -I../libmyth -I../libavcodec -I../libavutil -I../libmythmpeg2 -Idvbdev -Impeg -I../libmythlivemedia/BasicUsageEnvironment/include -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/liveMedia/include -I../libmythlivemedia/UsageEnvironment/include -I/Development/mythtv/qt-mac-free-3.3.6-snapshot-latest/include -o interactivetv.o interactivetv.cpp /usr/include/architecture/ppc/math.h:179: error: 'always_inline' was not declared in this scope /usr/include/architecture/ppc/math.h:179: error: expected `)' before 'inline' /usr/include/architecture/ppc/math.h:179: error: expected `)' before 'inline' /usr/include/architecture/ppc/math.h:179: error: expected initializer before 'inline'

after upgrading to XCode 2.4 - this is because of the underlying redefinition of always_inline in the ffmpeg (and by association mythtv) headers.

The attached patch to mhi.h rearranges the header include order to fix the problem.

Attachments (1)

mhi.h.diff (558 bytes) - added by awk@… 13 years ago.
patch to mhi.h to rearrange header include order to avoid 'always_inline errors'

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by awk@…

Attachment: mhi.h.diff added

patch to mhi.h to rearrange header include order to avoid 'always_inline errors'

comment:1 Changed 13 years ago by Isaac Richards

Owner: changed from Isaac Richards to Nigel

comment:2 Changed 13 years ago by Nigel

Status: newassigned

OK. After finally downloading a non-corrupt XCode 2.4, finding it is OS 10.4 only, managing to boot a Mac into 10.4 and install it, I can definitely verify the problem.
1) Am applying the patch and testing now.
2) Strange is the fact that mhi.h includes itself!

comment:3 Changed 13 years ago by Nigel

Resolution: fixed
Status: assignedclosed

(In [10923]) Re-enable compilation on OS X with GCC 4.0.1 (XCode 2.4) by moving an include line. Closes #2212

Note: See TracTickets for help on using tickets.