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

SciFi sci-fi
Sun Nov 4 23:18:09 CET 2007


Hi,

On Sun, 04 Nov 2007 21:06:47 +0100, Pierre d'Herbemont wrote:
> On Nov 4, 2007, at 8:33 PM, Steven M. Schultz wrote:
>> 	It seems that with 10.5 the advice that "-mdynamic-no-pic" is for
>> 	applications and not shared libraries is being enforced.
>>
>> 	So if -mdynamic-no-pic can't be used because of linking problems but
>> 	the compilation fails if that option is not used what's a person to
>> 	do?
> 
> That's a regression known by Apple in the new ld (ld64).
> 
> A work around is to cross compile using the 10.4u SDK, which uses
> ld_classic.
> 
> Pierre.

fwiw on my Leopard partition, I'm busy compiling all the
prerequisite projects to use the new SDK, and have been seeing
a number of "new" problems with the new ld, some of which can
be "googled" for remedies but not all are bypassed yet.  Mostly
the folks at MacPorts seem to be on top of things, so I figure
soon enough Apple will know all about these new problems I
hope.  ;)

Presently for Tiger and the libavcodec subtree, I've had to
patch its Makefile in the following manner to get around some
compiler problems.  I wonder if this will work for you on
Leopard?  (it's going to take me quite a while longer to get
all the prereqs ready for ffmpeg & co. on my Leopard system):

====-cut-here-====
Index: libavcodec/Makefile
===================================================================
--- libavcodec/Makefile	(revision 10912)
+++ libavcodec/Makefile	(working copy)
@@ -381,6 +381,12 @@
 OBJS-$(HAVE_VIS)                       += sparc/dsputil_vis.o \
                                           sparc/simple_idct_vis.o \
 
+h264.o:	CFLAGS += -fomit-frame-pointer
+
+i386/snowdsp_mmx.o:	CFLAGS += -fomit-frame-pointer 
+
+i386/dsputil_mmx.o:	CFLAGS += -fomit-frame-pointer -O1 
+
 OBJS-$(HAVE_MLIB)                      += mlib/dsputil_mlib.o \
 
 OBJS-$(ARCH_ALPHA)                     += alpha/dsputil_alpha.o     \
====-cut-here-====

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.

If you/anyone tries this, let us know if this helps please?






More information about the ffmpeg-devel mailing list