[FFmpeg-devel] Build problem (on Os X)

David DeHaven dave
Wed Feb 4 21:08:23 CET 2009

On Feb 4, 2009, at 11:34 AM, David Conrad wrote:
> On Feb 4, 2009, at 2:04 PM, Art Clarke wrote:
>> On Wed, Feb 4, 2009 at 10:47 AM, David DeHaven <dave at sagetv.com>  
>> wrote:
>>> Putting dispatch_tabxxx in .rodata seems to skirt the issue, but
>>> generates heaps of warnings on 32 bit. No idea if that works on 64  
>>> bit
>>> as I don't have access to a 64 bit machine at the moment. Maybe make
>>> the added section .rodata/.text lines conditional with "%ifidn
>>> __OUTPUT_FORMAT__,macho64", that avoids the warnings and allows the
>>> system to cache the dylib code on 32 bit.
>> I tried a similar hack (putting the dispatch tables in .data under
>> macho64), and it compiles without warning on x86_64, but bus errors
>> abound when running our standard tests encoding mpeg4 video.
> More details? Putting dispatch_tab_* in .rodata works fine for me  
> here on x86_64 (as attached, obviously not a final solution), tested  
> with converting h.264/mpeg4 + aac/vorbis to mpeg4 + mp2/vorbis.  
> (yasm
>> I'm working on a workaround that allows you to turn off yasm via
>> configure and will post that patch as a short-term work around.
> Obviously this isn't great since more asm will be written in yasm  
> eventually...
>>> Someone with more x86 assembly experience could probably find a  
>>> better
>>> solution... I'm just kinda hacking in the dark here. I was able to
>>> build 64 bit dylibs though.
>> yeah; me too.
>> - Art
> <fft-rodata.diff>

+SECTION .rodata align=16

The section uses the previous alignment argument, yasm spits a warning  
out for me.

I also made the following change to x86inc.asm, but it assumes yasm  
isn't broken. Ideally configure needs to be modified to check if yasm  
aligns sections properly or not, but I haven't figured out a clean way  
of doing that while allowing cross-compilation except by adding a tool  
that parses the mach-o object file (ugh-ly!).

I suppose if someone is cross-compiling for Mac OS X, they should have  
otool or an appropriate objdump available...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: x86inc-alignment.diff
Type: application/octet-stream
Size: 729 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090204/16cf4890/attachment.obj>
-------------- next part --------------

More information about the ffmpeg-devel mailing list