[mythtv] Enabling MMX on MacOS X Intel builds

Todd Ignasiak ignasiak at gmail.com
Wed Mar 22 00:08:50 UTC 2006


I patched the MMX stuff in the 0.20 SVN tree, and was able to build a
frontend binary.  The MMX made a huge difference in the MPEG2 decoding
performance, taking it from ~150% CPU to 85-95% CPU on a core duo Mac
Mini.

Now, I have been trying to build the 0.19-fixes version, with MMX
enabled.  But, I am running into a linker problem that I haven't been
able to find a solution for.  Everything looks okay.. I'm sure I'm
missing something stupid.

The steps for this process are documented here: 
http://www.mythtv.org/wiki/index.php/Myth_on_Mac_x86

I'm getting an "Undefined symbols" error, but I have confirmed that
the symbols in question are in the code which is being compiled &
linked.  And, the patch & build process is basically the same as used
on 0.20 svn, which compiled fine.


g++ -headerpad_max_install_names
-Wl,-search_paths_first,-read_only_relocs,warning -prebind -dynamiclib
-single_module -seg1addr 0xC3000000 -compatibility_version     0.19
-current_version   0.19.0 -install_name   libmythavcodec-0.19.0.dylib
-o libmythavcodec-0.19.0.19.0.dylib bitstream.o utils.o mem.o
allcodecs.o mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o mpegaudio.o
ac3enc.o mjpeg.o audresample.o resample2.o dsputil.o motion_est.o
imgconvert.o imgresample.o mpeg12.o mpegaudiodec.o pcm.o simple_idct.o
ratecontrol.o adpcm.o eval.o error_resilience.o fft.o mdct.o raw.o
golomb.o cabac.o dpcm.o adx.o faandct.o parser.o g726.o vp3dsp.o
h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o dvdsub.o
dvbsub.o dvbsubdec.o dvdsubenc.o opt.o lzo.o myth_utils.o aasc.o
alac.o asv1.o cinepak.o cook.o cljr.o cyuv.o dv.o 8bps.o ffv1.o flac.o
flicvideo.o 4xm.o fraps.o h261.o h264.o huffyuv.o idcinvideo.o
indeo2.o indeo3.o interplayvideo.o lcl.o loco.o mace.o msrle.o
msvideo1.o png.o qdm2.o qdrw.o qpeg.o qtrle.o ra144.o ra288.o
roqvideo.o rpza.o rv10.o shorten.o smc.o snow.o sonic.o svq1.o
truemotion1.o truemotion2.o truespeech.o tscc.o cscd.o ulti.o vc9.o
vcr1.o vmdav.o vorbis.o vp3.o vqavideo.o wmadec.o wnv1.o ws-snd1.o
xan.o xl.o bmp.o a52dec.o bit_allocate.o a52_bitstream.o downmix.o
imdct.o parse.o crc.o resample.o fdct_mmx.o cputest.o dsputil_mmx.o
mpegvideo_mmx.o idct_mmx.o motion_est_mmx.o simple_idct_mmx.o
fft_sse.o vp3dsp_mmx.o vp3dsp_sse2.o idct_mmx_xvid.o  
-L/Users/tji/Build/19f/.osx-packager/src/qt-mac-free-3.3.6-snapshot-20060321/lib
-L/usr/lib -L/Users/tji/Build/19f/.osx-packager/build/lib
-L../libavutil -lmythavutil-0.19 -lz -lqt-mt
ld: warning -prebind ignored because MACOSX_DEPLOYMENT_TARGET
environment variable greater or equal to 10.4
ld: Undefined symbols:
magicF2W
wm0101
wm1010
wm1100
ff_pw_20
ff_pw_3
bone
d40000
/usr/bin/libtool: internal link edit command failed
make[2]: *** [libmythavcodec-0.19.0.19.0.dylib] Error 1
make[1]: *** [sub-libavcodec] Error 2
make: *** [sub-libs] Error 2
[osx-pkg] Failed system call: " /usr/bin/make " with error code 2



Notice that the mmx object files are listed in the g++ command, so
those symbols should be there.  I verified all the MMX definitions
were correct...

Any suggestions for workarounds, linker options, other similar quirks
in MacOS X x86?


More information about the mythtv-dev mailing list