I was excited when I did more research on gentoo and decided to use it. Now I am disappointed. Nothing works on arm64. The desktop profile is unusable because libglvnd and dav1d libraries cannot be compiled (bugs already reported). The base profile works, but ffmpeg compilation fails. I tried to build a portable workstation on the mobile device and lost two weeks of work. Reproducible: Always Steps to Reproduce: 1. Download stage 3 tarball aarch64. 2. Chroot on Android device (cortex-a76, snapdragon 855) 3. Configure, synchronize and update. 4. emerge -av ffmpeg Actual Results: ... src/libavformat/musx.c {standard input}: Assembler messages: {standard input}:1956: Error: unknown mnemonic `itt' -- `itt gt' {standard input}:1957: Error: unknown mnemonic `movgt' -- `movgt x2,x1' {standard input}:1958: Error: unknown mnemonic `movgt' -- `movgt x1,x21' {standard input}:1960: Error: unknown mnemonic `it' -- `it le' {standard input}:1961: Error: unknown mnemonic `movle' -- `movle x1,x20' {standard input}:1963: Error: unknown mnemonic `it' -- `it gt' {standard input}:1964: Error: unknown mnemonic `movgt' -- `movgt x2,x1' ... make: *** [/var/tmp/portage/media-video/ffmpeg-4.4-r1/work/ffmpeg-4.4/ffbuild/common.mak:67: libavformat/mpegts.o] Error 1
Created attachment 736447 [details] build.log
Created attachment 736450 [details] emerge --info
(In reply to Vasile M. from comment #0) > I was excited when I did more research on gentoo and decided to use it. > Now I am disappointed. Nothing works on arm64. The desktop profile is > unusable because libglvnd and dav1d libraries cannot be compiled (bugs > already reported). > The base profile works, but ffmpeg compilation fails. > > I tried to build a portable workstation on the mobile device and lost two > weeks of work. Please keep this kind of complaining off our bug tracker.
This sort of problem might be triggered by various CFLAGS combinations. Could you try removing "-march=armv8.2-a -mcpu=cortex-a76" from your CFLAGS?
The problem seems to be that the configure script detects ARCH as arm, which should be aarch64 instead. A workaround would be: # EXTRA_FFMPEG_CONF="--arch=aarch64" emerge -av ffmpeg
(In reply to Mike Gilbert from comment #3) > Please keep this kind of complaining off our bug tracker. Obviously this should not be included in a bug tracker, but I am already worried about so many problems. Sorry, I will not do it again. (In reply to Mike Gilbert from comment #4) > Could you try removing "-march=armv8.2-a -mcpu=cortex-a76" from your CFLAGS? aarch64-unknown-linux-gnu-gcc is unable to create an executable file. And the config.log: ... /var/tmp/portage/media-video/ffmpeg-4.4-r1/temp/ffconf.CXklstOL/test.c:3:2: error: #error "unsatisfied condition: defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T" 3 | #error "unsatisfied condition: defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T" ... aarch64-unknown-linux-gnu-gcc: error: missing argument to '-mcpu=' ... Repeated for: TARGET_ARCH_7M, TARGET_ARCH_7EM, TARGET_ARCH_8_A, etc. (In reply to Tee KOBAYASHI from comment #5) >The problem seems to be that the configure script detects ARCH as arm, which should be aarch64 instead. >A workaround would be: ># EXTRA_FFMPEG_CONF="--arch=aarch64" emerge -av ffmpeg Yes, it's the same problem for libglvnd. With --arch=aarch64 flag, ffmpeg can be compiled now. Thank you very much. I don't know if the Gentoo package maintainer is responsible for the configure script or belongs to the ffmpeg developers. Therefore I do not know whether to consider this bug as solved or wait for someone to adapt the script so that it automatically detects the architecture.
(In reply to Vasile M. from comment #6) > (In reply to Mike Gilbert from comment #3) > > Please keep this kind of complaining off our bug tracker. > > Obviously this should not be included in a bug tracker, but I am already > worried about so many problems. Sorry, I will not do it again. > And for what it's worth, yes, arm64 does work rather well, it's because you're using armv8l as explained in bug 809293. I don't know if this is just build system misdetection or something more.
(In reply to Sam James from comment #7) > And for what it's worth, yes, arm64 does work rather well, it's because > you're using armv8l as explained in bug 809293. I don't know if this is just > build system misdetection or something more. Hum, I just saw that /proc/cpuinfo inside the chroot does not match the /proc/cpuinfo of the device. The output of the lscpu is also different. The lscpu command shows the aarch64 architecture in the device and armv8l architecture in chroot (ArchLinux and Gentoo). This is not a forum to discuss, but in the forum no one has answered me. I don't want to bother here and I don't know what to do.
Created attachment 736507 [details] lscpu and /proc/cpuinfo chroot script ... mount --rbind /proc "$CHROOT/proc" mount --rbind /sys "$CHROOT/sys" ...
Solved. The architecture in chroot (Android) is wrong. To choose the appropriate architecture, you must execute the setarch command. setarch --list setarch aarch64 I will investigate how to make aarch64 as the default architecture when doing the chroot proces.