ssut / ffmpeg-on-apple-silicon

Build ffmpeg for ARM-based Apple Silicon Macs
222 stars 47 forks source link

Build fails on Mac with m2 - have to disable oam, vid-stab, snappy before build succeeds #15

Open EliasVansteenkiste opened 1 year ago

EliasVansteenkiste commented 1 year ago

I have to disable the following libraries to run the build script successfully. build_aom build_vidstab build_snappy

EliasVansteenkiste commented 1 year ago

Build error for snappy:

+ cmake . -DCMAKE_INSTALL_PREFIX:PATH=/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/sw -DLIBTYPE=STATIC -DENABLE_SHARED=off
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/clang
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/clang - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for byteswap.h
-- Looking for byteswap.h - not found
-- Looking for sys/endian.h
-- Looking for sys/endian.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for zlibVersion in z
-- Looking for zlibVersion in z - found
-- Looking for lzo1x_1_15_compress in lzo2
-- Looking for lzo1x_1_15_compress in lzo2 - not found
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX - Failed
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2 - Failed
-- Performing Test HAVE_CLANG_MAVX
-- Performing Test HAVE_CLANG_MAVX - Success
-- Performing Test HAVE_CLANG_MBMI2
-- Performing Test HAVE_CLANG_MBMI2 - Success
-- Performing Test HAVE_BUILTIN_EXPECT
-- Performing Test HAVE_BUILTIN_EXPECT - Success
-- Performing Test HAVE_BUILTIN_CTZ
-- Performing Test HAVE_BUILTIN_CTZ - Success
-- Performing Test SNAPPY_HAVE_SSSE3
-- Performing Test SNAPPY_HAVE_SSSE3 - Success
-- Performing Test SNAPPY_HAVE_BMI2
-- Performing Test SNAPPY_HAVE_BMI2 - Failed
-- Looking for mmap
-- Looking for mmap - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    ENABLE_SHARED
    LIBTYPE

-- Build files have been written to: /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/snappy-1.1.8
+ make -j 12
Scanning dependencies of target snappy
[ 25%] Building CXX object CMakeFiles/snappy.dir/snappy-sinksource.cc.o
[ 25%] Building CXX object CMakeFiles/snappy.dir/snappy.cc.o
[ 37%] Building CXX object CMakeFiles/snappy.dir/snappy-c.cc.o
[ 50%] Building CXX object CMakeFiles/snappy.dir/snappy-stubs-internal.cc.o
In file included from /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/snappy-1.1.8/snappy.cc:62:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/tmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/snappy-1.1.8/snappy.cc:62:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/tmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/pmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/snappy-1.1.8/snappy.cc:62:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/pmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/emmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/snappy-1.1.8/snappy.cc:62:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/pmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/emmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/snappy-1.1.8/snappy.cc:62:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/pmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/emmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/xmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:37:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
    __builtin_ia32_emms();
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/math.h:671:12: note: '__builtin_isless' declared here
    return isless(__lcpp_x, __lcpp_y);
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/math.h:545:22: note: expanded from macro 'isless'
#define isless(x, y) __builtin_isless((x),(y))
                     ^
In file included from /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/snappy-1.1.8/snappy.cc:62:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/pmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/emmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/xmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:37:25: error: too few arguments to function call, expected 2, have 0
    __builtin_ia32_emms();
    ~~~~~~~~~~~~~~~~~~~~^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:54:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:71:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si'
    return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
           ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:133:19: error: use of undeclared identifier '__builtin_ia32_packsswb'
    return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:163:19: error: use of undeclared identifier '__builtin_ia32_packssdw'
    return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:193:19: error: use of undeclared identifier '__builtin_ia32_packuswb'
    return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:220:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw'
    return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:243:19: error: use of undeclared identifier '__builtin_ia32_punpckhwd'
    return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:264:19: error: use of undeclared identifier '__builtin_ia32_punpckhdq'
    return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:291:19: error: use of undeclared identifier '__builtin_ia32_punpcklbw'
    return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:314:19: error: use of undeclared identifier '__builtin_ia32_punpcklwd'
    return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:335:19: error: use of undeclared identifier '__builtin_ia32_punpckldq'
    return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:356:19: error: use of undeclared identifier '__builtin_ia32_paddb'; did you mean '__builtin_arm_addg'?
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:356:19: note: '__builtin_arm_addg' declared here
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/snappy.dir/snappy.cc.o] Error 1
make[1]: *** [CMakeFiles/snappy.dir/all] Error 2
make: *** [all] Error 2
➜  ffmpeg-on-apple-silicon git:(main) ✗
EliasVansteenkiste commented 1 year ago

Similar issue for vid-stab. It seems to rely on SSE2 which is not available in arm.

