From 6391480b80c3e84b6ea6e05c38645fefc5250ba5 Mon Sep 17 00:00:00 2001 From: Andre Herbst Date: Thu, 29 Jun 2023 05:07:16 +0200 Subject: [PATCH] Ports/ffmpeg: Build shared libraries by using configure option This fixes build error: relocation R_X86_64_PC32 against symbol `ff_pw_5' can not be used when making a shared object; recompile with -fPIC --- Ports/ffmpeg/package.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Ports/ffmpeg/package.sh b/Ports/ffmpeg/package.sh index 96fe9afbc9..04f418bdb2 100755 --- a/Ports/ffmpeg/package.sh +++ b/Ports/ffmpeg/package.sh @@ -18,14 +18,11 @@ configure() { --enable-gpl \ --enable-libx264 \ --enable-libx265 \ + --enable-shared \ --disable-stripping \ --disable-avx } install() { run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" install - for lib in libavcodec libavdevice libavfilter libavformat libavutil; do - ${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/${lib}.so -Wl,-soname,${lib}.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/${lib}.a -Wl,--no-whole-archive -liconv -ltiff -llzma -lbz2 - rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/$lib.la - done }