编译期间在yarn中获取包时出现问题

问题描述 投票:0回答:1

我有一个 Yocto 项目,位于“kirkstone”分支上,我想将 chirpstack 添加到构建中。

但是当我尝试执行以下命令时

bitbake chirpstack 

我收到以下构建错误:

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "tv4000"
DISTRO               = "ir-tiny"
DISTRO_VERSION       = "4.0.2"
TUNE_FEATURES        = "aarch64 armv8a crc cortexa53 crypto"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "kirkstone:236f30b8a9cb1751aae290cc94da06d8f6917b30"
meta-oe              
meta-python          
meta-networking      
meta-filesystems     
meta-webserver       = "kirkstone:a47ef046619d639dfbd3be2a13ef6d5b40fd40a1"
meta-freescale       = "kirkstone:da51a9af29d25411ff16c2b735c391bc335ba5c0"
meta-clang           = "kirkstone:2d08d6bf376a1e06c53164fd6283b03ec2309da4"
meta-ir-imx          
meta-ir-rust         
meta-ir              
meta-ir-chirpstack   = "chirpstack-kirkstone:d8d07b690fd174ded488356673d622ecf4504bd5"

Initialising tasks: 100% |#########################################################################################################################################################################################################################################| Time: 0:00:03
Sstate summary: Wanted 33 Local 28 Mirrors 0 Missed 5 Current 288 (84% match, 98% complete)
NOTE: Executing Tasks
ERROR: chirpstack-4.3.0-r0 do_compile: oe_runmake failed
ERROR: chirpstack-4.3.0-r0 do_compile: ExecutionError('/home/patrickyuan/tv4000/poky/build/tmp/work/cortexa53-crypto-poky-linux/chirpstack/4.3.0-r0/temp/run.do_compile.5514', 1, None, None)
ERROR: Logfile of failure stored in: /home/patrickyuan/tv4000/poky/build/tmp/work/cortexa53-crypto-poky-linux/chirpstack/4.3.0-r0/temp/log.do_compile.5514
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4
| yarn install
| yarn install v1.22.18
| warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.
| [1/4] Resolving packages...
| [2/4] Fetching packages...
| error An unexpected error occurred: "https://registry.yarnpkg.com/@ant-design/colors/-/colors-6.0.0.tgz: getaddrinfo EAI_AGAIN registry.yarnpkg.com".
| info If you think this is a bug, please open a bug report with the information provided in "/home/patrickyuan/tv4000/poky/build/tmp/work/cortexa53-crypto-poky-linux/chirpstack/4.3.0-r0/git/ui/yarn-error.log".
| info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
| make: *** [Makefile:10: dependencies] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/patrickyuan/tv4000/poky/build/../../meta-innerrange/meta-ir-chirpstack/recipes-chirpstack/chirpstack/chirpstack_4.3.0.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1208 tasks of which 1207 didn't need to be rerun and 1 failed.

我确认我的 ubuntu VM 构建机器上的网络连接正常。

如果我将网址放入浏览器中,我可以直接下载该包。

我没有在 docker 容器中构建 yocto 镜像。

yarnpkg yocto
1个回答
0
投票

bitbake手册中指定

Bitbake 故意只允许 do_fetch 任务访问网络,在您的情况下,任务 do_compile 正在尝试访问网络,因此它失败了。

不建议这样做,但如果你想允许 do_compile 任务访问网络,你需要将 [network] varFlag 设置为“1”。

python() {
     d.setVarFlag(task, 'network', '1')
}
© www.soinside.com 2019 - 2024. All rights reserved.