[Android Software Development] mori70:
Compiling twrpTarMain for Nexus 5

Hi, I want to compile only twrpTarMain so that I can run it as an executable on my Nexus 5. At first I thought that I could compile it with NDK but it gave me many errors during the build. Then I tried compiling the whole TWRP using this guide but I still couldn't compile it successfully. I've already built an AOSP ROM on my system successfully. Here's exactly what I did to compile TWRP:

mkdir omni
cd omni
repo init -u git://github.com/lj50036/platform_manifest_twrp_omni.git -b twrp-5.1
repo sync

Then I downloaded the device profile for Nexus 5 from here: https://github.com/omnirom/android_device_lge_hammerhead/tree/android-5.1

and put it under this path: omni/device/lge/hammerhead

. build/envsetup.sh
lunch omni_hammerhead-userdebug
make clean
make -j9 recoveryimage

But the build fails with this output:

Install: /home/morteza/omni/out/target/product/hammerhead/recovery/root/sbin/teamwin
CC arch/arm/kernel/traps.o
CC arch/arm/mach-msm/nohlt.o
CC mm/mempool.o
CC arch/arm/mm/highmem.o
CC arch/arm/mach-msm/clock-debug.o
CC arch/arm/mach-msm/acpuclock.o
CC kernel/exec_domain.o
CC arch/arm/kernel/cpuidle.o
CC ipc/util.o
CC mm/oom_kill.o
AS arch/arm/kernel/sleep.o
CC mm/fadvise.o
AS arch/arm/mm/abort-ev7.o
CC arch/arm/mach-msm/perf_trace_counters.o
CC kernel/panic.o
CC arch/arm/kernel/suspend.o
CC fs/open.o
CC fs/read_write.o
AS arch/arm/mm/pabort-v7.o
CC ipc/msgutil.o
CC arch/arm/kernel/smp.o
CC kernel/printk.o
CC ipc/msg.o
CC mm/maccess.o
CC arch/arm/mach-msm/acpuclock-krait.o
CC arch/arm/kernel/smp_tlb.o
CC fs/file_table.o
CC fs/super.o
CC mm/page_alloc.o
AS arch/arm/mm/cache-v7.o
CC kernel/cpu.o
CC arch/arm/kernel/smp_scu.o
CC ipc/sem.o
CC arch/arm/kernel/arch_timer.o
CC fs/char_dev.o
CC arch/arm/kernel/ftrace.o
CC arch/arm/mach-msm/acpuclock-krait-debug.o
CC arch/arm/mm/copypage-v6.o
CC arch/arm/kernel/insn.o
CC kernel/exit.o
CC mm/page-writeback.o
CC ipc/shm.o
CC arch/arm/kernel/unwind.o
CC arch/arm/kernel/devtree.o
CC arch/arm/mm/context.o
CC arch/arm/kernel/swp_emulate.o
CC fs/exec.o
CC arch/arm/mach-msm/msm-krait-l2-accessors.o
CC fs/stat.o
CC kernel/itimer.o
CC mm/readahead.o
CC ipc/ipcns_notifier.o
AS arch/arm/mm/tlb-v7.o
CC arch/arm/kernel/hw_breakpoint.o
CC arch/arm/mach-msm/perf_event_msm_krait_l2.o
CC mm/truncate.o
CC fs/pipe.o
CC mm/swap.o
CC ipc/syscall.o
CC arch/arm/kernel/perf_event.o
CC arch/arm/kernel/pmu.o
AS arch/arm/mm/proc-v7.o
TIMEC kernel/timeconst.h
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /home/morteza/omni/kernel/lge/hammerhead/kernel/timeconst.pl line 373.
/home/morteza/omni/kernel/lge/hammerhead/kernel/Makefile:129: recipe for target 'kernel/timeconst.h' failed
make[3]: *** [kernel/timeconst.h] Error 255
/home/morteza/omni/kernel/lge/hammerhead/Makefile:950: recipe for target 'kernel' failed
make[2]: *** [kernel] Error 2
make[2]: *** Waiting for unfinished jobs....
CC ipc/ipc_sysctl.o
CC arch/arm/kernel/topology.o
CC arch/arm/mach-msm/krait-scm.o
CC fs/namei.o
LD arch/arm/mm/built-in.o
CC mm/vmscan.o
CC fs/fcntl.o
CC arch/arm/kernel/io.o
CC mm/shmem.o
LD ipc/built-in.o
AS arch/arm/kernel/head.o
CC arch/arm/mach-msm/perf_debug.o
AS arch/arm/mach-msm/headsmp.o
CC arch/arm/kernel/init_task.o
CC fs/ioctl.o
CC arch/arm/mach-msm/platsmp.o
CC mm/util.o
CC mm/prio_tree.o
CC fs/readdir.o
CC arch/arm/mach-msm/hotplug.o
LDS arch/arm/kernel/vmlinux.lds
AS arch/arm/mach-msm/idle-v7.o
CC arch/arm/mach-msm/smd.o
CC fs/select.o
CC arch/arm/mach-msm/smd_debug.o
CC mm/mmzone.o
CC mm/vmstat.o
LD arch/arm/kernel/built-in.o
CC fs/fifo.o
CC arch/arm/mach-msm/remote_spinlock.o
CC arch/arm/mach-msm/smd_private.o
CC arch/arm/mach-msm/smem.o
CC fs/dcache.o
CC mm/backing-dev.o
/tmp/ccXoXfyH.s: Assembler messages:
/tmp/ccXoXfyH.s:242: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccXoXfyH.s:280: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
CC arch/arm/mach-msm/smp2p.o
CC arch/arm/mach-msm/smp2p_debug.o
CC mm/page_isolation.o
CC arch/arm/mach-msm/smp2p_gpio.o
CC arch/arm/mach-msm/smp2p_loopback.o
CC arch/arm/mach-msm/smp2p_test.o
CC fs/inode.o
CC arch/arm/mach-msm/smp2p_gpio_test.o
CC mm/mm_init.o
CC arch/arm/mach-msm/smp2p_spinlock_test.o
CC arch/arm/mach-msm/scm.o
CC arch/arm/mach-msm/scm-boot.o
CC arch/arm/mach-msm/peripheral-loader.o
CC arch/arm/mach-msm/scm-pas.o
CC arch/arm/mach-msm/pil-q6v5.o
CC mm/mmu_context.o
CC arch/arm/mach-msm/pil-q6v5-lpass.o
CC fs/attr.o
CC arch/arm/mach-msm/pil-q6v5-mss.o
CC arch/arm/mach-msm/pil-venus.o
CC arch/arm/mach-msm/bam_dmux.o
CC arch/arm/mach-msm/smem_log.o
CC arch/arm/mach-msm/ipc_logging.o
CC mm/percpu.o
CC arch/arm/mach-msm/ipc_logging_debug.o
CC mm/compaction.o
CC fs/bad_inode.o
CC arch/arm/mach-msm/socinfo.o
CC arch/arm/mach-msm/smd_qmi.o
CC arch/arm/mach-msm/smd_pkt.o
CC arch/arm/mach-msm/smd_nmea.o
CC mm/fremap.o
CC fs/file.o
CC mm/highmem.o
CC arch/arm/mach-msm/ipc_router_smd_xprt.o
target thumb C++: recovery <= bootable/recovery/twrp.cpp
CC mm/madvise.o
CC arch/arm/mach-msm/ipc_router.o
CC mm/memory.o
CC fs/filesystems.o
CC fs/namespace.o
CC arch/arm/mach-msm/ipc_socket.o
CC arch/arm/mach-msm/msm_ipc_router_security.o
CC arch/arm/mach-msm/msm_qmi_interface.o
MKCAP arch/arm/mach-msm/smd_rpc_sym.c
CC fs/seq_file.o
CC mm/mincore.o
CC arch/arm/mach-msm/msm_bus/msm_bus_core.o
target thumb C++: recovery <= bootable/recovery/fixContexts.cpp
CC arch/arm/mach-msm/lge/board-8974-hammerhead.o
CC fs/xattr.o
CC arch/arm/mach-msm/lge/board-8974-hammerhead-gpiomux.o
CC mm/mlock.o
CC arch/arm/mach-msm/pm-boot.o
CC arch/arm/mach-msm/qdsp6v2/apr.o
CC arch/arm/mach-msm/qdsp6v2/apr_v2.o
CC arch/arm/mach-msm/qdsp6v2/apr_tal.o
target thumb C++: recovery <= bootable/recovery/twrpTar.cpp
CC arch/arm/mach-msm/qdsp6v2/dsp_debug.o
CC arch/arm/mach-msm/msm_bus/msm_bus_fabric.o
CC mm/mmap.o
CC fs/libfs.o
bootable/recovery/twrpTar.cpp: In member function 'int twrpTar::createTar()':
bootable/recovery/twrpTar.cpp:964:57: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar_no_buffer };
^
bootable/recovery/twrpTar.cpp:964:14: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar_no_buffer };
^
bootable/recovery/twrpTar.cpp:1024:56: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar_no_buffer };
^
bootable/recovery/twrpTar.cpp:1024:13: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar_no_buffer };
^
bootable/recovery/twrpTar.cpp:1074:56: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar_no_buffer };
^
bootable/recovery/twrpTar.cpp:1074:13: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar_no_buffer };
^
bootable/recovery/twrpTar.cpp:1086:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar };
^
bootable/recovery/twrpTar.cpp:1086:12: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar };
^
bootable/recovery/twrpTar.cpp:1089:56: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar_no_buffer };
^
bootable/recovery/twrpTar.cpp:1089:13: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
tar_type = { open, close, read, write_tar_no_buffer };
^
CC arch/arm/mach-msm/qdsp6v2/aac_in.o
CC arch/arm/mach-msm/lge/devices_lge.o
CC arch/arm/mach-msm/qdsp6v2/qcelp_in.o
target thumb C++: recovery <= bootable/recovery/twrpDU.cpp
CC arch/arm/mach-msm/qdsp6v2/evrc_in.o
CC mm/mprotect.o
CC fs/fs-writeback.o
CC arch/arm/mach-msm/msm_bus/msm_bus_config.o
CC arch/arm/mach-msm/lge/lge_handle_panic.o
target thumb C++: recovery <= bootable/recovery/twrpDigest.cpp
CC arch/arm/mach-msm/qdsp6v2/amrnb_in.o
CC arch/arm/mach-msm/qdsp6v2/audio_utils.o
CC arch/arm/mach-msm/msm_bus/msm_bus_arb.o
CC arch/arm/mach-msm/lge/board-8974-rfkill.o
CC mm/mremap.o
CC arch/arm/mach-msm/qdsp6v2/audio_wma.o
CC arch/arm/mach-msm/pm-8x60.o
CC arch/arm/mach-msm/pm-data.o
CC fs/pnode.o
CC arch/arm/mach-msm/msm_bus/msm_bus_bimc.o
CC arch/arm/mach-msm/qdsp6v2/audio_wmapro.o
CC mm/msync.o
CC mm/rmap.o
target thumb C++: recovery <= bootable/recovery/find_file.cpp
CC arch/arm/mach-msm/lge/board-wifi-bcm.o
CC fs/drop_caches.o
CC arch/arm/mach-msm/msm_bus/msm_bus_noc.o
CC arch/arm/mach-msm/pm-stats.o
target thumb C++: recovery <= bootable/recovery/infomanager.cpp
CC arch/arm/mach-msm/qdsp6v2/audio_aac.o
CC mm/vmalloc.o
LD arch/arm/mach-msm/lge/built-in.o
CC arch/arm/mach-msm/spm-v2.o
CC arch/arm/mach-msm/msm_bus/msm_bus_of.o
CC arch/arm/mach-msm/spm_devices.o
target thumb C++: recovery <= bootable/recovery/data.cpp
CC arch/arm/mach-msm/msm_bus/msm_bus_rpm_smd.o
CC arch/arm/mach-msm/qdsp6v2/audio_multi_aac.o
CC fs/splice.o
CC mm/pagewalk.o
CC arch/arm/mach-msm/rpm-regulator-smd.o
CC arch/arm/mach-msm/msm_bus/msm_bus_board_8974.o
CC arch/arm/mach-msm/subsystem_notif.o
CC arch/arm/mach-msm/msm_bus/msm_bus_dbg.o
CC fs/sync.o
CC arch/arm/mach-msm/qdsp6v2/audio_utils_aio.o
target thumb C++: recovery <= bootable/recovery/partition.cpp
CC mm/pgtable-generic.o
CC arch/arm/mach-msm/subsystem_restart.o
CC arch/arm/mach-msm/ramdump.o
CC arch/arm/mach-msm/qdsp6v2/q6audio_v2.o
LD arch/arm/mach-msm/msm_bus/built-in.o
CC arch/arm/mach-msm/qdsp6v2/q6audio_v2_aio.o
CC arch/arm/mach-msm/sysmon.o
CC fs/utimes.o
target thumb C++: recovery <= bootable/recovery/partitionmanager.cpp
CC arch/arm/mach-msm/cpuidle.o
CC mm/process_vm_access.o
target thumb C++: recovery <= bootable/recovery/progresstracking.cpp
CC arch/arm/mach-msm/qdsp6v2/msm_audio_ion.o
CC arch/arm/mach-msm/msm_watchdog_v2.o
CC arch/arm/mach-msm/msm_memory_dump.o
CC arch/arm/mach-msm/qdsp6v2/audio_mp3.o
CC fs/stack.o
CC mm/init-mm.o
CC mm/bootmem.o
CC mm/memblock.o
CC arch/arm/mach-msm/qdsp6v2/audio_amrnb.o
CC mm/bounce.o
CC arch/arm/mach-msm/qdsp6v2/audio_amrwb.o
target thumb C++: recovery <= bootable/recovery/twinstall.cpp
CC arch/arm/mach-msm/qdsp6v2/audio_amrwbplus.o
CC fs/fs_struct.o
CC mm/dmapool.o
CC mm/slub.o
target thumb C++: recovery <= bootable/recovery/twrp-functions.cpp
CC mm/migrate.o
CC arch/arm/mach-msm/qdsp6v2/audio_evrc.o
CC arch/arm/mach-msm/acpuclock-8974.o
CC fs/statfs.o
CC fs/buffer.o
CC arch/arm/mach-msm/clock-local2.o
CC arch/arm/mach-msm/qdsp6v2/audio_qcelp.o
CC arch/arm/mach-msm/qdsp6v2/amrwb_in.o
CC fs/bio.o
LD mm/built-in.o
CC arch/arm/mach-msm/clock-pll.o
CC arch/arm/mach-msm/clock-8974.o
target thumb C++: recovery <= bootable/recovery/openrecoveryscript.cpp
target thumb C: recovery <= bootable/recovery/digest/md5.c
CC fs/block_dev.o
CC arch/arm/mach-msm/qdsp6v2/adsp-loader.o
CC arch/arm/mach-msm/clock-rpm.o
CC fs/direct-io.o
CC arch/arm/mach-msm/qdsp6v2/ultrasound/version_b/q6usm_b.o
CC fs/mpage.o
CC fs/ioprio.o
CC arch/arm/mach-msm/qdsp6v2/ultrasound/version_b/../usf.o
CC arch/arm/mach-msm/clock-mdss-8974.o
CC arch/arm/mach-msm/gdsc.o
CC arch/arm/mach-msm/krait-regulator.o
target thumb C: recovery <= bootable/recovery/tarWrite.c
CC arch/arm/mach-msm/qdsp6v2/ultrasound/version_b/../usfcdev.o
CC arch/arm/mach-msm/test-lpm.o
CC arch/arm/mach-msm/rpm-smd.o
CC fs/proc_namespace.o
CC arch/arm/mach-msm/lpm_levels.o
CC arch/arm/mach-msm/lpm_resources.o
CC arch/arm/mach-msm/mpm-of.o
LD arch/arm/mach-msm/qdsp6v2/ultrasound/version_b/built-in.o
CC arch/arm/mach-msm/rpm_stats.o
target Executable: recovery (/home/morteza/omni/out/target/product/hammerhead/obj/EXECUTABLES/recovery_intermediates/LINKED/recovery)
LD fs/exofs/built-in.o
CC fs/cifs/cifsfs.o
CC fs/debugfs/inode.o
CC arch/arm/mach-msm/rpm_master_stat.o
LD arch/arm/mach-msm/qdsp6v2/built-in.o
CC fs/devpts/inode.o
CC fs/ext2/balloc.o
CC arch/arm/mach-msm/rpm_rbcpr_stats_v2.o
CC arch/arm/mach-msm/rpm_log.o
CC arch/arm/mach-msm/tz_log.o
CC fs/debugfs/file.o
CC fs/cifs/cifssmb.o
LD fs/devpts/devpts.o
CC arch/arm/mach-msm/iommu_domains.o
LD fs/devpts/built-in.o
CC fs/ext2/dir.o
CC arch/arm/mach-msm/event_timer.o
CC arch/arm/mach-msm/ocmem.o
LD fs/debugfs/debugfs.o
LD fs/debugfs/built-in.o
CC fs/ext3/balloc.o
CC arch/arm/mach-msm/ocmem_allocator.o
CC arch/arm/mach-msm/ocmem_notifier.o
CC fs/cifs/cifs_debug.o
CC fs/ext2/file.o
CC arch/arm/mach-msm/ocmem_sched.o
CC fs/ext4/balloc.o
CC arch/arm/mach-msm/ocmem_api.o
CC fs/ext3/bitmap.o
CC fs/ext4/bitmap.o
CC arch/arm/mach-msm/ocmem_rdm.o
CC fs/cifs/connect.o
CC arch/arm/mach-msm/ocmem_core.o
CC fs/cifs/dir.o
CC fs/ext3/dir.o
CC fs/ext2/ialloc.o
CC fs/ext3/file.o
CC fs/ext3/fsync.o
CC fs/ext3/ialloc.o
CC fs/ext3/inode.o
CC fs/ext4/dir.o
CC arch/arm/mach-msm/sensors_adsp.o
CC fs/cifs/file.o
CC fs/ext3/ioctl.o
CC fs/ext2/inode.o
CC fs/ext2/ioctl.o
CC fs/ext3/namei.o
CC fs/ext3/symlink.o
CC fs/ext4/file.o
CC fs/ext3/super.o
CC fs/ext2/namei.o
CC fs/ext2/super.o
CC fs/ext3/hash.o
CC arch/arm/mach-msm/gpiomux-v2.o
CC fs/ext3/resize.o
CC fs/cifs/inode.o
CC fs/ext4/fsync.o
CC fs/ext3/ext3_jbd.o
CC arch/arm/mach-msm/gpiomux.o
CC fs/ext3/xattr.o
CC fs/ext2/symlink.o
CC fs/ext2/xattr.o
CC fs/cifs/link.o
CC fs/cifs/misc.o
CC fs/ext4/ialloc.o
CC arch/arm/mach-msm/msm_rq_stats.o
CC arch/arm/mach-msm/msm_show_resume_irq.o
CC fs/ext2/xattr_user.o
CC fs/ext4/inode.o
CC fs/ext3/xattr_user.o
CC fs/ext2/xattr_trusted.o
CC fs/ext4/page-io.o
CC arch/arm/mach-msm/restart.o
CC fs/ext4/ioctl.o
CC fs/ext4/namei.o
CC fs/cifs/netmisc.o
CC arch/arm/mach-msm/cache_erp.o
CC fs/cifs/smbencrypt.o
CC fs/ext3/xattr_trusted.o
LD fs/ext2/ext2.o
LD fs/ext2/built-in.o
CC fs/cifs/transport.o
CC fs/ext4/super.o
CC arch/arm/mach-msm/wdog_debug.o
LD fs/ext3/ext3.o
CC fs/ext4/symlink.o
CC fs/fat/cache.o
CC fs/cifs/asn1.o
CC fs/cifs/cifs_unicode.o
LD fs/ext3/built-in.o
CC fs/ext4/hash.o
CC arch/arm/mach-msm/msm_mem_hole.o
CC fs/cifs/nterr.o
CC fs/ext4/resize.o
CC fs/fat/dir.o
CC fs/cifs/xattr.o
CC arch/arm/mach-msm/msm_mpmctr.o
CC fs/ext4/extents.o
CC fs/cifs/cifsencrypt.o
CC fs/fuse/dev.o
CC fs/ext4/ext4_jbd2.o
CC fs/fat/fatent.o
CC fs/cifs/readdir.o
CC fs/ext4/migrate.o
CC fs/cifs/ioctl.o
CC fs/ext4/mballoc.o
CC fs/fat/file.o
CC arch/arm/mach-msm/cpufreq.o
CC fs/ext4/block_validity.o
CC fs/fuse/file.o
CC fs/fuse/dir.o
CC fs/fat/inode.o
CC fs/cifs/sess.o
CC fs/fat/misc.o
CC arch/arm/mach-msm/smd_rpc_sym.o
CC fs/cifs/export.o
CC fs/ext4/mmp.o
CC fs/ext4/indirect.o
CC fs/ext4/move_extent.o
CC fs/ext4/xattr.o
CC fs/fuse/inode.o
CC fs/fuse/control.o
LD arch/arm/mach-msm/built-in.o
CC fs/ext4/xattr_user.o
CC fs/fat/namei_vfat.o
CC fs/ext4/xattr_trusted.o
LD fs/cifs/cifs.o
target Symbolic: recovery (/home/morteza/omni/out/target/product/hammerhead/symbols/recovery/root/sbin/recovery)
CC fs/ext4/xattr_security.o
LD fs/fuse/fuse.o
LD fs/fat/fat.o
LD fs/cifs/built-in.o
CC fs/jbd/transaction.o
LD fs/fat/vfat.o
CC fs/jbd/commit.o
LD fs/fuse/built-in.o
LD fs/fat/built-in.o
CC fs/jbd/recovery.o
target Strip: recovery (/home/morteza/omni/out/target/product/hammerhead/obj/EXECUTABLES/recovery_intermediates/recovery)
CC fs/nls/nls_base.o
CC fs/jbd2/transaction.o
LD fs/ext4/ext4.o
CC fs/jbd/checkpoint.o
CC fs/notify/fsnotify.o
Install: /home/morteza/omni/out/target/product/hammerhead/recovery/root/sbin/recovery
CC fs/jbd/revoke.o
LD fs/ext4/built-in.o
CC fs/nls/nls_cp437.o
CC fs/jbd/journal.o
CC fs/jbd2/commit.o
CC fs/jbd2/recovery.o
CC fs/nls/nls_ascii.o
CC fs/notify/notification.o
LD fs/quota/built-in.o
CC fs/notify/group.o
CC fs/ramfs/inode.o
CC fs/nls/nls_iso8859-1.o
CC fs/jbd2/checkpoint.o
LD fs/jbd/jbd.o
CC fs/nls/nls_utf8.o
LD fs/jbd/built-in.o
CC fs/jbd2/revoke.o
CC fs/proc/mmu.o
CC fs/notify/inode_mark.o
CC fs/sysfs/inode.o
CC fs/notify/mark.o
CC fs/sysfs/file.o
LD fs/nls/built-in.o
CC fs/proc/task_mmu.o
CC fs/notify/vfsmount_mark.o
CC fs/ramfs/file-mmu.o
CC fs/proc/inode.o
CC fs/jbd2/journal.o
CC fs/notify/dnotify/dnotify.o
CC fs/sysfs/dir.o
LD fs/notify/fanotify/built-in.o
LD fs/ramfs/ramfs.o
CC fs/proc/root.o
CC fs/proc/base.o
CC fs/notify/inotify/inotify_fsnotify.o
LD fs/ramfs/built-in.o
LD fs/notify/dnotify/built-in.o
CC fs/notify/inotify/inotify_user.o
CC fs/eventpoll.o
CC fs/anon_inodes.o
CC fs/proc/generic.o
LD fs/jbd2/jbd2.o
LD fs/jbd2/built-in.o
CC fs/proc/array.o
CC fs/sysfs/symlink.o
CC fs/signalfd.o
CC fs/timerfd.o
CC fs/proc/proc_tty.o
CC fs/eventfd.o
CC fs/aio.o
LD fs/notify/inotify/built-in.o
CC fs/proc/cmdline.o
LD fs/notify/built-in.o
CC fs/sysfs/mount.o
CC fs/sysfs/bin.o
CC fs/locks.o
CC fs/binfmt_script.o
CC fs/proc/cpuinfo.o
CC fs/binfmt_elf.o
CC fs/sysfs/group.o
CC fs/proc/devices.o
CC fs/proc/consoles.o
CC fs/proc/interrupts.o
CC fs/proc/loadavg.o
CC fs/proc/meminfo.o
CC fs/proc/stat.o
LD fs/sysfs/built-in.o
CC fs/proc/version.o
CC fs/mbcache.o
CC fs/proc/uptime.o
CC fs/dcookies.o
CC fs/proc/softirqs.o
CC fs/proc/namespaces.o
CC fs/proc/proc_sysctl.o
CC fs/proc/proc_net.o
CC fs/proc/kmsg.o
CC fs/proc/page.o
LD fs/proc/proc.o
LD fs/proc/built-in.o
LD fs/built-in.o
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/morteza/omni/kernel/lge/hammerhead'
build/core/tasks/kernel.mk:222: recipe for target 'TARGET_KERNEL_BINARIES' failed
make: *** [TARGET_KERNEL_BINARIES] Error 2

#### make failed to build some targets (36 seconds) ####

What did I do wrong here? Is there any other way to compile twrpTarMain easier?

Thanks.