allyourcodebase / ffmpeg

FFmpeg Zig package
Other
181 stars 24 forks source link

build failed for arm #16

Open marryton007 opened 3 months ago

marryton007 commented 3 months ago

OS: ubuntu24.04 Zig: 0.14.0-dev.1304+7d54c62c8 branch: main

I also try to build on ubuntu18.04(at company), it got same error.

compile command: zig build -Dtarget=arm-linux-gnueabihf

build log:
build.log

some log messages;

/home/vagrant/git/ffmpeg/libavcodec/arm/hevcdsp_qpel_neon.S:739:9: note: while in macro instantiation
        hevc_put_qpel_uw_hXvY_neon_8 qpel_filter_3, qpel_filter_3_32b
        ^
<instantiation>:10:9: error: instruction requires: NEON
        vadd.u16 q7, q13
        ^
...

/home/vagrant/git/ffmpeg/libavcodec/arm/hevcdsp_qpel_neon.S:889:9: error: instruction requires: NEON
        vshll.u8 q12, d4, #6
        ^
/home/vagrant/git/ffmpeg/libavcodec/arm/hevcdsp_qpel_neon.S:890:9: error: instruction requires: NEON
        vshll.u8 q13, d5, #6
        ^
/home/vagrant/git/ffmpeg/libavcodec/arm/hevcdsp_qpel_neon.S:891:9: error: instruction requires: fp registers
        vstm r0, {q8, q9, q10, q11, q12, q13}
        ^
/home/vagrant/git/ffmpeg/libavcodec/arm/hevcdsp_qpel_neon.S:900:9: error: invalid instruction
        vld1.8 {q0, q1}, [r1]
        ^
/home/vagrant/git/ffmpeg/libavcodec/arm/hevcdsp_qpel_neon.S:902:9: error: invalid instruction
        vld1.8 {q2, q3}, [r1], r2
        ^
/home/vagrant/git/ffmpeg/libavcodec/arm/hevcdsp_qpel_neon.S:905:9: error: instruction requires: NEON
marryton007 commented 3 months ago

Upgrade latest night build of zig, build with the follow command:

$ zig version
0.14.0-dev.1366+d997ddaa1
$ zig build -Dtarget=arm-linux-gnueabihf -Dcpu=cortex_a7+neon

it issues few errors:

vagrant@vagrant:~/git/ffmpeg$ zig build -Dtarget=arm-linux-gnueabihf -Dcpu=cortex_a7+neon
install
└─ install show_metadata_zig
   └─ zig build-exe show_metadata_zig Debug arm-linux-gnueabihf
      └─ zig build-lib ffmpeg Debug arm-linux-gnueabihf 1 errors
/home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:1:1: error: clang exited with code 1
error: error(compilation): clang failed with stderr: /home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:239:11: error: unexpected token in argument list
CO_RY .dn d0.s16[0]
          ^
/home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:240:11: error: unexpected token in argument list
CO_RU .dn d0.s16[1]
          ^
/home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:241:11: error: unexpected token in argument list
CO_RV .dn d0.s16[2]
          ^
/home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:244:11: error: unexpected token in argument list
CO_GY .dn d1.s16[0]
          ^
/home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:245:11: error: unexpected token in argument list
CO_GU .dn d1.s16[1]
          ^
/home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:246:11: error: unexpected token in argument list
CO_GV .dn d1.s16[2]
          ^
/home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:249:11: error: unexpected token in argument list
CO_BY .dn d2.s16[0]
          ^
/home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:250:11: error: unexpected token in argument list
CO_BU .dn d2.s16[1]
          ^
/home/vagrant/git/ffmpeg/libswscale/arm/rgb2yuv_neon_common.S:251:11: error: unexpected token in argument list
CO_BV .dn d2.s16[2]
          ^

error: the following command failed with 1 compilation errors:
/home/vagrant/.version-fox/cache/zig/v-0.14.0-dev.1366+d997ddaa1/zig-0.14.0-dev.1366+d997ddaa1/zig build-lib @/home/vagrant/git/ffmpeg/.zig-cache/args/37e9fd19d09c298e3202da11d587314b8b524b2b134e5af8beec7ee1e8e0b044
Build Summary: 12/19 steps succeeded; 1 failed
install transitive failure
├─ install ffmpeg transitive failure
│  └─ zig build-lib ffmpeg Debug arm-linux-gnueabihf 1 errors
├─ install show_metadata_c transitive failure
│  └─ zig build-exe show_metadata_c Debug arm-linux-gnueabihf transitive failure
│     └─ zig build-lib ffmpeg Debug arm-linux-gnueabihf (+11 more reused dependencies)
└─ install show_metadata_zig transitive failure
   └─ zig build-exe show_metadata_zig Debug arm-linux-gnueabihf transitive failure
      └─ zig build-lib ffmpeg Debug arm-linux-gnueabihf (+11 more reused dependencies)
error: the following build command failed with exit code 1:
/home/vagrant/git/ffmpeg/.zig-cache/o/f2166c2a4834ea0c7931c133cb0bbf64/build /home/vagrant/.version-fox/cache/zig/v-0.14.0-dev.1366+d997ddaa1/zig-0.14.0-dev.1366+d997ddaa1/zig /home/vagrant/.version-fox/cache/zig/v-0.14.0-dev.1366+d997ddaa1/zig-0.14.0-dev.1366+d997ddaa1/lib /home/vagrant/git/ffmpeg /home/vagrant/git/ffmpeg/.zig-cache /home/vagrant/.cache/zig --seed 0x203284d4 -Zeadaeeef9f3ad594 -Dtarget=arm-linux-gnueabihf -Dcpu=cortex_a7+neon