Opened 3 years ago
#9534 new defect
Linking error in MIPS when using LTO since ffmpeg 4.4.0
Reported by: | RedDwarf | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Building ffmpeg 4.4.0+ (tested with 4.4.1 too) results in the following linking error
LD libavutil/libavutil.so.56 /tmp/cc34UJEw.s: Assembler messages: /tmp/cc34UJEw.s:112: Error: Macro `parse_r' was already defined lto-wrapper: fatal error: /staging_dir/toolchain-mips_74kc_gcc-7.5.0_musl/bin/mips-openwrt-linux-musl-gcc returned 1 exit status compilation terminated. /staging_dir/toolchain-mips_74kc_gcc-7.5.0_musl/lib/gcc/mips-openwrt-linux-musl/7.5.0/../../../../mips-openwrt-linux-musl/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status make[3]: *** [/lala/build/src/ffmpeg/external-ffmpeg-prefix/src/external-ffmpeg/ffbuild/library.mak:103: libavutil/libavutil.so.56] Error 1 make[3]: Leaving directory '/lala/build/src/ffmpeg/external-ffmpeg-prefix/src/external-ffmpeg-build' gmake[2]: *** [src/ffmpeg/CMakeFiles/external-ffmpeg.dir/build.make:86: src/ffmpeg/external-ffmpeg-prefix/src/external-ffmpeg-stamp/external-ffmpeg-build] Error 2 gmake[1]: *** [CMakeFiles/Makefile2:213: src/ffmpeg/CMakeFiles/external-ffmpeg.dir/all] Error 2 gmake: *** [Makefile:136: all] Error 2
when building with --enable-lto.
The problem has been observed in two different MIPS toolchains. One of them being https://github.com/openwrt/openwrt/commit/1df49d98e7ed8e8e889d571973fac062694531af.
This is the configuration
bash-5.1# ./configure --cc=/staging_dir/toolchain-mips_74kc_gcc-7.5.0_musl/bin/mips-openwrt-linux-musl-gcc --enable-cross-compile --arch=mips --target-os=linux --disable-all --enable-avutil --disable-static --enable-shared --enable-lto install prefix /usr/local source path . C compiler /staging_dir/toolchain-mips_74kc_gcc-7.5.0_musl/bin/mips-openwrt-linux-musl-gcc C library host C compiler gcc host C library glibc ARCH mips (generic) big-endian yes runtime cpu detection yes MIPS FPU enabled no MIPS DSP R1 enabled no MIPS DSP R2 enabled no MIPS MSA enabled no MIPS MSA2 enabled no LOONGSON MMI enabled no debug symbols yes strip symbols yes optimize for size no optimizations yes static no shared yes postprocessing support no network support no threading support pthreads safe bitstream reader yes texi2html enabled no perl enabled yes pod2man enabled yes makeinfo enabled no makeinfo supports HTML no External libraries: bzlib iconv zlib External libraries providing hardware acceleration: cuda_llvm v4l2_m2m Libraries: avutil Programs: Enabled decoders: Enabled encoders: Enabled hwaccels: Enabled parsers: Enabled demuxers: Enabled muxers: Enabled protocols: Enabled filters: Enabled bsfs: Enabled indevs: Enabled outdevs: License: LGPL version 2.1 or later WARNING: generic cpu selected
Note:
See TracTickets
for help on using tickets.