termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
1.96k stars 301 forks source link

APK Build Error #446

Closed ayghri closed 1 year ago

ayghri commented 1 year ago

I followed the usual process, then opened the project using a fresh install of Android Studio and attempted to build the APK.

I got (only showing arm64-v8a)

Executing tasks: [:app:assembleDebug, :app:assembleDebugUnitTest, :app:assembleDebugAndroidTest, :shell-loader:assembleDebug, :shell-loader:assembleDebugUnitTest, :shell-loader:assembleDebugAndroidTest] in project /home/repo/AndroidProjects/termux-x11
....

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a'
  [1/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-x86.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-x86.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-x86.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-x86.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-x86.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-x86.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [2/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-mips.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-mips.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-mips.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-mips.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-mips.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-mips.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [3/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-ppc.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-ppc.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-ppc.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-ppc.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-ppc.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-ppc.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [4/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-arm.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-arm.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-arm.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-arm.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-arm.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-arm.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [5/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-filter.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-filter.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-filter.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-filter.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-filter.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-filter.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [6/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-general.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-general.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-general.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-general.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-general.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-general.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [7/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-conical-gradient.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-conical-gradient.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-conical-gradient.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-conical-gradient.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-conical-gradient.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-conical-gradient.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [8/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-gradient-walker.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-gradient-walker.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-gradient-walker.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-gradient-walker.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-gradient-walker.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-gradient-walker.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [9/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [10/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-glyph.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-glyph.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-glyph.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-glyph.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-glyph.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-glyph.c
  /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-glyph.c:395:16: warning: unknown attribute '__force_align_arg_pointer__' ignored [-Wunknown-attributes]
  __attribute__((__force_align_arg_pointer__))
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-glyph.c:637:16: warning: unknown attribute '__force_align_arg_pointer__' ignored [-Wunknown-attributes]
  __attribute__((__force_align_arg_pointer__))
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  2 warnings generated.
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [11/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-edge-accessors.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-edge-accessors.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-edge-accessors.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-edge-accessors.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-edge-accessors.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-edge-accessors.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [12/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-edge.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-edge.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-edge.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-edge.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-edge.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-edge.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [13/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-combine32.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-combine32.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-combine32.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-combine32.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-combine32.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-combine32.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [14/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-bits-image.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-bits-image.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-bits-image.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-bits-image.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-bits-image.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-bits-image.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [15/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-access-accessors.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-access-accessors.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-access-accessors.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-access-accessors.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-access-accessors.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-access-accessors.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [16/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-access.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-access.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-access.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-access.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-access.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-access.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [17/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-combine-float.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-combine-float.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-combine-float.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-combine-float.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-combine-float.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-combine-float.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  [18/507] Building C object CMakeFiles/pixman.dir/pixman/pixman/pixman-fast-path.c.o
  FAILED: CMakeFiles/pixman.dir/pixman/pixman/pixman-fast-path.c.o 
  /home/user/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=aarch64-none-linux-android26 --sysroot=/home/aghriss/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -I/home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman -I/home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -g -DNDEBUG -fPIC -DHAVE_BUILTIN_CLZ=1 -DHAVE_PTHREADS=1 -DPACKAGE=\"pixman\" -DTLS=__thread -DSIZEOF_LONG=8 -DUSE_OPENMP=1 -DUSE_ARM_A64_NEON=1 -fno-integrated-as -B /usr/aarch64-linux-gnu/bin -std=gnu11 -MD -MT CMakeFiles/pixman.dir/pixman/pixman/pixman-fast-path.c.o -MF CMakeFiles/pixman.dir/pixman/pixman/pixman-fast-path.c.o.d -o CMakeFiles/pixman.dir/pixman/pixman/pixman-fast-path.c.o -c /home/repo/AndroidProjects/termux-x11/app/src/main/cpp/pixman/pixman/pixman-fast-path.c
  /usr/bin/as: unrecognized option '-EL'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.

  C++ build system [build] failed while executing:
      /home/user/Android/Sdk/cmake/3.22.1/bin/ninja \
        -C \
        /home/repo/AndroidProjects/termux-x11/app/.cxx/Debug/1mk6d6v9/arm64-v8a \
        Xlorie
    from /home/repo/AndroidProjects/termux-x11/app

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

System:

OS: Gentoo Linux x86_64
Kernel: 6.1.41-x86_64
CPU: 11th Gen Intel i7-11700K (16) @ 4.900GHz
twaik commented 1 year ago

You must have /usr/aarch64-linux-gnu/bin/as. Currently it is missing.

ayghri commented 1 year ago

aarch64 toolchain needed: https://wiki.gentoo.org/wiki/Android/SharkBait/Building_a_toolchain_for_aarch64-linux-android

twaik commented 1 year ago

Simple asm crosscompiler from will fit.

twaik commented 1 year ago

Not for Android.

ayghri commented 1 year ago

I'd be grateful if you could share some links on how to do it. The Android Developer website is all over the place on this.

twaik commented 1 year ago

Asm compiler is not related to Android toolchain.

twaik commented 1 year ago
equery belongs /usr/aarch64-linux-gnu/bin/as
twaik commented 1 year ago

Did it work?

ayghri commented 1 year ago

Nope it didn't. But it was a good hint. In Debian, /usr/aarch64-linux-gnu/bin/as is provided by binutils-aarch64-linux-gnu. By looking for how to get that file on Gentoo I came across this one https://wiki.gentoo.org/wiki/User:Zulu_Foxtrott/ARM64/Blocks/Host You'd expect that the binaries to be in /usr/aarch64-linux-gnu, but they were not. I found them in /usr/x86_64-pc-linux-gnu/aarch64-linux-gnu/binutils-bin/2.40/

So I went ahead and edited pixman recipe:

...
    set(PIXMAN_CFLAGS ${PIXMAN_CFLAGS} "-DUSE_ARM_A64_NEON=1" "-fno-integrated-as" "-B" "/usr/x86_64-pc-linux-gnu/aarch64-linux-gnu/binutils-bin/2.40/")

Now the arm64-v8a compiles successfully!

I'm guessing there is a cleaner way to doing it... but it works

twaik commented 1 year ago

Actually that is the best way to do this.

twaik commented 1 year ago

Maybe better way would be finding pixman implementation which can be compiled with NDK. I found this one but it seems to be very outdated (version 0.30 was released more that 10 years ago).

ayghri commented 1 year ago

I appreciate the help 🙏

twaik commented 5 months ago

Ok, should be fine after 8d685809dd47360142d23d0f086401104c9ebb16 . Pixman 0.43.4 can work with clang's own asm compiler.