[Android Q&A, Help & Troubleshooting] s0f0s:
At first the error was

$ breakfast
including device/generic/uml/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/oneplus/oneplus5t/vendorsetup.sh
including device/oneplus/oneplus5/vendorsetup.sh
including device/sony/z2/vendorsetup.sh
including device/sony/z3c/vendorsetup.sh
including device/sony/z3/vendorsetup.sh

You're building on Linux

Lunch menu... pick a combo:
1. full-eng
2. uml-userdebug
3. aosp_walleye-userdebug
4. aosp_walleye_test-userdebug
5. aosp_taimen-userdebug
6. omni_oneplus5t-user
7. omni_oneplus5t-userdebug
8. omni_oneplus5t-eng
9. omni_oneplus5-user
10. omni_oneplus5-userdebug
11. omni_oneplus5-eng
12. omni_z2-eng
13. omni_z2-userdebug
14. omni_z3c-eng
15. omni_z3-eng

Which would you like? [aosp_arm-eng] 15
Looking for dependencies on: device/sony/shinano-common
Looking for dependencies on: device/sony/msm8974-common
WARNING: detected conflict in revisions for repository android_vendor_qcom_opensource_interfaces
Traceback (most recent call last):
File "vendor/omni/build/tools/roomservice.py", line 356, in <module>
fetch_dependencies(device)
File "vendor/omni/build/tools/roomservice.py", line 310, in fetch_dependencies
create_common_dependencies_manifest(dependencies)
File "vendor/omni/build/tools/roomservice.py", line 299, in create_common_dependencies_manifest
create_common_dependencies_manifest(common_deps)
File "vendor/omni/build/tools/roomservice.py", line 297, in create_common_dependencies_manifest
check_manifest_problems(common_deps)
File "vendor/omni/build/tools/roomservice.py", line 239, in check_manifest_problems
file = ES.parse('/'.join([local_manifest_dir, "roomservice.xml"]))
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '.repo/local_manifests/roomservice.xml'

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=omni_z3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-21-generic-x86_64-with-Ubuntu-17.10-artful
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM3.171019.013
OUT_DIR=/home/user/Android/roms/OmniROM/8.1/out
AUX_OS_VARIANT_LIST=
============================================

I changed the revision in the device/sony/msm8974-common/omni.dependencies

{
"remote": "omnirom",
"repository": "android_hardware_qcom_gps",
"target_path": "hardware/qcom/gps",
"revision": "android-8.[B]1[/B]"
},

Then the same revision conflict occurred for android_vendor_qcom_opensource_interfaces and android_vendor_nxp-nfc_interfaces_opensource_nfc. I changed their revisions in the same file too and got

$ brunch
including device/generic/uml/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/oneplus/oneplus5t/vendorsetup.sh
including device/oneplus/oneplus5/vendorsetup.sh
including device/sony/z2/vendorsetup.sh
including device/sony/z3c/vendorsetup.sh
including device/sony/z3/vendorsetup.sh

You're building on Linux

Lunch menu... pick a combo:
1. full-eng
2. uml-userdebug
3. aosp_walleye-userdebug
4. aosp_walleye_test-userdebug
5. aosp_taimen-userdebug
6. omni_oneplus5t-user
7. omni_oneplus5t-userdebug
8. omni_oneplus5t-eng
9. omni_oneplus5-user
10. omni_oneplus5-userdebug
11. omni_oneplus5-eng
12. omni_z2-eng
13. omni_z2-userdebug
14. omni_z3c-eng
15. omni_z3-eng

