[Libav-user] B0 defined on termux and break ffmpeg

Andrew Randrianasulu randrianasulu at gmail.com
Sun Jul 24 01:03:20 EEST 2022


вс, 24 июл. 2022 г., 00:33 Nicolas George <george at nsup.org>:

> Hi.
>
> Andrew Randrianasulu (12022-07-24):
> > I try to build ffmpeg as part of cinelerra-gg videoeditor, and because I
> > also build inside termux/arm on Android I run into problem at least
> > starting from ffmpeg-4.4
> >
> > For some reason B0 defined in system headers and leaks into libavcodec.
> >
> > I unconditionally undef'ed it in 3 files (see attached patch), against
> > ffmpeg.git
> >
> > Not sure if this is correct way, or I need to ping termux devs about this
> > ...
>
> Can you show your exact configure line, the end of its output and the
> beginning and end of the make output?
>

Just plain ./configure without any arguments works ok (but exact configure
output already scrolled up) but 'make -j 8' result in


CC libavcodec/aac_parser.o
CC libavcodec/aaccoder.o CC libavcodec/aacdec.o
CC libavcodec/aacdec_fixed.o
CC libavcodec/aacenc.o
CC libavcodec/aacenc_is.o libavcodec/aaccoder.c:311:20: warning: implicit
conversion from 'int' to 'float' changes value from 2147483647 to
2147483648 [-Wimplicit-const-int-float-conversion]
            qmin = INT_MAX;
                 ~ ^~~~~~~
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/limits.h:46:19:
note: expanded from macro 'INT_MAX'
#define INT_MAX __INT_MAX__
                  ^~~~~~~~~~~
<built-in>:46:21: note: expanded from here
#define __INT_MAX__ 2147483647 ^~~~~~~~~~ libavcodec/aaccoder.c:802:25:
error: expected identifier or '('
                    int B0 = 0, B1 = 0; ^
/data/data/com.termux/files/usr/include/asm-generic/termbits.h:118:12:
note: expanded from macro 'B0'
#define B0 0000000 ^
libavcodec/aaccoder.c:864:28: error: expression is not assignable
                        B0 += b1+b2;
                        ~~ ^ libavcodec/aaccoder.c:865:25: error: use of
undeclared identifier 'B1'
                        B1 += b3+b4;
                        ^
libavcodec/aaccoder.c:869:62: error: use of undeclared identifier 'B1'
                    cpe->ms_mask[w*16+g] = dist2 <= dist1 && B1 < B0;
                                                             ^
libavcodec/aaccoder.c:881:32: error: use of undeclared identifier 'B1' }
else if (B1 > B0) { ^
1 warning and 5 errors generated. make: *** [ffbuild/common.mak:81:
libavcodec/aaccoder.o] Error 1
make: *** Waiting for unfinished jobs.... libavcodec/aacdec.c:570:8:
warning: 'channel_layouts' is deprecated [-Wdeprecated-declarations]
.p.channel_layouts = aac_channel_layout,
       ^
libavcodec/codec.h:225:5: note: 'channel_layouts' has been explicitly
marked deprecated here attribute_deprecated
    ^
./libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
                                                ^
libavcodec/aacdec.c:598:8: warning: 'channel_layouts' is deprecated
[-Wdeprecated-declarations] .p.channel_layouts = aac_channel_layout,
       ^ libavcodec/codec.h:225:5: note: 'channel_layouts' has been
explicitly marked deprecated here attribute_deprecated
    ^ ./libavutil/attributes.h:100:49: note: expanded from macro
'attribute_deprecated'
# define attribute_deprecated __attribute__((deprecated))
                                                ^
libavcodec/aacdec_fixed.c:468:8: warning: 'channel_layouts' is deprecated
[-Wdeprecated-declarations]
    .p.channel_layouts = aac_channel_layout,
       ^
libavcodec/codec.h:225:5: note: 'channel_layouts' has been explicitly
marked deprecated here
    attribute_deprecated ^ ./libavutil/attributes.h:100:49: note: expanded
from macro 'attribute_deprecated' # define attribute_deprecated
__attribute__((deprecated)) ^
^[[6~2 warnings generated. 1 warning generated.
~/ffmpeg $




> Regards,
>
> --
>   Nicolas George
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220724/fe1b6e88/attachment.htm>


More information about the Libav-user mailing list