lilliput icon indicating copy to clipboard operation
lilliput copied to clipboard

Compile warning on Ubuntu 20.04.2 LTS

Open loeffel-io opened this issue 3 years ago • 4 comments

CGO_ENABLED=1 go build -o finsmart-storage-api
# github.com/discord/lilliput
In file included from ../pkg/mod/github.com/discord/[email protected]/deps/linux/include/libavutil/common.h:464,
                 from ../pkg/mod/github.com/discord/[email protected]/deps/linux/include/libavutil/avutil.h:296,
                 from ../pkg/mod/github.com/discord/[email protected]/deps/linux/include/libavutil/samplefmt.h:24,
                 from ../pkg/mod/github.com/discord/[email protected]/deps/linux/include/libavcodec/avcodec.h:31,
                 from avcodec.cpp:7:
../pkg/mod/github.com/discord/[email protected]/deps/linux/include/libavutil/mem.h:341:79: warning: ‘alloc_size’ attribute ignored on a function returning ‘int’ [-Wattributes]
  341 | av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
      |

loeffel-io avatar Feb 26 '21 19:02 loeffel-io

Apparently, they fixed this in a newer version of ffmpeg.

Line from lilliput mem.h (Line 341): av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size);

Line from latest git repo on ffmpeg website (Line 348 at https://git.ffmpeg.org/gitweb/ffmpeg.git/tree/HEAD:/libavutil): int av_reallocp_array(void *ptr, size_t nmemb, size_t size);

Commit that fixed the issue: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/4361293fcf59edb56879c36edcd25f0a91e0edf8

ldhacker avatar Apr 09 '21 17:04 ldhacker

I noticed that the same file is being used in the OSX version. Could a ffmpeg version bump fix this?

ldhacker avatar Apr 09 '21 17:04 ldhacker

Same on 20.04 LTS (Focal Fossa) :(

SilverTee avatar May 18 '21 15:05 SilverTee

Sounds like the package distros need to be rebuilt with newer ffmpeg? up to date Arch distro affected so doesn't seem like local ffmpeg version matters

kim-hetrafi avatar Jul 29 '21 14:07 kim-hetrafi