Summary: |
media-libs/avidemux-core-2.7.0 fails to build with -flto: relocation R_X86_64_PC32 against undefined symbol `bF8' can not be used when making a shared object; recompile with -fPIC |
Product: |
Gentoo Linux
|
Reporter: |
Alexander Miller <alex.miller> |
Component: |
Current packages | Assignee: |
Gentoo Media-video project <media-video> |
Status: |
RESOLVED
FIXED
|
|
|
Severity: |
normal
|
CC: |
eschwartz93, sam
|
Priority: |
Normal
|
Keywords: |
PATCH |
Version: |
unspecified | |
|
Hardware: |
AMD64 | |
|
OS: |
Linux | |
|
Whiteboard: |
|
Package list:
|
|
Runtime testing required:
|
---
|
Bug Depends on: |
|
|
|
Bug Blocks: |
618550
|
|
|
Attachments: |
avidemux-core-2.7.0-bundled-ffmpeg-lto-fix.patch
|
Created attachment 523838 [details, diff] avidemux-core-2.7.0-bundled-ffmpeg-lto-fix.patch With LTO the build of media-libs/avidemux-core-2.7.0 fails when linking the libraries of the bundled ffmpeg. Here are the errors from the build log: LD libpostproc/libADM6postproc.so.54 LD libavcodec/libADM6avcodec.so.57 LD libswscale/libADM6swscale.so.4 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/media-libs/avidemux-core-2.7.0/temp/ccgANYtl.ltrans1.ltrans.o: warning: relocation against `pb_03' in readonly section `.text' /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/media-libs/avidemux-core-2.7.0/temp/ccgANYtl.ltrans6.ltrans.o: relocation R_X86_64_PC32 against undefined symbol `bF8' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status gmake[3]: *** [/tmp/portage/media-libs/avidemux-core-2.7.0/work/avidemux-core-2.7.0_build/ffmpeg/source/library.mak:94: libswscale/libADM6swscale.so.4] Error 1 gmake[3]: *** Waiting for unfinished jobs.... /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/media-libs/avidemux-core-2.7.0/temp/cca1w2es.ltrans29.ltrans.o: warning: relocation against `pd_1' in readonly section `.text' /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/media-libs/avidemux-core-2.7.0/temp/cca1w2es.ltrans7.ltrans.o: relocation R_X86_64_PC32 against undefined symbol `ff_h264_cabac_tables' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status gmake[3]: *** [/tmp/portage/media-libs/avidemux-core-2.7.0/work/avidemux-core-2.7.0_build/ffmpeg/source/library.mak:94: libavcodec/libADM6avcodec.so.57] Error 1 gmake[3]: Leaving directory '/tmp/portage/media-libs/avidemux-core-2.7.0/work/avidemux-core-2.7.0_build/ffmpeg/build' make[2]: *** [CMakeFiles/libavutil_dummy.dir/build.make:61: CMakeFiles/libavutil_dummy] Error 2 make[2]: Leaving directory '/tmp/portage/media-libs/avidemux-core-2.7.0/work/avidemux-core-2.7.0_build' make[1]: *** [CMakeFiles/Makefile2:71: CMakeFiles/libavutil_dummy.dir/all] Error 2 make[1]: Leaving directory '/tmp/portage/media-libs/avidemux-core-2.7.0/work/avidemux-core-2.7.0_build' make: *** [Makefile:133: all] Error 2 * ERROR: media-libs/avidemux-core-2.7.0::gentoo failed (compile phase): * emake failed These errors are due to using direct symbol references in inline asm (which are not visible to the compiler). Disabling those direct symbol refs in the bundled ffmpeg's configure fixes the build. The attached patch accomplishes this by creating a patch which is applied by avidemux-core's build system to the bundled ffmpeg sources.