IMX8MM -- Yocto构建遇见的错误及解决方法:

IMX8MM Yocto构建遇见的错误及解决方法:

  • 1 bison-3.0.4 error
  • 2 Opencv BB_NO_NETWORK Error :
  • 3 Yocto构建时出现U-boot 问题
  • 4 Yocto构建时出现Linux kernel编译问题
  • 5 wayland-native
  • 6 cross-localedef-native
  • 7 wayland-protocols
  • 8 mesa

硬件:米尔 IMX8MM

1 bison-3.0.4 error

| ../bison-3.0.4/lib/fseterr.c: In function 'fseterr':
| ../bison-3.0.4/lib/fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
|   #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."

解决方法:
进入bison-3.0.4目录,文件中进行替换和添加内容。
在 lib 目录下的所有以 .c 结尾的文件中,将字符串 IO_ftrylockfile 替换为 IO_EOF_SEEN,并在 lib/stdio-impl.h 文件末尾添加一个 C 语言宏定义
在这里插入图片描述

sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h

2 Opencv BB_NO_NETWORK Error :

ERROR: opencv-4.2.0.imx-r0 do_fetch: Network access disabled through
BB_NO_NETWORK (or set indirectly due to use of BB_FETCH_PREMIRRORONLY)
but access requested with command LANG=C git -c
core.fsyncobjectfiles=0 fetch -f --prune --progress
https://source.codeaurora.org/external/imx/opencv-imx.git
refs/:refs/ (for url
git://source.codeaurora.org/external/imx/opencv-imx.git;protocol=https;branch=4.2.0_imx;name=opencv)

在这里插入图片描述
当设置了 BB_NO_NETWORK 为 1 时,构建系统会禁止所有网络访问。这在一些场景下很有用,例如在没有互联网连接或者出于安全原因需要禁止网络访问的情况下。设置了 BB_NO_NETWORK 后,构建系统将不会尝试下载任何软件包或依赖项,而是会依赖本地缓存的文件。

解决
将 local.conf 文件里面的 BB_NO_NETWORK 设置删除或者设置为0

BB_NO_NETWORK  = “0”

3 Yocto构建时出现U-boot 问题

ERROR: u-boot-imx-2018.03-r0 do_fetch: Fetcher failure: Unable to
resolve ‘cc2c0393 14066949b84d48c035e9e08380ddc56dcb’ in upstream git
repository in git ls-remote out put for
//home/hufan/MYIR-i.MX8MM-Uboot ERROR: u-boot-imx-2018.03-r0 do_fetch:
Function failed: base_do_fetch ERROR: Logfile of failure stored in:
/media/hufan/new-im8xmm-20190527/build_8m_mini
_0706/tmp/work/myd_imx8mm-poky-linux/u-boot-imx/2018.03-r0/temp/log.do_fetch.18702
ERROR: Task
(/media/hufan/new-im8xmm-20190527/sources/meta-myir/meta-myir-bsp/recip
es-bsp/u-boot/u-boot-imx_2018.03.bb:do_fetch) failed with exit code
‘1’ ERROR: linux-imx-4.14.98-r0 do_fetch: Fetcher failure: Unable to
resolve ‘111d006bf 101e8aebab28acdd034d7fe1281c0e77c1’ in upstream git
repository in git ls-remote out put for
//home/hufan/MYIR-i.MX8MM-Linux ERROR: linux-imx-4.14.98-r0 do_fetch:
Function failed: base_do_fetch

解决:这种情况是由于U-Boot更新后,Yocto没有更新的对应的版本。
修改步骤如下:

1. 进⼊U-Boot源码⽬录,使⽤"git log"查看commit id。
2. 修改Yocto源码⽬录下的"source/meta-myir/meta-myir-bsp/recipes-bsp/u-boot/u-boot-imx_2018.03.bb"⽂
件中的SRCREV变量为查询到的commit id即可。

4 Yocto构建时出现Linux kernel编译问题

同样是Linux Kernel更新后,Yocto没有更新版本。修改步骤如下:

1. 进⼊Linux源码⽬录,使⽤"git log"查看commit id并复制
2. 修改Yocto源码⽬录下的"source/meta-myir/meta-myir-bsp/recipes-kernel/linux/linux-imx_4.14.98.bb"⽂
件中的SRCREV变量为commit id即可。

5 wayland-native

ERROR: wayland-native-1.17.0-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS=“unix:path=/run/user/1000/bus,guid=c5a2e3679a31b7ffd15fafb165b85632”; export SSH_AGENT_PID=“1307”; export SSH_AUTH_SOCK=“/run/user/1000/keyring/ssh”; export ALL_PROXY=“socks5://172.16.112.237:1090”; export https_proxy=“http://127.0.0.1:7890”; export http_proxy=“http://127.0.0.1:7890”; export PATH=“/home/hh/MYIR-Yocto-i.MX8MM/sources/poky/scripts/native-intercept:/home/hh/MYIR-Yocto-i.MX8MM/sources/poky/scripts:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/wayland-native/1.17.0-r0/recipe-sysroot-native/usr/bin/x86_64-linux:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/wayland-native/1.17.0-r0/recipe-sysroot-native/usr/bin:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/wayland-native/1.17.0-r0/recipe-sysroot-native/usr/sbin:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/wayland-native/1.17.0-r0/recipe-sysroot-native/usr/bin:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/wayland-native/1.17.0-r0/recipe-sysroot-native/sbin:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/wayland-native/1.17.0-r0/recipe-sysroot-native/bin:/home/hh/MYIR-Yocto-i.MX8MM/sources/poky/bitbake/bin:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/hosttools”; export HOME=“/home/hh”; /usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate -P /home/hh/MYIR-Yocto-i.MX8MM/downloads/ ‘https://wayland.freedesktop.org/releases/wayland-1.17.0.tar.xz’ --progress=dot -v failed with exit code 4, output:
–2024-01-30 03:15:48-- https://wayland.freedesktop.org/releases/wayland-1.17.0.tar.xz
Connecting to 127.0.0.1:7890… failed: Connection refused.
ERROR: wayland-native-1.17.0-r0 do_fetch: Fetcher failure for URL: ‘https://wayland.freedesktop.org/releases/wayland-1.17.0.tar.xz’. Unable to fetch URL from any source.
ERROR: wayland-native-1.17.0-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/wayland-native/1.17.0-r0/temp/log.do_fetch.12853
ERROR: Task (virtual:native:/home/hh/MYIR-Yocto-i.MX8MM/sources/meta-myir/meta-myir-bsp/recipes-graphics/wayland/wayland_1.17.0.bb:do_fetch) failed with exit code ‘1’

解决:
downloads 目录下面只有 wayland-1.16.0.tar.xz ,所有我自己去下载 1.17的版本放进去即可。
手动下载源代码包: 手动从浏览器或其他工具中下载 wayland-1.17.0.tar.xz,并将其放置在 Yocto 项目的 downloads 目录中。

6 cross-localedef-native

ERROR: cross-localedef-native-2.27-r0 do_compile: oe_runmake failed
ERROR: cross-localedef-native-2.27-r0 do_compile: Function failed: do_compile (log file is located at /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/cross-localedef-native/2.27-r0/temp/log.do_compile.12121)
ERROR: Logfile of failure stored in: /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/cross-localedef-native/2.27-r0/temp/log.do_compile.12121
Log data follows:
| DEBUG: SITE files [‘endian-little’, ‘common-linux’, ‘common-glibc’, ‘bit-64’, ‘x86_64-linux’, ‘common’]
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4
| gcc -isystem/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/cross-telephone.o ld-time.o linereader.o localedef.o locarchive.o locfile.o record-status.o repertoire.o


parse.o argp-pv.o argp-xinl.o error.o getopt.o getopt1.o md5.o obstack.o asprintf.o getdelim.o localedef_extra.o obstack_printf.o vasprintf.o
| argp-fmtstream.o: In function _argp_fmtstream_update': | argp-fmtstream.c:(.text+0x231): undefined reference to _IO_fwide’
| argp-fmtstream.c:(.text+0x3e6): undefined reference to _IO_fwide' | argp-help.o: In function argp_failure’:
| argp-help.c:(.text+0x2123): undefined reference to `_IO_fwide’
| collect2: error: ld returned 1 exit status
| ERROR: oe_runmake failed
| Makefile:60: recipe for target ‘localedef’ failed
| make: *** [localedef] Error 1
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/x86_64-linux/cross-localedef-native/2.27-r0/temp/log.do_compile.12121)
ERROR: Task (/home/hh/MYIR-Yocto-i.MX8MM/sources/poky/meta/recipes-core/glibc/cross-localedef-native_2.27.bb:do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 817 tasks of which 730 didn’t need to be rerun and 1 failed.

解决:
在文件 cross-localedef-native_2.27.bb 里面添加 -D_IO_fwide=fwide。

CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'  -D_IO_fwide=fwide"

在这里插入图片描述

7 wayland-protocols

ERROR: wayland-protocols-1.17.imx-r0 do_fetch: Fetcher failure: Fetch
command export PSEUDO_DISABLED=1; export
DBUS_SESSION_BUS_ADDRESS=“unix:path=/run/user/1000/bus,guid=c5a2e3679a31b7ffd15fafb165b85632”; export SSH_AGENT_PID=“1307”; export
SSH_AUTH_SOCK=“/run/user/1000/keyring/ssh”; export
ALL_PROXY=“socks5://172.16.112.237:1090”; export
https_proxy=“http://127.0.0.1:7890”; export
http_proxy=“http://127.0.0.1:7890”; export
PATH=“/home/hh/MYIR-Yocto-i.MX8MM/sources/poky/scripts:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/all-poky-linux/wayland-protocols/1.17.imx-r0/recipe-sysroot-native/usr/bin/allarch-poky-linux:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/all-poky-linux/wayland-protocols/1.17.imx-r0/recipe-sysroot/usr/bin/crossscripts:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/all-poky-linux/wayland-protocols/1.17.imx-r0/recipe-sysroot-native/usr/sbin:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/all-poky-linux/wayland-protocols/1.17.imx-r0/recipe-sysroot-native/usr/bin:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/all-poky-linux/wayland-protocols/1.17.imx-r0/recipe-sysroot-native/sbin:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/all-poky-linux/wayland-protocols/1.17.imx-r0/recipe-sysroot-native/bin:/home/hh/MYIR-Yocto-i.MX8MM/sources/poky/bitbake/bin:/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/hosttools”;
export HOME=“/home/hh”; LANG=C git -c core.fsyncobjectfiles=0 fetch -f
–prune --progress https://source.codeaurora.org/external/imx/wayland-protocols-imx.git
refs/:refs/ failed with exit code 128, output: fatal: unable to
access
‘https://source.codeaurora.org/external/imx/wayland-protocols-imx.git/’:
Failed to connect to 127.0.0.1 port 7890: Connection refused ERROR:
wayland-protocols-1.17.imx-r0 do_fetch: Fetcher failure for URL:
‘git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-1.17’.
Unable to fetch URL from any source. ERROR:
wayland-protocols-1.17.imx-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in:
/home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/all-poky-linux/wayland-protocols/1.17.imx-r0/temp/log.do_fetch.20943
ERROR: Task
(/home/hh/MYIR-Yocto-i.MX8MM/sources/meta-myir/meta-myir-bsp/recipes-graphics/wayland/wayland-protocols_1.17.imx.bb:do_fetch)
failed with exit code ‘1’

解决:
主要是 https://source.codeaurora.org/external/imx/wayland-protocols-imx.git 这个网站进不去了屏蔽这个网站下载及去github下载,并将其放置在 Yocto 项目的 downloads 目录中即可。

过程:
使用grep 查看 source.codeaurora.org 在哪些文件,只修改有错误的文件。
在这里插入图片描述

在这里插入图片描述

删除后面部分即可。
在这里插入图片描述

从github下载
https://github.com/nxp-imx/wayland-protocols-imx
或者
https://coral.googlesource.com/wayland-protocols-imx/

或者官网下载
https://wayland.freedesktop.org/releases.html
下载下来应该是zip格式,解压缩后面,重新压缩为wayland-protocols-imx-1.17.tar.xz,并将其放置在 Yocto 项目的 downloads 目录中。

8 mesa

ERROR: mesa-2_17.3.8-r0 do_configure: configure failed
ERROR: mesa-2_17.3.8-r0 do_configure: Function failed: do_configure (log file is located at /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/aarch64-mx8mm-poky-linux/mesa/2_17.3.8-r0/temp/log.do_configure.26972)
ERROR: Logfile of failure stored in: /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/aarch64-mx8mm-poky-linux/mesa/2_17.3.8-r0/temp/log.do_configure.26972
Log data follows:
| DEBUG: SITE files [‘endian-little’, ‘bit-64’, ‘arm-common’, ‘arm-64’, ‘common-linux’, ‘common-glibc’, ‘aarch64-linux’, ‘common’]
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files [‘endian-little’, ‘bit-64’, ‘arm-common’, ‘arm-64’, ‘common-linux’, ‘common-glibc’, ‘aarch64-linux’, ‘common’]
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing shell function do_configure
| automake (GNU automake) 1.15.1


| checking for PTHREAD_PRIO_INHERIT… yes
| checking for libelf… no
| checking for elf_memory in -lelf… no
| …/mesa-17.3.8/configure: line 22925: /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/aarch64-mx8mm-poky-linux/mesa/2_17.3.8-r0/recipe-sysroot-native/usr/bin/llvm-config6.0: No such file or directory
| …/mesa-17.3.8/configure: line 22908: /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/aarch64-mx8mm-poky-linux/mesa/2_17.3.8-r0/recipe-sysroot-native/usr/bin/llvm-config6.0: No such file or directory
| …/mesa-17.3.8/configure: line 22927: /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/aarch64-mx8mm-poky-linux/mesa/2_17.3.8-r0/recipe-sysroot-native/usr/bin/llvm-config6.0: No such file or directory
| …/mesa-17.3.8/configure: line 22928: /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/aarch64-mx8mm-poky-linux/mesa/2_17.3.8-r0/recipe-sysroot-native/usr/bin/llvm-config6.0: No such file or directory
| checking for libdrm >= 2.4.75… yes
| checking for glproto >= 1.4.14… yes
| checking for dri2proto >= 2.8… yes
| checking for xxf86vm… yes
| checking for x11 xext xdamage >= 1.1 xfixes x11-xcb xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8 xxf86vm… yes
| checking for wayland-scanner… /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/aarch64-mx8mm-poky-linux/mesa/2_17.3.8-r0/recipe-sysroot-native/usr/bin/wayland-scanner
| checking for wayland-client >= 1.11… yes
| checking for wayland-server >= 1.11… yes
| configure: error: wayland-protocols >= 1.8 is needed to compile the wayland platform
| NOTE: The following config.log files may provide further information.
| NOTE: /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/aarch64-mx8mm-poky-linux/mesa/2_17.3.8-r0/build/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/hh/MYIR-Yocto-i.MX8MM/build_8m_mini/tmp/work/aarch64-mx8mm-poky-linux/mesa/2_17.3.8-r0/temp/log.do_configure.9383)
ERROR: Task (/home/hh/MYIR-Yocto-i.MX8MM/sources/poky/meta/recipes-graphics/mesa/mesa_17.3.8.bb:do_configure) failed with exit code ‘1’

https://archive.mesa3d.org//older-versions/17.x/

sudo apt-get install libelf-dev

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/537119.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

JAVA初阶数据结构栈(工程文件后续会上传)(+专栏数据结构练习是完整版)

1.栈的概念讲解(Stack)) 定义:栈是一种先进后出的数据结构 要想拿到12就要把它头上的所有东西给移出去 2.栈的实现(代码) 2.1栈的方法逻辑的讲解 (1)新建一个测试类Frank (2)进…

借助ChatGPT提高编程效率指南

PS: ChatGPT无限次数,无需魔法,登录即可使用,网页打开下面 一、借助ChatGPT提高编程效率指南 随着计算机技术的飞速发展,编程已经成为了现代社会中一个非常重要的技能。对于许多人来说,编程不仅是一项工作技能,而且是…

【linux】搜索所有目录和子目录下的包含.git的文件并删除

一、linux命令搜索所有目录和子目录下的包含.git的文件 在Linux系统中,要搜索所有目录和子目录下的包含.git的文件,可以使用find命令。find命令允许指定路径、表达式和操作来查找文件。 以下是使用find命令搜索包含.git的文件的方法: 1. 基…

《高效便捷,探索快递柜系统架构的智慧之路》

随着电商业务的蓬勃发展,快递柜系统作为一种高效、便捷的最后一公里配送解决方案,正在受到越来越多企业和消费者的青睐。本篇博客将深入探讨快递柜系统的架构设计理念、优势和实践,帮助读者了解如何构建智能化的快递柜系统,提升物…

STM32平替GD32有多方便

众所周知, GD32一直模仿STM32,从未被超越。 我最近公司使用的GD32E230C6T6 这款芯片有48个引脚。 属于小容量的芯片。 我有一个用STM32写的代码,之前是用的 STM32F103CB 这款芯片是中容量的。 不过在keil中,只需要这两步,就能使用原来的逻辑,几乎不用修改代码。 1. …

《智能便利,畅享便利柜平台的架构奇妙之旅》

便利柜平台作为一种智能化、便捷的自助服务解决方案,正在逐渐走进人们的生活。本篇博客将深入探讨便利柜平台的架构设计理念、优势和实践,帮助读者了解如何构建智能便利柜平台,提供更便捷的自助服务体验。 ### 便利柜平台架构设计 #### 1. …

网络编程-套接字相关基础知识

1.1. Socket简介 套接字&#xff08;socket&#xff09;是一种通信机制&#xff0c;凭借这种机制&#xff0c; 客户端<->服务器 模型的通信方式既可以在本地设备上进行&#xff0c;也可以跨网络进行。 Socket英文原意是“孔”或者“插座”的意思&#xff0c;在网络编程…

Jenkins安装部署

目录 一、CI/CD介绍 二、持续集成与持续交付 持续集成&#xff08;CI&#xff09; 持续交付&#xff08;CD&#xff09; 持续集成的组成要素 持续集成的好处 持续集成的流程 三、Gitlab简介与特点 四、Gitlab CI/CD工作原理 五、Gitlab的部署与安装 安装依赖环境 G…

docker-compose部署及使用

Docker Compose是一个用于定义和运行多个Docker容器的工具。它使用YAML文件来配置应用程序的服务、网络和卷等方面&#xff0c;使得在单个主机上进行部署更加简单。通过定义一个Compose文件&#xff0c;你可以一次性启动、停止和管理整个应用程序的多个容器。 Compose文件包含了…

【每日一题】[信息与未来 2023] 幸运数字题解(枚举 模拟)

标签&#xff1a;数位拆分、枚举、模拟题意&#xff1a;给定区间 [ a , b ] [a,b] [a,b]&#xff0c;求出区间内满足奇数位和等于偶数位和的数字个数题解&#xff1a;遍历区间内每个数字&#xff0c;统计其奇数位和与偶数位和&#xff0c;如果相等&#xff0c;计数器加一&#…

Stability AI与VAST推出TripoSR:快速3D建模新时代,0.5秒生成3D模型

前言 在人工智能领域&#xff0c;3D内容生成技术正迅速成为创新的前沿。最近&#xff0c;Stability AI与华人团队VAST联合推出的TripoSR模型&#xff0c;标志着3D建模进入了一个新的快速时代。此次合作不仅展示了技术的飞跃发展&#xff0c;也为开发者和创意工作者提供了前所未…

CSS3动画有哪些?

文章目录 一、是什么二、实现方式transition 实现渐变动画transform 转变动画animation 实现自定义动画 三、总结参考文献 一、是什么 CSS动画&#xff08;CSS Animations&#xff09;是为层叠样式表建议的允许可扩展标记语言&#xff08;XML&#xff09;元素使用CSS的动画的模…