flar2 / ElementalX-m9

ElementalX for HTC One m9
http://elementalx.org/devices/htc-one-m9/
Other
6 stars 10 forks source link

Cannot compile #4

Open ghost opened 5 years ago

ghost commented 5 years ago

I don't know if I'm using the wrong toolchain or if I'm doing something wrong, but the sources for Elemental-X-5.00 aren't compiling. Terminal output:

HOSTCC  scripts/basic/fixdep
  GEN     /home/lava/Documents/M9_Kali/kernel/out/Makefile
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from /home/lava/Documents/M9_Kali/kernel/scripts/kconfig/zconf.tab.c:2500:
/home/lava/Documents/M9_Kali/kernel/scripts/kconfig/confdata.c: In function ‘conf_write’:
/home/lava/Documents/M9_Kali/kernel/scripts/kconfig/confdata.c:762:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  762 |  sprintf(newname, "%s%s", dirname, basename);
      |                   ^~~~~~
/home/lava/Documents/M9_Kali/kernel/scripts/kconfig/confdata.c:762:19: note: assuming directive output of 7 bytes
/home/lava/Documents/M9_Kali/kernel/scripts/kconfig/confdata.c:762:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097
  762 |  sprintf(newname, "%s%s", dirname, basename);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lava/Documents/M9_Kali/kernel/scripts/kconfig/confdata.c:765:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  765 |   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
      |                    ^~~~~~~~~~~~~~~~~
/home/lava/Documents/M9_Kali/kernel/scripts/kconfig/confdata.c:765:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097
  765 |   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  HOSTLD  scripts/kconfig/conf
warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
#
# configuration written to .config
#

  GEN     /home/lava/Documents/M9_Kali/kernel/out/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
  GEN     /home/lava/Documents/M9_Kali/kernel/out/Makefile
  WRAP    arch/arm64/include/generated/asm/checksum.h
  WRAP    arch/arm64/include/generated/asm/clkdev.h
  WRAP    arch/arm64/include/generated/asm/bugs.h
  WRAP    arch/arm64/include/generated/asm/cputime.h
  WRAP    arch/arm64/include/generated/asm/delay.h
  WRAP    arch/arm64/include/generated/asm/current.h
  WRAP    arch/arm64/include/generated/asm/div64.h
  WRAP    arch/arm64/include/generated/asm/dma.h
  WRAP    arch/arm64/include/generated/asm/emergency-restart.h
  WRAP    arch/arm64/include/generated/asm/early_ioremap.h
  WRAP    arch/arm64/include/generated/asm/errno.h
  WRAP    arch/arm64/include/generated/asm/ftrace.h
  WRAP    arch/arm64/include/generated/asm/hw_irq.h
  WRAP    arch/arm64/include/generated/asm/ioctls.h
  WRAP    arch/arm64/include/generated/asm/ioctl.h
  WRAP    arch/arm64/include/generated/asm/ipcbuf.h
  WRAP    arch/arm64/include/generated/asm/irq_regs.h
  WRAP    arch/arm64/include/generated/asm/kmap_types.h
  WRAP    arch/arm64/include/generated/asm/kvm_para.h
  WRAP    arch/arm64/include/generated/asm/kdebug.h
  WRAP    arch/arm64/include/generated/asm/local.h
  WRAP    arch/arm64/include/generated/asm/local64.h
  WRAP    arch/arm64/include/generated/asm/mcs_spinlock.h
  WRAP    arch/arm64/include/generated/asm/mman.h
  WRAP    arch/arm64/include/generated/asm/msgbuf.h
  WRAP    arch/arm64/include/generated/asm/pci.h
  WRAP    arch/arm64/include/generated/asm/mutex.h
  WRAP    arch/arm64/include/generated/asm/rwsem.h
  WRAP    arch/arm64/include/generated/asm/poll.h
  WRAP    arch/arm64/include/generated/asm/resource.h
  WRAP    arch/arm64/include/generated/asm/scatterlist.h
  WRAP    arch/arm64/include/generated/asm/sections.h
  WRAP    arch/arm64/include/generated/asm/segment.h
  WRAP    arch/arm64/include/generated/asm/serial.h
  WRAP    arch/arm64/include/generated/asm/sembuf.h
  WRAP    arch/arm64/include/generated/asm/shmbuf.h
  WRAP    arch/arm64/include/generated/asm/simd.h
  WRAP    arch/arm64/include/generated/asm/sizes.h
  WRAP    arch/arm64/include/generated/asm/socket.h
  WRAP    arch/arm64/include/generated/asm/sockios.h
  WRAP    arch/arm64/include/generated/asm/switch_to.h
  WRAP    arch/arm64/include/generated/asm/termbits.h
  WRAP    arch/arm64/include/generated/asm/swab.h
  WRAP    arch/arm64/include/generated/asm/termios.h
  WRAP    arch/arm64/include/generated/asm/topology.h
  WRAP    arch/arm64/include/generated/asm/trace_clock.h
  WRAP    arch/arm64/include/generated/asm/types.h
  WRAP    arch/arm64/include/generated/asm/unaligned.h
  WRAP    arch/arm64/include/generated/asm/user.h
  WRAP    arch/arm64/include/generated/asm/xor.h
  WRAP    arch/arm64/include/generated/asm/vga.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  WRAP    arch/arm64/include/generated/uapi/asm/kvm_para.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  HOSTCC  scripts/basic/fixdep
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md

Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md

Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md

Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md

  Using /home/lava/Documents/M9_Kali/kernel as source for kernel
  /home/lava/Documents/M9_Kali/kernel is not clean, please run 'make mrproper'
  in the '/home/lava/Documents/M9_Kali/kernel' directory.
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/bin2c
  CC      scripts/mod/empty.o
  HOSTCC  scripts/genksyms/genksyms.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/sortextable
