tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.85k stars 787 forks source link

How do you fix all the "could not create compact unwind" linker warnings #673

Closed amayers closed 3 years ago

amayers commented 3 years ago

Description In every app that I use FFmpeg, I get a bunch of linker warnings about could not create compact unwind for .... I also see similar warnings in various issues on this repo, but those cases they were also paired with an error, and only the error was addressed in the fixes.

Expected behavior I could integrate FFmpeg without warnings.

Current behavior I get 24 warnings each time I integrate FFmpeg with my app.

Screenshots

Screen Shot 2021-02-02 at 9 31 23 AM Screen Shot 2021-02-02 at 9 33 08 AM Screen Shot 2021-02-02 at 9 40 57 AM Screen Shot 2021-02-02 at 9 53 40 AM

Logs

ld: warning: could not create compact unwind for _ass_encode_frame: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _dnxhd_encode_picture: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _fits_decode_frame: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _decode_frame: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _g723_1_encode_frame: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _encode_picture_ls: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _build_vlc: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _svq1_encode_frame: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _xface_encode_frame: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _ff_init_vlc_sparse: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _av1_metadata_filter: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _ff_celt_quant_bands: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _ff_cfhd_init_vlcs: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _ff_htmlmarkup_to_ass: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _ff_init_2d_vlc_rl: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _ff_rl_init_vlc: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _ac3_eac3_probe: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _fits_read_packet: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _redspark_read_header: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _ff_rtsp_setup_output_streams: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _rtsp_write_header: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _rtsp_write_packet: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _udp_open: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _ff_ape_parse_tag: stack subq instruction is too different from dwarf stack size

Environment

Other I use the https://github.com/tanersener/mobile-ffmpeg/wiki/Importing-Frameworks instructions to integrate with my app. It's been doing these warnings from before v4.4, I just have been busy and didn't get around to looking into it.

Other issues that have similar linking warnings: https://github.com/tanersener/mobile-ffmpeg/issues/562 https://github.com/tanersener/mobile-ffmpeg/issues/561 https://github.com/tanersener/mobile-ffmpeg/issues/419

tanersener commented 3 years ago

I remember I tried to resolve these warnings last year but I couldn't find a flag combination that works. There are some linking flags that can be used, e.g. -Wl,-no_compact_unwind. Unfortunately, they are not allowed to be set together with -fembed-bitcode. That's the main problem.

amayers commented 3 years ago

Yeah I tried the -no_compact_unwind before posting this, and found the bitcode limitation.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.