On Mon, Aug 05, 2013 at 12:18:31PM +0200, Hendrik Leppkes wrote:
> On Mon, Aug 5, 2013 at 9:56 AM, Martin Storsjö <[email protected]> wrote:
> > On Fri, 2 Aug 2013, Diego Biurrun  wrote:
> >> Module: libav
> >> Branch: master
> >> Commit: 7950e519bb094897f957b9a9531cc60ba46cbc91
> >>
> >> Author:    Diego Biurrun <[email protected]>
> >> Committer: Diego Biurrun <[email protected]>
> >> Date:      Wed Mar 27 18:36:51 2013 +0100
> >>
> >> Disable deprecation warnings for cases where a replacement is available
> >>
> >> --- a/libavcodec/options_table.h
> >> +++ b/libavcodec/options_table.h
> >> @@ -23,6 +23,7 @@
> >> #include <float.h>
> >> #include <limits.h>
> >>
> >> +#include "libavutil/internal.h"
> >> #include "libavutil/opt.h"
> >> @@ -39,6 +40,7 @@
> >>
> >> #define AV_CODEC_DEFAULT_BITRATE 200*1000
> >>
> >> +FF_DISABLE_DEPRECATION_WARNINGS
> >> static const AVOption avcodec_options[] = {
> >> {"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64
> >> = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, V|A|E},
> >> {"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
> >> tolerance specifies how far "
> >> @@ -373,6 +375,7 @@ static const AVOption avcodec_options[] = {
> >> {"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_INT,
> >> {.i64 = 0}, 0, 1, A|V|D },
> >> {NULL},
> >> };
> >> +FF_ENABLE_DEPRECATION_WARNINGS
> >
> > Sorry for not catching this earlier, but this is not good.
> >
> > This header is included in host compilation when building doc/print_options,
> > and the fact that the target compiler supports deprecation pragmas doesn't
> > imply that the host compiler supports it.
> >
> > This also causes problems even if the deprecation pragmas are disabled, when
> > the host and target compiler features differ. This includes
> > libavutil/internal.h which is not ok in host compilation, since it includes
> > config.h and a whole lot of other things. When cross-compiling with MSVC
> > from linux, this breaks the build, since internal.h includes libm.h. If the
> > target doesn't have functions like cbrtf but the host does, you will end up
> > with errors like this:
> >
> > HOSTCC  doc/print_options.o
> > In file included from libavutil/internal.h:120:0,
> >                  from libavcodec/options_table.h:26,
> >                  from doc/print_options.c:32:
> > libavutil/libm.h:48:31: error: static declaration of ‘cbrtf’ follows
> > non-static declaration
> >
> > Unfortunately this wasn't caught by the msvc/wine setup on fate since that
> > machine lacks texi2html.
> 
> This also breaks building print_options on native MSVC, because
> avutil/internal.h enforces linking the avpriv_strtod/avpriv_snprintf
> symbols, but the objects are not linked for host tools, so it ends up
> in missing symbols during linking.
> I should try to add the requirements for running these as part of FATE.

Patch sent and queued.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to