[FFmpeg-devel] OSX 10.5 (Leopard) build problem

Steven M. Schultz sms
Mon Nov 5 00:28:29 CET 2007


On Sun, 4 Nov 2007, SciFi wrote:

Hi -

> Presently for Tiger and the libavcodec subtree, I've had to
> patch its Makefile in the following manner to get around some

	Hmmm, on Tiger I had no problems at all once someone provided
	the workaround/hack of using "-mdynamic-no-pic".  

> compiler problems.  I wonder if this will work for you on
> Leopard?  (it's going to take me quite a while longer to get

	Alas, no, it does not help.  I added these lines 

> Index: libavcodec/Makefile
> +h264.o:	CFLAGS += -fomit-frame-pointer
> +i386/snowdsp_mmx.o:	CFLAGS += -fomit-frame-pointer 
> +i386/dsputil_mmx.o:	CFLAGS += -fomit-frame-pointer -O1 

	and still have the error:

i386/dsputil_mmx.c:3003: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
i386/dsputil_mmx.c:3005: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'

	if -mdynamic-no-pic is not used.  If that option is used then the
	linker errors are encountered.

> Yes it's the -O1 that _finally_ fixed the issue with me on
> Tiger, any -O higher will introduce the register problem in
> dsputil_mmx.c with Apple's compiler.

	Interesting - I had no issues compiling libavcodec on Tiger (either
	PPC or Intel).

	Would modifying the asm() code be an option?  I am not an asm 
	coder but I would hope there would be a reordering or modifying the code
	to not trigger the "can't find a register" error.  Make the code pic
	perhaps?  

	Cheers,
	Steven Schultz





More information about the ffmpeg-devel mailing list