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

最后都变了- 提交于 2021-01-29 08:05:27

问题


I am building unofficial AOSP rom for my device(OnePlus One)

I followed the steps in to initialise

I have used the following commands

source build/envsetup.sh
lunch aosp_arm64-eng
make -j4

output:

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=aosp_arm64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-37-generic-x86_64-Ubuntu-20.04-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QQ3A.200605.002.A1
OUT_DIR=out
============================================
[  6% 6/94] link out/soong/.bootstrap/gotestrunner/obj/a.out
FAILED: out/soong/.bootstrap/gotestrunner/obj/a.out
GOROOT='prebuilts/go/linux-x86' prebuilts/go/linux-x86/pkg/tool/linux_amd64/link -o out/soong/.bootstrap/gotestrunner/obj/a.out.tmp<br>  out/soong/.bootstrap/gotestrunner/obj/gotestrunner.a && if cmp --quiet out/soong/.bootstrap/gotestrunner/obj/a.out.tmp out/soong/.bootstrap/gotestrunner/obj/a.out; then rm out/soong/.bootstrap/gotestrunner/obj/a.out.tmp; else mv -f out/soong/.bootstrap/gotestrunner/obj/a.out.tmp out/soong/.bootstrap/gotestrunner/obj/a.out; fi
runtime.main_main·f: function main is undeclared in the main package
[  7% 7/94] link out/soong/.bootstrap/loadplugins/obj/a.out
FAILED: out/soong/.bootstrap/loadplugins/obj/a.out
GOROOT='prebuilts/go/linux-x86' prebuilts/go/linux-x86/pkg/tool/linux_amd64/link -o out/soong/.bootstrap/loadplugins/obj/a.out.tmp  out/soong/.bootstrap/loadplugins/obj/loadplugins.a && if cmp --quiet out/soong/.bootstrap/loadplugins/obj/a.out.tmp out/soong/.bootstrap/loadplugins/obj/a.out; then rm out/soong/.bootstrap/loadplugins/obj/a.out.tmp; else mv -f out/soong/.bootstrap/loadplugins/obj/a.out.tmp out/soong/.bootstrap/loadplugins/obj/a.out; fi
runtime.main_main·f: function main is undeclared in the main package
[  8% 8/94] link out/soong/.bootstrap/gotestmain/obj/a.out
FAILED: out/soong/.bootstrap/gotestmain/obj/a.out
GOROOT='prebuilts/go/linux-x86' prebuilts/go/linux-x86/pkg/tool/linux_amd64/link -o out/soong/.bootstrap/gotestmain/obj/a.out.tmp  out/soong/.bootstrap/gotestmain/obj/gotestmain.a && if cmp --quiet out/soong/.bootstrap/gotestmain/obj/a.out.tmp out/soong/.bootstrap/gotestmain/obj/a.out; then rm out/soong/.bootstrap/gotestmain/obj/a.out.tmp; else mv -f out/soong/.bootstrap/gotestmain/obj/a.out.tmp out/soong/.bootstrap/gotestmain/obj/a.out; fi

runtime.main_main·f: function main is undeclared in the main package
21:41:40 soong bootstrap failed with: exit status 1

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

Anyone please help me with this issue
Thanks in advance


回答1:


Your lunch (2nd) command is wrong, it should be

lunch aosp_bacon-eng

Assuming you have cloned your device sources and made required changes



来源:https://stackoverflow.com/questions/62446053/failed-to-build-some-targets-1-seconds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!