You are not logged in.

#1 2023-10-09 09:48:24

spicefire
Member
Registered: 2023-10-09
Posts: 3

[Solved] ffmpeg-compat-59 - Error: operand type mismatch for `shr'

Hi, I want to install ffmpeg-compat-59 but get this error during build time:

[usrx@serv1 ~]$ yay -S ffmpeg-compat-59
...
GEN     libswresample/libswresample.ver
LD      libswresample/libswresample.so.4
LD      libavcodec/libavcodec.so.59
lto-wrapper: warning: using serial compilation of 128 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
libavcodec/x86/mathops.h: Assembler messages:
libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
...
libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [ffbuild/library.mak:119: libavcodec/libavcodec.so.59] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: ffmpeg-compat-59-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
ffmpeg-compat-59 - exit status 4
[usrx@serv1 ~]$ 

Full output can be found on pastebin.
Any ideas on how to solve this?

Last edited by spicefire (2023-10-09 15:00:27)

Offline

#2 2023-10-09 10:36:43

loqs
Member
Registered: 2014-03-06
Posts: 17,908

Re: [Solved] ffmpeg-compat-59 - Error: operand type mismatch for `shr'

ffmpeg-compat-59 needs to be patched with effadce6c756247ea8bae32dc13bb3e6f464f0eb.

diff --git a/PKGBUILD b/PKGBUILD
index 7d2af48..228f527 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -51,8 +51,15 @@ provides=(
     "libpostproc.so=56" "libswresample.so=4" "libswscale.so=6"
 )
 
-source=(http://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz)
-sha256sums=("1b113593ff907293be7aed95acdda5e785dd73616d7d4ec90a0f6adbc5a0312e")
+source=(http://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz
+        effadce6c756247ea8bae32dc13bb3e6f464f0eb.patch::https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb)
+sha256sums=('1b113593ff907293be7aed95acdda5e785dd73616d7d4ec90a0f6adbc5a0312e'
+            'fec03e133521486ca258ae34ddf093eb6aab23f848c4332c367aadbfeaefda04')
+
+prepare() {
+  # Fix assembling with binutil as >= 2.41
+  patch -Np1 -i ../effadce6c756247ea8bae32dc13bb3e6f464f0eb.patch -d ffmpeg-${pkgver}
+}
 
 build() {
     cd ffmpeg-${pkgver}

Offline

#3 2023-10-09 14:59:44

spicefire
Member
Registered: 2023-10-09
Posts: 3

Re: [Solved] ffmpeg-compat-59 - Error: operand type mismatch for `shr'

Thank you

Offline

Board footer

Powered by FluxBB