Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 921312

Summary: media-video/ffmpeg (all versions) fails to compile in arm chroot on arm64 kernel
Product: Gentoo Linux Reporter: matoro <matoro_gentoo>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED INVALID    
Severity: normal CC: arm64, matoro_gentoo
Priority: Normal    
Version: unspecified   
Hardware: ARM64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 919014    
Attachments: build.log and emerge --info

Description matoro archtester 2024-01-03 20:15:27 UTC
All versions of media-video/ffmpeg in tree try to compile 64-bit asm when running in a 32-bit chroot with a 64-bit kernel.  Log is from 9999 but this happens on all versions.

armv7a-unknown-linux-gnueabihf-gcc -I. -Isrc/ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -DBUILDING_avformat -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard   -march=armv7-a -std=c11 -fPIC -pthread    -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -Wno-maybe-uninitialized   -MMD -MF libavformat/ac4dec.d -MT libavformat/ac4dec.o -c -o libavformat/ac4dec.o src/libavformat/ac4dec.c
In file included from src/libavutil/bswap.h:38,
                 from src/libavutil/intreadwrite.h:25,
                 from src/libavformat/3dostr.c:22:
In function ‘av_bswap32’,
    inlined from ‘threedostr_probe’ at src/libavformat/3dostr.c:30:26:
src/libavutil/aarch64/bswap.h:42:5: error: invalid 'asm': invalid operand for code 'w'
   42 |     __asm__("rev %w0, %w1" : "=r"(y) : "r"(x));
      |     ^~~~~~~

Reproducible: Always
Comment 1 matoro archtester 2024-01-03 20:17:00 UTC
Created attachment 881430 [details]
build.log and emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-03 20:18:25 UTC
Did you do linux32?
Comment 3 matoro archtester 2024-01-03 21:05:54 UTC
(In reply to Sam James from comment #2)
> Did you do linux32?

Oops, was not aware of this, thanks!