Patrice Bensoussan | 6 Oct 22:11

ffmpeg doesn't compile on Mac OS X anymore...

Hello,

It looks like there are two issues when trying to compile on Mac OS X  
Tiger :

1/ When using gcc 3.3, I reach the linking stage but get :

/Users/patriceb/tmp/WMA/cvs-HEAD/ffmpeg/libavutil/bswap.h:93:  
warning: `bswap_16' defined but not used
cc -Wl,-dynamic,-search_paths_first -dynamiclib -Wl,-single_module,- 
undefined,dynamic_lookup -flat_namespace -Wl,-install_name,/usr/local/ 
lib/vhook/null.dylib -g -o null.dylib null.o
ld: flag: -undefined dynamic_lookup can't be used with  
MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
/usr/bin/libtool: internal link edit command failed
make[1]: *** [null.dylib] Error 1

2/ When using gcc 4.0, compilation aborts with the error (this is  
only a warning with gcc 3)

make -C libavutil all
cc -g -Wall -Wno-switch  -no-cpp-precomp -pipe -fomit-frame-pointer - 
force_cpusubtype_ALL -Wno-sign-compare -faltivec -Os -mdynamic-no-pic  
-DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE - 
D_GNU_SOURCE  -c -o mathematics.o mathematics.c
In file included from mathematics.c:24:
common.h:551: error: static declaration of 'lrintf' follows non- 
static declaration
make[1]: *** [mathematics.o] Error 1
make: *** [lib] Error 2
(Continue reading)

Diego Biurrun | 7 Oct 15:50

Re: ffmpeg doesn't compile on Mac OS X anymore...

On Thu, Oct 06, 2005 at 09:15:09PM +0100, Patrice Bensoussan wrote:
> 
> It looks like there are two issues when trying to compile on Mac OS X  
> Tiger :
> 
> 1/ When using gcc 3.3, I reach the linking stage but get :
> 
> cc -Wl,-dynamic,-search_paths_first -dynamiclib -Wl,-single_module,- 
> undefined,dynamic_lookup -flat_namespace -Wl,-install_name,/usr/local/ 
> lib/vhook/null.dylib -g -o null.dylib null.o
> ld: flag: -undefined dynamic_lookup can't be used with  
> MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
> /usr/bin/libtool: internal link edit command failed
> make[1]: *** [null.dylib] Error 1

Yes, that's an issue.  You can work around it with

export MACOSX_DEPLOYMENT_TARGET=10.3

Does anybody know how to fix this properly?

> 2/ When using gcc 4.0, compilation aborts with the error (this is  
> only a warning with gcc 3)
> 
> make -C libavutil all
> cc -g -Wall -Wno-switch  -no-cpp-precomp -pipe -fomit-frame-pointer - 
> force_cpusubtype_ALL -Wno-sign-compare -faltivec -Os -mdynamic-no-pic  
> -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE - 
> D_GNU_SOURCE  -c -o mathematics.o mathematics.c
> In file included from mathematics.c:24:
(Continue reading)

Diego Biurrun | 7 Oct 16:25

Re: ffmpeg doesn't compile on Mac OS X anymore...

On Fri, Oct 07, 2005 at 03:50:12PM +0200, Diego Biurrun wrote:
> On Thu, Oct 06, 2005 at 09:15:09PM +0100, Patrice Bensoussan wrote:
> > 
> > 2/ When using gcc 4.0, compilation aborts with the error (this is  
> > only a warning with gcc 3)
> > 
> > make -C libavutil all
> > cc -g -Wall -Wno-switch  -no-cpp-precomp -pipe -fomit-frame-pointer - 
> > force_cpusubtype_ALL -Wno-sign-compare -faltivec -Os -mdynamic-no-pic  
> > -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE - 
> > D_GNU_SOURCE  -c -o mathematics.o mathematics.c
> > In file included from mathematics.c:24:
> > common.h:551: error: static declaration of 'lrintf' follows non- 
> > static declaration
> > make[1]: *** [mathematics.o] Error 1
> 
> That's strange, does the lrintf check in configure fail for you then?

It works on 10.3.9 with gcc-3.3 and I don't get a warning there, BTW.
Strangely you are missing -O3 from CFLAGS...

Diego
Martin | 3 Jan 11:08

Re: ffmpeg doesn't compile on Mac OS X anymore...

Patrice Bensoussan <patrice.bensoussan <at> gmail.com> writes:

> common.h:551: error: static declaration of 'lrintf' follows non- 
> static declaration
> make[1]: *** [mathematics.o] Error 1
> make: *** [lib] Error 2
> 
> Are these known issue? Thanks.
> Patrice
> 
I have the same problem compiling under SUSE 10 64 bit , gcc 4.02

is there a workaround?

thx, 
Martin
Laine Lee | 3 Jan 16:44
Favicon

Re: Re: ffmpeg doesn't compile on Mac OS X anymore...

On 1/3/06 4:08 AM, "Martin" <martin.prangl <at> itec.uni-klu.ac.at> wrote:

> Patrice Bensoussan <patrice.bensoussan <at> gmail.com> writes:
> 
>> common.h:551: error: static declaration of 'lrintf' follows non-
>> static declaration
>> make[1]: *** [mathematics.o] Error 1
>> make: *** [lib] Error 2
>> 
>> Are these known issue? Thanks.
>> Patrice
>> 
> I have the same problem compiling under SUSE 10 64 bit , gcc 4.02
> 
> is there a workaround?
> 

from <gauchi <at> gmx.net>

>simply configuring with --extra-cflags=-DHAVE_LRINTF works for me

--

-- 
Laine Lee
Diego Biurrun | 3 Jan 17:02

Re: Re: ffmpeg doesn't compile on Mac OS X anymore...

On Tue, Jan 03, 2006 at 09:44:01AM -0600, Laine Lee wrote:
> On 1/3/06 4:08 AM, "Martin" <martin.prangl <at> itec.uni-klu.ac.at> wrote:
> 
> > Patrice Bensoussan <patrice.bensoussan <at> gmail.com> writes:
> > 
> >> common.h:551: error: static declaration of 'lrintf' follows non-
> >> static declaration
> >> make[1]: *** [mathematics.o] Error 1
> >> make: *** [lib] Error 2
> >> 
> >> Are these known issue? Thanks.
> >> 
> > I have the same problem compiling under SUSE 10 64 bit , gcc 4.02
> > 
> > is there a workaround?
> 
> from <gauchi <at> gmx.net>
> 
> >simply configuring with --extra-cflags=-DHAVE_LRINTF works for me

This seems to be a recurring problem, but as long as I cannot reproduce
it, it's hard to fix...

Diego
Martin | 5 Jan 09:34

Re: ffmpeg doesn't compile on Mac OS X anymore...

> > 
> > >simply configuring with --extra-cflags=-DHAVE_LRINTF works for me
> 
> This seems to be a recurring problem, but as long as I cannot reproduce
> it, it's hard to fix...
> 
> Diego
> 

thank you! It worked with the flag. But the -qscale parameter does not have an 
effect by using x264. how can i control the x264 -q parameter with ffmpeg?

Thank you, 
Martin
Patrice Bensoussan | 6 Jan 19:37
Favicon

Re: ffmpeg doesn't compile on Mac OS X anymore...

> On Tue, Jan 03, 2006 at 09:44:01AM -0600, Laine Lee wrote:
> > On 1/3/06 4:08 AM, "Martin" <martin.prangl at itec.uni-klu.ac.at>  
> wrote:
> >
> > > Patrice Bensoussan <patrice.bensoussan <at> gmail.com> writes:
> > >
> > >> common.h:551: error: static declaration of 'lrintf' follows non-
> > >> static declaration
> > >> make[1]: *** [mathematics.o] Error 1
> > >> make: *** [lib] Error 2
> > >>
> > >> Are these known issue? Thanks.
> > >>
> > > I have the same problem compiling under SUSE 10 64 bit , gcc 4.02
> > >
> > > is there a workaround?
> >
> > from <gauchi <at> gmx.net>
> >
> > >simply configuring with --extra-cflags=-DHAVE_LRINTF works for me
>
> This seems to be a recurring problem, but as long as I cannot  
> reproduce
> it, it's hard to fix...
>
> Diego

Well, the problem on Mac OS X was that the library I was compiling  
with (mp3lame) was not installed in
a standard location, so the lrintf detection in configure was failing  
(Continue reading)

Måns Rullgård | 6 Jan 21:38

Re: Re: ffmpeg doesn't compile on Mac OS X anymore...

Patrice Bensoussan <patrice.bensoussan <at> free.fr> writes:

> Well, the problem on Mac OS X was that the library I was compiling
> with (mp3lame) was not installed in
> a standard location, so the lrintf detection in configure was failing
> (because the lib was not found during linking).
> I have sent a patch to actually use CFLAGS/LDFLAGS to fix the issue,
> but it means that if you are using
> some libraries which are not installed in a standard location, you
> need to add the appropriate --extra-ldflags
> and --extra-cflags to specify some additional paths for libs/includes.
>
> I guess a better way to fix it would be to avoid linking with extra
> libs if not required for the lrintf detection.
> I hope this helps.

It could be that some --extra-cflags are needed to pick up lrintf.  We
don't want to break such cases.

--

-- 
Måns Rullgård
mru <at> inprovide.com

Gmane