untrunc icon indicating copy to clipboard operation
untrunc copied to clipboard

mathops.h:125: Error: operand type mismatch for `shr'

Open jose1711 opened this issue 2 years ago • 7 comments

On ArchLinux x86_64 with ffmpeg4.4 installed I am getting

$ make
..
..
./libavutil/mem.h:174:1: warning: ‘alloc_size’ attribute ignored on a function returning ‘int’ [-Wattributes]
  174 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
      | ^~~~~~~~~~~~~
CC	libavformat/adtsenc.o
In file included from ./libavutil/common.h:373,
                 from ./libavcodec/get_bits.h:31,
                 from libavformat/adtsenc.c:23:
./libavutil/mem.h:174:1: warning: ‘alloc_size’ attribute ignored on a function returning ‘int’ [-Wattributes]
  174 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
      | ^~~~~~~~~~~~~
./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'
make: *** [Makefile:48: libavformat/adtsenc.o] Error 1

jose1711 avatar Oct 10 '23 19:10 jose1711

Hi,

Can you try this patch if it fixes the compilation issue ?

Thank you.

Source

gouchi avatar Nov 11 '23 21:11 gouchi

Thank you, that indeed made the package compile. Will update the PKGBUILD shortly. Thanks for the hint!

jose1711 avatar Nov 11 '23 22:11 jose1711

same error when compiling from source on gentoo.

anyback avatar Feb 12 '24 15:02 anyback

I followed the guide step by step and got the same issue on Manjaro. Then found untrunc in AUR via stock software manager pamac and it compiled successfully.

hamster4430 avatar Feb 13 '24 20:02 hamster4430

@gouchi I confirm the patch fixes compilation on Debian.

davidebeatrici avatar Feb 14 '24 22:02 davidebeatrici

Also works on Arch.

sixtyfive avatar May 17 '24 21:05 sixtyfive

Also works on ubuntu 24.

rankaiyx avatar Feb 14 '25 07:02 rankaiyx