ponchio / untrunc

Restore a damaged (truncated) mp4, m4v, mov, 3gp video. Provided you have a similar not broken video.
GNU General Public License v2.0
1.64k stars 229 forks source link

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

Open jose1711 opened 1 year ago

jose1711 commented 1 year ago

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
gouchi commented 12 months ago

Hi,

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

Thank you.

Source

jose1711 commented 12 months ago

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

anyback commented 9 months ago

same error when compiling from source on gentoo.

hamster4430 commented 9 months ago

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.

davidebeatrici commented 8 months ago

@gouchi I confirm the patch fixes compilation on Debian.

sixtyfive commented 5 months ago

Also works on Arch.