/home/lava/Documents/M9_Kali/kernel/scripts/sortextable.c:68:1: warning: ‘succeed_file’ defined but not used [-Wunused-function]
   68 | succeed_file(void)
      | ^~~~~~~~~~~~
  HOSTCC  scripts/selinux/mdp/mdp
In file included from /home/lava/Documents/M9_Kali/kernel/scripts/sortextable.c:166:
/home/lava/Documents/M9_Kali/kernel/scripts/sortextable.c: In function ‘main’:
/home/lava/Documents/M9_Kali/kernel/scripts/sortextable.h:158:3: warning: ‘relocs_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  158 |   memset(relocs, 0, relocs_size);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lava/Documents/M9_Kali/kernel/scripts/sortextable.h:104:6: note: ‘relocs_size’ was declared here
  104 |  int relocs_size;
      |      ^~~~~~~~~~~
In file included from /home/lava/Documents/M9_Kali/kernel/scripts/sortextable.c:164:
/home/lava/Documents/M9_Kali/kernel/scripts/sortextable.h:158:3: warning: ‘relocs_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  158 |   memset(relocs, 0, relocs_size);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lava/Documents/M9_Kali/kernel/scripts/sortextable.h:104:6: note: ‘relocs_size’ was declared here
  104 |  int relocs_size;
      |      ^~~~~~~~~~~
  SHIPPED scripts/genksyms/lex.lex.c
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/devicetable-offsets.s
  SHIPPED scripts/dtc/dtc-lexer.lex.c
  SHIPPED scripts/genksyms/keywords.hash.c
  SHIPPED scripts/genksyms/parse.tab.h
  SHIPPED scripts/dtc/dtc-parser.tab.h
  SHIPPED scripts/genksyms/parse.tab.c
  SHIPPED scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/util.o
  HOSTLD  scripts/genksyms/genksyms
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
make[1]: *** [/home/lava/Documents/M9_Kali/kernel/Makefile:851: prepare3] Error 1
make[1]: *** Waiting for unfinished jobs....
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  GEN     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTLD  scripts/mod/modpost
make: *** [Makefile:130: sub-make] Error 2

Toolchain used: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9

Commands used to compile:

export ARCH=arm64
export CROSS_COMPILE=`pwd`/toolchain/bin/aarch64-linux-android-
export PATH=$PATH:`pwd`/toolchain/bin
mkdir out
make ARCH=arm64 O=out elementalx_defconfig
make ARCH=arm64 O=out -j8
ghost commented 5 years ago

Compiling now. Just had to run make mrproper before compiling. It's compiling INCREDIBLY slow though. Barely touching even a single core.

Screenshot from 2019-08-19 21-47-22