Start compiling Vid-stab
+ cd /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile
+ cd vid.stab-1.1.0
+ patch -p1
patching file 'CMakeModules/FindSSE.cmake'
+ cmake . -DCMAKE_INSTALL_PREFIX:PATH=/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/sw -DLIBTYPE=STATIC -DBUILD_SHARED_LIBS=OFF -DUSE_OMP=OFF -DENABLE_SHARED=off
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/clang
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/clang - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- vidstab: writing pkgconfig file /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/vidstab.pc
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    ENABLE_SHARED
    LIBTYPE

-- Build files have been written to: /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0
+ make -j 12
Scanning dependencies of target vidstab
[ 23%] Building C object CMakeFiles/vidstab.dir/src/frameinfo.c.o
[ 23%] Building C object CMakeFiles/vidstab.dir/src/motiondetect.c.o
[ 38%] Building C object CMakeFiles/vidstab.dir/src/serialize.c.o
[ 46%] Building C object CMakeFiles/vidstab.dir/src/motiondetect_opt.c.o
[ 46%] Building C object CMakeFiles/vidstab.dir/src/transformfixedpoint.c.o
[ 23%] Building C object CMakeFiles/vidstab.dir/src/boxblur.c.o
[ 76%] Building C object CMakeFiles/vidstab.dir/src/transformtype.c.o
[ 84%] Building C object CMakeFiles/vidstab.dir/src/libvidstab.c.o
[ 53%] Building C object CMakeFiles/vidstab.dir/src/localmotion2transform.c.o
[ 84%] Building C object CMakeFiles/vidstab.dir/src/transform.c.o
[ 84%] Building C object CMakeFiles/vidstab.dir/src/orc/motiondetectorc.c.o
[ 92%] Building C object CMakeFiles/vidstab.dir/src/vsvector.c.o
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
In file included from /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect_opt.c:34:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/emmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect_opt.c:34:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/emmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from /Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect_opt.c:34:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/emmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/xmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect.c:524:16: warning: using floating point absolute value function 'fabs' when argument is of integer type [-Wabsolute-value]
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:54:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  if (unlikely(fabs(tx) >= maxShift + stepSize - 1  ||
               ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:133:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:163:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:193:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:220:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:243:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:264:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:291:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:314:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:335:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:356:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:377:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:398:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:420:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:443:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/mmintrin.h:465:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
    return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect.c:524:16: note: use function 'abs' instead
  if (unlikely(fabs(tx) >= maxShift + stepSize - 1  ||
               ^~~~
               abs
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/vidstabdefines.h:34:45: note: expanded from macro 'unlikely'
#define unlikely(x)     __builtin_expect(!!(x), 0)
                                            ^
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect.c:525:16: warning: using floating point absolute value function 'fabs' when argument is of integer type [-Wabsolute-value]
               fabs(ty) >= maxShift + stepSize)) {
               ^
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect.c:525:16: note: use function 'abs' instead
               fabs(ty) >= maxShift + stepSize)) {
               ^~~~
               abs
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/vidstabdefines.h:34:45: note: expanded from macro 'unlikely'
#define unlikely(x)     __builtin_expect(!!(x), 0)
                                            ^
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect.c:604:7: warning: using floating point absolute value function 'fabs' when argument is of integer type [-Wabsolute-value]
  if (fabs(tx) >= maxShift + stepSize - 1 || fabs(ty) >= maxShift + stepSize - 1) {
      ^
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect.c:604:7: note: use function 'abs' instead
  if (fabs(tx) >= maxShift + stepSize - 1 || fabs(ty) >= maxShift + stepSize - 1) {
      ^~~~
      abs
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect.c:604:46: warning: using floating point absolute value function 'fabs' when argument is of integer type [-Wabsolute-value]
  if (fabs(tx) >= maxShift + stepSize - 1 || fabs(ty) >= maxShift + stepSize - 1) {
                                             ^
/Users/elias_v/external_repositories/ffmpeg-on-apple-silicon/workdir/compile/vid.stab-1.1.0/src/motiondetect.c:604:46: note: use function 'abs' instead
  if (fabs(tx) >= maxShift + stepSize - 1 || fabs(ty) >= maxShift + stepSize - 1) {
                                             ^~~~
                                             abs
20 errors generated.
make[2]: *** [CMakeFiles/vidstab.dir/src/motiondetect_opt.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
4 warnings generated.
make[1]: *** [CMakeFiles/vidstab.dir/all] Error 2
make: *** [all] Error 2
EliasVansteenkiste commented 1 year ago

libx265 also failed but changing this helped: -DENABLE_ASSEMBLY=OFF but this will come at the cost of encoding speed