[OnePlus 6 Questions & Answers] HiddenRoot:
Hello everyone,

I am attempting to build LineageOS 16 for the OP6. I know that other builds exist, however I would like Wireguard, and additionally just want to learn how to build it.

I have followed the guide on the LineageOS wiki, and use TheMuppets proprietary blobs.

Once I type

brunch enchilada

It starts to build, bit I error out. Here is the output

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
LINEAGE_VERSION=16.0-20190220-UNOFFICIAL-enchilada
TARGET_PRODUCT=lineage_enchilada
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a75
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a75
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.20.10-arch1-1-ARCH-x86_64-Arch-Linux
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ2A.190205.001
OUT_DIR=/freedom/lineageos/out
============================================
[1/1] /freedom/lineageos/out/soong/.minibootstrap/minibp /freedom/lineageos/out/soong/.bootstrap/build.ninja
[55/56] glob prebuilts/ndk/stl.bp
[80/80] /freedom/lineageos/out/soong/.bootstrap/bin/soong_build /freedom/lineageos/out/soong/build.ninja
/freedom/lineageos/out/build-lineage_enchilada-cleanspec.ninja is missing, regenerating...
/freedom/lineageos/out/build-lineage_enchilada.ninja is missing, regenerating...
[1038/1038] including vendor/qcom/opensource/dataservices/Android.mk ...
[ 99% 1222/1223] glob vendor/qcom/opensource/interfaces/wifi/supplicant/2.0/src
[ 0% 42/109632] build /freedom/lineageos/out/target/common/obj/all-event-log-tags.txt
FAILED: /freedom/lineageos/out/target/common/obj/all-event-log-tags.txt
/bin/bash -c "build/make/tools/merge-event-log-tags.py -o /freedom/lineageos/out/target/common/obj/all-event-log-tags.txt frameworks/base/core/java/android/app/admin/SecurityLogTags.logtags frameworks/base/core/java/android/content/EventLogTags.logtags frameworks/base/core/java/android/net/EventLogTags.logtags frameworks/base/core/java/android/os/EventLogTags.logtags frameworks/base/core/java/android/speech/tts/EventLogTags.logtags frameworks/base/core/java/android/webkit/EventLogTags.logtags frameworks/base/core/java/com/android/internal/app/EventLogTags.logtags frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags frameworks/base/core/java/com/android/server/DropboxLogTags.logtags frameworks/base/core/java/org/chromium/arc/EventLogTags.logtags frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/EventLogTags.logtags frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags frameworks/base/services/core/java/com/android/server/EventLogTags.logtags frameworks/base/services/core/java/com/android/server/am/EventLogTags.logtags frameworks/ex/common/java/com/android/common/GoogleLogTags.logtags frameworks/native/services/surfaceflinger/EventLog/EventLogTags.logtags frameworks/opt/telephony/src/java/com/android/internal/telephony/EventLogTags.logtags packages/apps/Settings/src/com/android/settings/EventLogTags.logtags packages/providers/CalendarProvider/src/com/android/providers/calendar/EventLogTags.logtags packages/providers/ContactsProvider/src/com/android/providers/contacts/EventLogTags.logtags packages/services/Telephony/src/com/android/phone/EventLogTags.logtags system/bt/main/../EventLogTags.logtags system/core/liblog/event.logtags system/core/libsysutils/EventLogTags.logtags system/core/logcat/event.logtags system/core/logd/event.logtags system/core/storaged/EventLogTags.logtags"
File "build/make/tools/merge-event-log-tags.py", line 51
except getopt.GetoptError, err:
^
SyntaxError: invalid syntax
[ 0% 47/109632] target Java source list: ims-common
File "build/make/tools/normalize_path.py", line 25
print os.path.normpath(p)
^
SyntaxError: invalid syntax
[ 0% 48/109632] host Java source list: hierarchyviewer
File "build/make/tools/normalize_path.py", line 25
print os.path.normpath(p)
^
SyntaxError: invalid syntax
[ 0% 51/109632] target Java source list: apache-xml
File "build/make/tools/normalize_path.py", line 25
print os.path.normpath(p)
^
SyntaxError: invalid syntax
ninja: build stopped: subcommand failed.
16:47:27 ninja failed with: exit status 1