Which would you like? [aosp_arm-eng] 15
Looking for dependencies on: device/sony/shinano-common
Looking for dependencies on: device/sony/msm8974-common

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=omni_z3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-21-generic-x86_64-with-Ubuntu-17.10-artful
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM3.171019.013
OUT_DIR=/home/user/Android/roms/OmniROM/8.1/out
AUX_OS_VARIANT_LIST=
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=omni_z3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-21-generic-x86_64-with-Ubuntu-17.10-artful
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM3.171019.013
OUT_DIR=/home/user/Android/roms/OmniROM/8.1/out
============================================
[44/44] bootstrap /home/user/Android/r...ut/soong/.minibootstrap/build.ninja.in
[4/4] /home/user/Android/roms/OmniROM/...M/8.1/out/soong/.bootstrap/build.ninja
[871/872] glob vendor/*/*/*/*/*/*/Android.bp
[54/54] /home/user/Android/roms/OmniRO...roms/OmniROM/8.1/out/soong/build.ninja
/home/user/Android/roms/OmniROM/8.1/out/build-omni_z3.ninja is missing, regenerating...
[120/999] including ./device/sony/msm8974-common/Android.mk ...
device-sony-common-init: init_sony for "z3", platform "shinano", with ' -DDEV_BLOCK_FOTA_NUM="16" -DDEV_BLOCK_FOTA_MAJOR="179" -DDEV_BLOCK_FOTA_MINOR="16" -DFOTA_RAMDISK_CHECK="0" -DKEYCHECK_ENABLED="1" -DKEYCHECK_NO_DOWN="1"'
[464/999] including ./hardware/qcom/gps/Android.mk ...
build/core/base_rules.mk:238: error: hardware/qcom/gps/core: MODULE.TARGET.SHARED_LIBRARIES.libloc_core already defined by hardware/qcom/gps/sdm845/core.
10:05:15 ckati failed with: exit status 1

#### failed to build some targets (01:10 (mm:ss)) ####

real	1m9,955s
user	2m7,271s
sys	0m8,134s

Well, hardware/qcom/gps/sdm845/Android.mk is included in device/sony/msm8974-common/Android.mk and later hardware/qcom/gps/Android.mk includes the following

ifneq ($(filter apq8064,$(TARGET_BOARD_PLATFORM)),)
#For apq8064 use msm8960
include $(call all-named-subdir-makefiles,msm8960)
else ifneq ($(filter msm8992,$(TARGET_BOARD_PLATFORM)),)
#For msm8992 use msm8994
include $(call all-named-subdir-makefiles,msm8994)
else ifneq ($(filter msm8960 msm8084 msm8994 msm8996 msm8998 sdm845,$(TARGET_BOARD_PLATFORM)),)
#For these, use their platform name as the subdirectory
include $(call all-named-subdir-makefiles,$(TARGET_BOARD_PLATFORM))
else ifeq ($(filter msm8916,$(TARGET_BOARD_PLATFORM)),)
#For all other targets besides msm8916
GPS_DIRS=core utils loc_api platform_lib_abstractions etc
include $(call all-named-subdir-makefiles,$(GPS_DIRS))
endif #TARGET_BOARD_PLATFORM

but the target platform is msm8974 which do not have appropriate case. So I added the case for it

ifneq ($(filter apq8064,$(TARGET_BOARD_PLATFORM)),)
#For apq8064 use msm8960
include $(call all-named-subdir-makefiles,msm8960)
else ifneq ($(filter msm8992,$(TARGET_BOARD_PLATFORM)),)
#For msm8992 use msm8994
include $(call all-named-subdir-makefiles,msm8994)
else ifneq ($(filter msm8960 msm8084 msm8994 msm8996 msm8998 sdm845,$(TARGET_BOARD_PLATFORM)),)
#For these, use their platform name as the subdirectory
include $(call all-named-subdir-makefiles,$(TARGET_BOARD_PLATFORM))
[B]else ifneq ($(filter msm8974,$(TARGET_BOARD_PLATFORM)),)
#For msm8974 use sdm845
ifndef MODULE.TARGET.SHARED_LIBRARIES.libloc_core
include $(call all-named-subdir-makefiles,sdm845)
endif[/B]
else ifeq ($(filter msm8916,$(TARGET_BOARD_PLATFORM)),)
#For all other targets besides msm8916
GPS_DIRS=core utils loc_api platform_lib_abstractions etc
include $(call all-named-subdir-makefiles,$(GPS_DIRS))
endif #TARGET_BOARD_PLATFORM

