yocto - petalinux 项目构建因 m4-native-1.4.18-r0 do_compile 在主机 Ubuntu 20.04 LTS 上失败而失败

标签 yocto xilinx ubuntu-20.04 petalinux

尝试将编译 Ubuntu 16 主机的 petalinux 2018.3 项目移植到 Ubuntu 20 主机。 发生以下错误

  ERROR: m4-native-1.4.18-r0 do_compile: Function failed: do_compile (log file is located at .
       .
       .
       .
    | gcc   -I. -I../../m4-1.4.18/lib   -isystem/home/os-bsp-team/fadil/2018.3/projects/rrh_4.0/RRH_TRX_MULTI_ADI_MULTICH/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include  -isystem/home/os-bsp-team/fadil/2018.3/projects/rrh_4.0/RRH_TRX_MULTI_ADI_MULTICH/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -O2 -pipe -c -o freadahead.o ../../m4-1.4.18/lib/freadahead.c
    | gcc   -I. -I../../m4-1.4.18/lib   -isystem/home/os-bsp-team/fadil/2018.3/projects/rrh_4.0/RRH_TRX_MULTI_ADI_MULTICH/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include  -isystem/home/os-bsp-team/fadil/2018.3/projects/rrh_4.0/RRH_TRX_MULTI_ADI_MULTICH/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -O2 -pipe -c -o fseeko.o ../../m4-1.4.18/lib/fseeko.c
    | ../../m4-1.4.18/lib/fseeko.c: In function ‘rpl_fseeko’:
    | ../../m4-1.4.18/lib/fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
    |   110 |   #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
    |       |    ^~~~~
    | ../../m4-1.4.18/lib/freadahead.c: In function ‘freadahead’:
    | ../../m4-1.4.18/lib/freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
    |    92 |  #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
    |       |   ^~~~~
    | make[3]: *** [Makefile:1915: fseeko.o] Error 1
    | make[3]: *** Waiting for unfinished jobs....
    | make[3]: *** [Makefile:1915: freadahead.o] Error 1
    | make[3]: Leaving directory '/home/os-bsp-team/fadil/2018.3/projects/rrh_4.0/RRH_TRX_MULTI_ADI_MULTICH/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
    | make[2]: *** [Makefile:1674: all] Error 2
    | make[2]: Leaving directory '/home/os-bsp-team/fadil/2018.3/projects/rrh_4.0/RRH_TRX_MULTI_ADI_MULTICH/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
    | make[1]: *** [Makefile:1572: all-recursive] Error 1
    | make[1]: Leaving directory '/home/os-bsp-team/fadil/2018.3/projects/rrh_4.0/RRH_TRX_MULTI_ADI_MULTICH/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/build'
    | make: *** [Makefile:1528: all] Error 2
    | ERROR: oe_runmake failed
    | WARNING: exit code 1 from a shell command.
    | ERROR: Function failed: do_compile (log file is located at /home/os-bsp-team/fadil/2018.3/projects/rrh_4.0/RRH_TRX_MULTI_ADI_MULTICH/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/temp/log.do_compile.1545563)
    ERROR: Task (/home/os-bsp-team/fadil/2018.3/components/yocto/source/aarch64/layers/core/meta/recipes-devtools/m4/m4-native_1.4.18.bb:do_compile) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 894 tasks of which 878 didn't need to be rerun and 1 failed.

通过谷歌搜索发现需要应用此补丁http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-devtools/m4?h=thud&id=95ca077ab871ceff46c2052f324f879a1d624ff4有人可以帮忙解决这个问题并在 yocto 中应用这个补丁吗?

最佳答案

您可以使用 git 应用补丁,例如 here .

或者您可以下载 m4-1.4.18-glibc-change-work-around.patch并将其放置在 meta/recipes-devtools/m4/files 中的 files 子文件夹中,并将以下行添加到 SRC_URI:

SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
        file://ac_config_links.patch \
        file://remove-gets.patch \
        file://m4-1.4.18-glibc-change-work-around.patch \
        "    
SRC_URI 中的

file://m4-1.4.18-glibc-change-work-around.patch 将为您应用补丁。

您还可以查找remove-gets.patch的位置,并将此补丁放在同一文件夹中。

关于yocto - petalinux 项目构建因 m4-native-1.4.18-r0 do_compile 在主机 Ubuntu 20.04 LTS 上失败而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67500482/

相关文章:

mqtt - Mosquitto 2.0.14 MQTT 与 TLS1.2 连接问题客户端 <unknown> 由于数据包格式错误而断开连接

c++ - 关闭任何模态 QDialog 后,焦点不会返回到 QMainWindow,直到用鼠标单击

fpga - 如果信号不在设计中,如何忽略综合约束?

c - Xilinx MicroBlaze 浮点兼容性

ubuntu - 使用 Snapcraft 安装软件包时出现 "store.RevisionNotAvailable"错误

amazon-web-services - 在 ubuntu 20.04 AWS EC2 节点上安装 nginx 时出现问题

node.js - 使用 npm 在 linux (yocto) 上更新 nodejs

windows - 如何使用 Yocto 为 Windows 生成工具链?

linux - 如何导出DBUS_SESSION_BUS_ADDRESS

c - ARM 汇编内联 C 互斥实现