SOLVED: Cant compile androidbuildlibs.sh

Solved this by downgrading to gcc-7 / g+±7 .

I can install SDL 2.0.12 using ./configure && make all && sudo make install but when I try to run androidbuildlibs.sh from the build-scripts directory it always fails what am I doing wrong. I am on linux mint 20.04 using gcc8 and ndk(r21d).

$ ./androidbuildlibs.sh
[armeabi-v7a] Compile thumb : SDL2 <= SDL_assert.c
In file included from ./src/SDL_assert.c:27:
In file included from ./include/SDL.h:38:
In file included from ./include/SDL_cpuinfo.h:86:
In file included from /home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/immintrin.h:14:
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:50: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:129: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:159: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:189: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:216: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:239: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:260: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:287: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:310: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:331: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:352: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:373: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:394: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:416: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:439: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:461: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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:483: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_paddusw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:504: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_psubb((__v8qi)__m1, (__v8qi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sajid/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/mmintrin.h:525: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_psubw((__v4hi)__m1, (__v4hi)__m2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [/home/sajid/android/sdk/ndk-bundle/build/core/build-binary.mk:476: build/android/obj/local/armeabi-v7a/objs/SDL2/src/SDL_assert.o] Error 1