[Libav-user] B0 defined on termux and break ffmpeg
Andrew Randrianasulu
randrianasulu at gmail.com
Sun Jul 24 21:48:07 EEST 2022
вс, 24 июл. 2022 г., 21:32 Andrew Randrianasulu <randrianasulu at gmail.com>:
>
>
> вс, 24 июл. 2022 г., 20:58 Andrew Randrianasulu <randrianasulu at gmail.com>:
>
>>
>>
>> вс, 24 июл. 2022 г., 15:17 Nicolas George <george at nsup.org>:
>>
>>> Andrew Randrianasulu (12022-07-24):
>>> > /data/data/com.termux/files/usr/include/asm-generic/termbits.h:118:12:
>>> > note: expanded from macro 'B0'
>>> > #define B0 0000000 ^
>>>
>>> This is strange: B0 is indeed a constant that should be defined by
>>> system headers, but libavcodec should never be including anything
>>> related to termbits.h.
>>>
>>> Would you be able to track down how this file gets included from
>>> aaccoder.c?
>>>
>>
>>
>>
>> I tried to add -M flag to cflags right before make invocation, but it
>> does not give me any new info.
>>
>> CFLAGS=-M make
>>
>> Yet adding -e to make arguments somewhat bypass those errors, and I have
>> errors at linking instead (guess this is expected).
>>
>> I looked at libavcodec/Makefile but nothing jumped out at me ....
>>
>
>
> If I add -M directly to ffbuild/config.mak CFLAGS compile error also
> disappear, yet linking fail like this
>
>
> ld.lld: error: fftools/cmdutils.o:10966: unclosed quote
> ld.lld: error: fftools/cmdutils.o:10966: unclosed quote ld.lld: error:
> fftools/ffmpeg_filter.o:21: unknown directive: int
> >>> int android_get_application_target_sdk_version()
> __attribute__((__availability__(android,strict,introduced=24)));
> >>> ^
> clang-14: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make: *** [Makefile:131: ffprobe_g] Error 1 make: *** Waiting for
> unfinished jobs.... clang-14: error: linker command failed with exit code 1
> (use -v to see invocation)
>
> ld.lld: error: fftools/cmdutils.o:10966: unclosed quote
> make: *** [Makefile:131: ffplay_g] Error 1 clang-14: error: linker command
> failed with exit code 1 (use -v to see invocation)
> make: *** [Makefile:131: ffmpeg_g] Error 1
>
>
> May be clang does not support -M directive?
>
> config.mak attached
>
Adding -H to dependency-generating flags resulted in this output
CC libavcodec/aaccoder.o . ./libavutil/libm.h
.. /data/data/com.termux/files/usr/include/math.h ...
/data/data/com.termux/files/usr/include/sys/cdefs.h ....
/data/data/com.termux/files/usr/include/android/versioning.h ....
/data/data/com.termux/files/usr/include/android/api-level.h .....
/data/data/com.termux/files/usr/include/bits/get_device_api_level_inlines.h
.... /data/data/com.termux/files/usr/include/android/ndk-version.h
... /data/data/com.termux/files/usr/lib/clang/14.0.6/include/limits.h ....
/data/data/com.termux/files/usr/include/limits.h
..... /data/data/com.termux/files/usr/lib/clang/14.0.6/include/float.h
..... /data/data/com.termux/files/usr/include/linux/limits.h
..... /data/data/com.termux/files/usr/include/bits/posix_limits.h ..
./config.h
.. ./libavutil/attributes.h
.. ./libavutil/intfloat.h
... /data/data/com.termux/files/usr/lib/clang/14.0.6/include/stdint.h
.... /data/data/com.termux/files/usr/include/stdint.h
..... /data/data/com.termux/files/usr/include/bits/wchar_limits.h .....
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h ......
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/__stddef_max_align_t.h
.. ./libavutil/mathematics.h
... ./libavutil/rational.h . libavcodec/mathops.h
.. ./libavutil/common.h ... /data/data/com.termux/files/usr/include/errno.h
.... /data/data/com.termux/files/usr/include/linux/errno.h
.....
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/errno.h
...... /data/data/com.termux/files/usr/include/asm-generic/errno.h
.......
/data/data/com.termux/files/usr/include/asm-generic/errno-base.h....
/data/data/com.termux/files/usr/include/android/legacy_errno_inlines.h
... /data/data/com.termux/files/usr/lib/clang/14.0.6/include/inttypes.h
.... /data/data/com.termux/files/usr/include/inttypes.h ...
/data/data/com.termux/files/usr/include/stdio.h
.... /data/data/com.termux/files/usr/include/sys/types.h .....
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h .....
/data/data/com.termux/files/usr/include/linux/types.h
......
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/types.h
....... /data/data/com.termux/files/usr/include/asm-generic/types.h
........ /data/data/com.termux/files/usr/include/asm-generic/int-ll64.h
.........
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/bitsperlong.h
.......... /data/data/com.termux/files/usr/include/asm-generic/bitsperlong.h
...... /data/data/com.termux/files/usr/include/linux/posix_types.h .......
/data/data/com.termux/files/usr/include/linux/stddef.h ........
/data/data/com.termux/files/usr/include/linux/compiler_types.h
......... /data/data/com.termux/files/usr/include/linux/compiler.h .......
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/posix_types.h
........ /data/data/com.termux/files/usr/include/asm-generic/posix_types.h
..... /data/data/com.termux/files/usr/include/bits/pthread_types.h
...... /data/data/com.termux/files/usr/include/sys/types.h ....
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stdarg.h ....
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h
.... /data/data/com.termux/files/usr/include/string.h .....
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h .....
/data/data/com.termux/files/usr/include/xlocale.h
..... /data/data/com.termux/files/usr/include/bits/strcasecmp.h ....
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/fcntl.h
..... /data/data/com.termux/files/usr/include/asm-generic/fcntl.h ......
/data/data/com.termux/files/usr/include/bits/flock64.h
...... /data/data/com.termux/files/usr/include/bits/flock.h ....
/data/data/com.termux/files/usr/include/bits/seek_constants.h ...
/data/data/com.termux/files/usr/include/stdlib.h ....
/data/data/com.termux/files/usr/include/alloca.h ....
/data/data/com.termux/files/usr/include/bits/wait.h .....
/data/data/com.termux/files/usr/include/linux/wait.h
.... /data/data/com.termux/files/usr/include/malloc.h .....
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h
.... /data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h
....
/data/data/com.termux/files/usr/include/android/legacy_stdlib_inlines.h
..... /data/data/com.termux/files/usr/include/stdlib.h ...
./libavutil/macros.h .... ./libavutil/avconfig.h ... ./libavutil/intmath.h
... ./libavutil/mem.h .... ./libavutil/avutil.h
..... ./libavutil/common.h ..... ./libavutil/error.h ......
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h
..... ./libavutil/version.h ..... ./libavutil/log.h .....
./libavutil/pixfmt.h ... ./libavutil/internal.h ....
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h ....
/data/data/com.termux/files/usr/include/assert.h
.... ./libavutil/timer.h .....
/data/data/com.termux/files/usr/include/unistd.h
......
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h......
/data/data/com.termux/files/usr/include/sys/select.h .......
/data/data/com.termux/files/usr/include/linux/time.h ........
/data/data/com.termux/files/usr/include/linux/time_types.h .......
/data/data/com.termux/files/usr/include/signal.h ........
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/sigcontext.h
.........
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/sve_context.h
........ /data/data/com.termux/files/usr/include/bits/signal_types.h
......... /data/data/com.termux/files/usr/include/linux/signal.h ..........
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/signal.h
...........
/data/data/com.termux/files/usr/include/asm-generic/signal.h............
/data/data/com.termux/files/usr/include/asm-generic/signal-defs.h
..........
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/siginfo.h
........... /data/data/com.termux/files/usr/include/asm-generic/siginfo.h
........ /data/data/com.termux/files/usr/include/bits/timespec.h ........
/data/data/com.termux/files/usr/include/sys/ucontext.h .........
/data/data/com.termux/files/usr/include/signal.h
......... /data/data/com.termux/files/usr/include/sys/user.h ..........
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h ........
/data/data/com.termux/files/usr/include/android/legacy_signal_inlines.h
...... /data/data/com.termux/files/usr/include/bits/fcntl.h
...... /data/data/com.termux/files/usr/include/bits/getopt.h ......
/data/data/com.termux/files/usr/include/bits/ioctl.h ......
/data/data/com.termux/files/usr/include/bits/lockf.h
...... /data/data/com.termux/files/usr/include/bits/sysconf.h ......
/data/data/com.termux/files/usr/include/android/legacy_unistd_inlines.h
....... /data/data/com.termux/files/usr/include/bits/swab.h
..... /data/data/com.termux/files/usr/include/sys/ioctl.h
...... /data/data/com.termux/files/usr/include/linux/ioctl.h
.......
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/ioctl.h
........ /data/data/com.termux/files/usr/include/asm-generic/ioctl.h
...... /data/data/com.termux/files/usr/include/linux/termios.h .......
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/termios.h
........ /data/data/com.termux/files/usr/include/asm-generic/termios.h
.........
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/termbits.h
.......... /data/data/com.termux/files/usr/include/asm-generic/termbits.h
.........
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/ioctls.h
.......... /data/data/com.termux/files/usr/include/asm-generic/ioctls.h
...... /data/data/com.termux/files/usr/include/linux/tty.h
.....
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/unistd.h
...... /data/data/com.termux/files/usr/include/asm-generic/unistd.h .....
/data/data/com.termux/files/usr/include/linux/perf_event.h ......
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/byteorder.h
.......
/data/data/com.termux/files/usr/include/linux/byteorder/little_endian.h
........ /data/data/com.termux/files/usr/include/linux/swab.h .........
/data/data/com.termux/files/usr/include/aarch64-linux-android/asm/swab.h
.......... /data/data/com.termux/files/usr/include/asm-generic/swab.h .....
./libavutil/common.h ..... ./libavutil/aarch64/timer.h ....
./libavutil/dict.h . libavcodec/avcodec.h
.. ./libavutil/samplefmt.h .. ./libavutil/buffer.h ...
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h ..
./libavutil/frame.h
... /data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h ...
./libavutil/channel_layout.h .. libavcodec/codec.h
... ./libavutil/hwcontext.h
... ./libavcodec/codec_id.h
... ./libavcodec/version_major.h .. libavcodec/codec_desc.h ..
libavcodec/codec_par.h .. libavcodec/defs.h .. libavcodec/packet.h
... /data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h .
libavcodec/put_bits.h ..
/data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h ..
./libavutil/intreadwrite.h
... ./libavutil/bswap.h .... ./libavutil/aarch64/bswap.h ..
./libavutil/avassert.h
. libavcodec/aac.h .. libavcodec/aac_defines.h .. ./libavutil/float_dsp.h
.. ./libavutil/fixed_dsp.h .. ./libavutil/mem_internal.h ..
libavcodec/mdct15.h
... /data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h ...
libavcodec/fft.h
.... libavcodec/avfft.h
.. libavcodec/mpeg4audio.h
... libavcodec/get_bits.h .... libavcodec/vlc.h .. libavcodec/sbr.h ...
libavcodec/aacps.h .... libavcodec/aacpsdsp.h
..... /data/data/com.termux/files/usr/lib/clang/14.0.6/include/stddef.h
... libavcodec/sbrdsp.h
.... ./libavutil/softfloat.h ..... ./libavutil/softfloat_tables.h .
libavcodec/aacenc.h
.. libavcodec/audio_frame_queue.h .. libavcodec/psymodel.h ..
libavcodec/lpc.h
... ./libavutil/lls.h . libavcodec/aactab.h . libavcodec/aacenctab.h
. libavcodec/aacenc_utils.h .. ./libavutil/ffmath.h .
libavcodec/aacenc_quantization.h
.. libavcodec/aacenc_quantization_misc.h
. libavcodec/aacenc_is.h . libavcodec/aacenc_tns.h
. libavcodec/aacenc_ltp.h
. libavcodec/aacenc_pred.h
. ./libavcodec/aaccoder_twoloop.h . ./libavcodec/aaccoder_trellis.h
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
~/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/14cac041/attachment.htm>
More information about the Libav-user
mailing list