[OnePlus 3T Questions & Answers] DelicatePanda:
I am having unknown and unexpected build issues if anyone with experience in building a custom rom could help me it would be great. I am trying to build Lineage OS 15.1 on Ubuntu 18.04 without any unofficial modifications.:fingers-crossed:

Partial Log:

[130/1069] including ./device/oneplus/oneplus3/Android.mk ...
build/core/binary.mk:40: warning: ipacm uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libipanat uses deprecated kernel header dependency path.
[177/1069] including ./external/ebtables/Android.mk ...
build/core/binary.mk:40: warning: ebtables uses deprecated kernel header dependency path.
[307/1069] including ./external/tinycompress/Android.mk ...
build/core/binary.mk:40: warning: libtinycompress_vendor uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libtinycompress uses deprecated kernel header dependency path.
[506/1069] including ./hardware/qcom/audio-caf/msm8996/Android.mk ...
build/core/binary.mk:40: warning: audio.primary.msm8996 uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libOmxAacEnc uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libOmxAmrEnc uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libOmxEvrcEnc uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libOmxG711Enc uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libOmxQcelp13Enc uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libqcompostprocbundle uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libvolumelistener uses deprecated kernel header dependency path.
[510/1069] including ./hardware/qcom/bt-caf/Android.mk ...
build/core/binary.mk:40: warning: libbt-vendor uses deprecated kernel header dependency path.
[519/1069] including ./hardware/qcom/display-caf/msm8996/Android.mk ...
build/core/binary.mk:40: warning: libqservice uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libqdutils uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libqdMetaData uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libqdMetaData.system uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libsdmcore uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: hdmi_cec.msm8996 uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libgpu_tonemapper uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libdrmutils uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: gralloc.msm8996 uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libgrallocutils uses deprecated kernel header dependency path.
[531/1069] including ./hardware/qcom/media-caf/msm8996/Android.mk ...
build/core/binary.mk:40: warning: libOmxVidcCommon uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libOmxVdec uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libOmxVenc uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libc2dcolorconvert uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libhypv_intercept uses deprecated kernel header dependency path.
[535/1069] including ./hardware/qcom/wlan-caf/Android.mk ...
build/core/binary.mk:40: warning: libwifi-hal-qcom uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: libwifi-hal-qcom uses deprecated kernel header dependency path.
[728/1069] including ./system/qcom/softap/jni/Android.mk ...
build/core/binary.mk:40: warning: libQWiFiSoftApCfg uses deprecated kernel header dependency path.
[1064/1069] including ./vendor/oneplus/oneplus3/Android.mk ...
ln: failed to create symbolic link 'libEGL_adreno.so': File exists
ln: failed to create symbolic link 'libEGL_adreno.so': File exists
[1066/1069] including ./vendor/qcom/opensource/cryptfs_hw/Android.mk ...
build/core/binary.mk:40: warning: libcryptfs_hw uses deprecated kernel header dependency path.
[1067/1069] including ./vendor/qcom/opensource/dataservices/Android.mk ...
build/core/binary.mk:40: warning: librmnetctl uses deprecated kernel header dependency path.
build/core/binary.mk:40: warning: sockev uses deprecated kernel header dependency path.
[1069/1069] including ./vendor/qcom/opensource/rcs-service/Android.mk ...
[ 0% 1/94568] target C: libcryptfs_h...com/opensource/cryptfs_hw/cryptfs_hw.c
vendor/qcom/opensource/cryptfs_hw/cryptfs_hw.c:45:9: warning: 'LOG_TAG' macro redefined [-Wmacro-redefined]
#define LOG_TAG "Cryptfs_hw"
^
system/core/liblog/include/log/log.h:51:9: note: previous definition is here
#define LOG_TAG NULL
^
1 warning generated.
[ 0% 77/94568] Lex: applypatch <= bootable/recovery/edify/lexer.ll
FAILED: /home/user/Desktop/Android/out/target/product/oneplus3/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -o/home/user/Desktop/Android/out/target/product/oneplus3/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
Aborted (core dumped)
[ 0% 82/94568] Ensuring Jack server is installed and started
Jack server already installed in "/home/user/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx3G -cp /home/user/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
ninja: build stopped: subcommand failed.
01:13:44 ninja failed with: exit status 1

#### failed to build some targets (13:28 (mm:ss)) ####