Now I get the error about missing keystore.msm897

$ brunch omni_z3-eng
including device/generic/uml/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/oneplus/oneplus5t/vendorsetup.sh
including device/oneplus/oneplus5/vendorsetup.sh
including device/sony/z2/vendorsetup.sh
including device/sony/z3c/vendorsetup.sh
including device/sony/z3/vendorsetup.sh
Looking for dependencies on: device/sony/shinano-common
Looking for dependencies on: device/sony/msm8974-common

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=omni_z3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-21-generic-x86_64-with-Ubuntu-17.10-artful
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM3.171019.013
OUT_DIR=/home/user/Android/roms/OmniROM/8.1/out
AUX_OS_VARIANT_LIST=
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=omni_z3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-21-generic-x86_64-with-Ubuntu-17.10-artful
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM3.171019.013
OUT_DIR=/home/user/Android/roms/OmniROM/8.1/out
============================================
ninja: no work to do.
ninja: no work to do.
/home/user/Android/roms/OmniROM/8.1/out/build-omni_z3.ninja is missing, regenerating...
[120/999] including ./device/sony/msm8974-common/Android.mk ...
device-sony-common-init: init_sony for "z3", platform "shinano", with ' -DDEV_BLOCK_FOTA_NUM="16" -DDEV_BLOCK_FOTA_MAJOR="179" -DDEV_BLOCK_FOTA_MINOR="16" -DFOTA_RAMDISK_CHECK="0" -DKEYCHECK_ENABLED="1" -DKEYCHECK_NO_DOWN="1"'
[999/999] including ./vendor/sony/shinano-common-caf/proprietary/Android.mk ...
PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/VideoRecord_48k.ogg:system/media/audio/ui/VideoRecord.ogg ignored.
PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/VideoStop_48k.ogg:system/media/audio/ui/VideoStop.ogg ignored.
PRODUCT_COPY_FILES frameworks/base/data/sounds/effects/ogg/camera_click_48k.ogg:system/media/audio/ui/camera_click.ogg ignored.
No private recovery resources for TARGET_DEVICE z3
Using '/home/user/Android/roms/OmniROM/8.1/prebuilts/misc/linux-x86/ccache/ccache' binary on 'linux-x86'
platform_testing/build/tasks/tests/instrumentation_metric_test_list.mk: warning: continuous_instrumentation_metric_tests: Unknown installed file for module perf-setup.sh
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module EmergencyInfoTests
platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh
build/core/base_rules.mk:390: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:390: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/root/res/images/charger/battery_scale.png'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/root/res/images/charger/battery_scale.png'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv1_CM.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv1_CM.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv2.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv2.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv3.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/lib/libGLESv3.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/lib/libta.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/lib/libta.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/lib/mediadrm/libdrmclearkeyplugin.so'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/lib/mediadrm/libdrmclearkeyplugin.so'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/etc/audio_effects.conf'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/vendor/etc/audio_effects.conf'
build/core/Makefile:34: warning: overriding commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/etc/mkshrc'
build/core/base_rules.mk:390: warning: ignoring old commands for target `/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/system/etc/mkshrc'
[ 99% 1273/1274] glob vendor/*/*/*/*/*/*/Android.bp
ninja: error: 'keystore.msm8974', needed by '/home/user/Android/roms/OmniROM/8.1/out/target/product/z3/obj/ETC/twrp.fstab_intermediates/twrp.fstab', missing and no known rule to make it
18:29:09 ninja failed with: exit status 1

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

real	0m53,430s
user	0m54,585s
sys	0m5,082s

Which right now I have no idea how to deal with :confused:

Maybe I was not right with corrections of previous errors...