#### failed to build some targets (52 seconds) ####

Using an alias to use python 2 instead of 3 causes a different error to occur which indicates my system has ncurses 6 instead of 5, will look into solving this and see how far the build runs.

New errors:

FAILED: /freedom/lineageos/out/target/common/obj/all-event-log-tags.txt
/bin/bash -c "build/make/tools/merge-event-log-tags.py -o /freedom/lineageos/out/target/common/obj/all-event-log-tags.txt frameworks/base/core/java/android/app/admin/SecurityLogTags.logtags frameworks/base/core/java/android/content/EventLogTags.logtags frameworks/base/core/java/android/net/EventLogTags.logtags frameworks/base/core/java/android/os/EventLogTags.logtags frameworks/base/core/java/android/speech/tts/EventLogTags.logtags frameworks/base/core/java/android/webkit/EventLogTags.logtags frameworks/base/core/java/com/android/internal/app/EventLogTags.logtags frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags frameworks/base/core/java/com/android/server/DropboxLogTags.logtags frameworks/base/core/java/org/chromium/arc/EventLogTags.logtags frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/EventLogTags.logtags frameworks/base/packages/SystemUI/src/com/android/systemui/EventLogTags.logtags frameworks/base/services/core/java/com/android/server/EventLogTags.logtags frameworks/base/services/core/java/com/android/server/am/EventLogTags.logtags frameworks/ex/common/java/com/android/common/GoogleLogTags.logtags frameworks/native/services/surfaceflinger/EventLog/EventLogTags.logtags frameworks/opt/telephony/src/java/com/android/internal/telephony/EventLogTags.logtags packages/apps/Settings/src/com/android/settings/EventLogTags.logtags packages/providers/CalendarProvider/src/com/android/providers/calendar/EventLogTags.logtags packages/providers/ContactsProvider/src/com/android/providers/contacts/EventLogTags.logtags packages/services/Telephony/src/com/android/phone/EventLogTags.logtags system/bt/main/../EventLogTags.logtags system/core/liblog/event.logtags system/core/libsysutils/EventLogTags.logtags system/core/logcat/event.logtags system/core/logd/event.logtags system/core/storaged/EventLogTags.logtags"
File "build/make/tools/merge-event-log-tags.py", line 51
except getopt.GetoptError, err:

File "libcore/annotations/generate_annotated_java_files.py", line 34
print '// Do not edit; generated using libcore/annotations/generate_annotated_java_files.py'
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('// Do not edit)?
[ 0% 25/109555] host C++: aapt <= frameworks/base/tools/aapt/Main.cpp
ninja: build stopped: subcommand failed.
17:56:47 ninja failed with: exit status 1

EDIT: It seems that alias does not apply to subprocesses, so I created a virtualenv of python2.7 and sourced that.

Leaving this up in case anyone else runs into these issues. Currently building, will update on the status if it completes.

UPDATE:

New error 80% of the way...

hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] No DEX files specified
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] Command: /freedom/lineageos/out/host/linux-x86/bin/hiddenapi --light-greylist=/freedom/lineageos/out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt --dark-greylist=/freedom/lineageos/out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt --blacklist=/freedom/lineageos/out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] Usage: hiddenapi [options]...
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47]
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] --dex=<filename>: specify dex file whose members' access flags are to be set.
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] At least one --dex parameter must be specified.
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47]
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] --light-greylist=<filename>:
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] --dark-greylist=<filename>:
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] --blacklist=<filename>: text files with signatures of methods/fields to be marked
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] greylisted/blacklisted respectively. At least one list must be provided.
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47]
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] --print-hidden-api: dump a list of marked methods/fields to the standard output.
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47] There is no indication which API category they belong to.
hiddenapi E 02-20 19:35:55 17022 17022 hiddenapi.cc:47]
[ 76% 83875/109532] //libcore:core-oj javac [common]

What are the DEX files I need?

---

I reran the compiling and it did not seem to fail at the same stage, this is how far I got now (looks like pretty far):

pastebin 9muHLgmS (Sorry I can't post the link, new user...plz don't ban me mods)