rk3399 buildroot ubuntu20版本编译遇到问题

news2024/9/28 21:29:26

一、编译uboot遇到问题

/usr/include/libfdt.h:258:1: error: redefinition of 'fdt_set_version'
  258 | fdt_set_hdr_(version);
      | ^~~~~~~~~~~~
In file included from tools/fdt_host.h:11,
                 from tools/imagetool.h:22,
                 from tools/aisimage.c:8:
tools/../include/libfdt.h:209:21: note: previous definition of 'fdt_set_version' was here
  209 |  static inline void fdt_set_##name(void *fdt, uint32_t val) \
      |                     ^~~~~~~~
tools/../include/libfdt.h:219:1: note: in expansion of macro '__fdt_set_hdr'
  219 | __fdt_set_hdr(version);
      | ^~~~~~~~~~~~~
In file included from include/image.h:49,
                 from tools/aisimage.c:10:
/usr/include/libfdt.h:259:1: error: redefinition of 'fdt_set_last_comp_version'
  259 | fdt_set_hdr_(last_comp_version);
      | ^~~~~~~~~~~~

问题分析及解决:

        出现这个问题是因为你的系统版本太新了, 然后系统中的 libfdt 是比较新的,u-boot 版本比较老,而 libfdt 库改动过,u-boot 调用该库时出现兼容问题,实际上 u-boot 内置有libfdt,你把系统新的 libfdt-dev 删除,u-boot 就会调用源代码自带的旧的 libfdt, 所以只需下面命令然后重新编译:

sudo apt-get remove libfdt-dev

后面想重新安装只需:

sudo apt-get install libfdt-dev

二、编译bulidroot遇到问题

freadahead.c: In function 'freadahead':
freadahead.c:91: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."
   91 |  #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."
      |   ^~~~~
fseeko.c: In function 'rpl_fseeko':
fseeko.c:109:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
  109 |   #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
      |    ^~~~~

问题分析及解决

cd output/build/host-m4-1.4.17/

sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c

 echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h

三、编译buildroot报错

gdbusmessage.c:2698:30: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
 2698 |       tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

问题分析及解决

找到报错的位置,加入如下代码:

if(line != NULL)

......
if(signature_str!= NULL)
 

四、编译buildroot出现问题

/usr/bin/ld: ../lib/libext2fs.a(ismounted.o): in function `check_mntent_file':
ismounted.c:(.text+0x23d): undefined reference to `major'
/usr/bin/ld: ../lib/libblkid.a(devname.o): in function `probe_all':
devname.c:(.text+0x888): undefined reference to `makedev'
/usr/bin/ld: devname.c:(.text+0xb7e): undefined reference to `makedev'
/usr/bin/ld: devname.c:(.text+0xc5b): undefined reference to `makedev'
collect2: error: ld returned 1 exit status

问题分析及解决

找到devname.c文件,添加

#include <sys/types.h>
#include <sys/sysmacros.h>

五、编译buildroot遇到问题

lib/fseterr.c: In function 'fseterr':
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."
   77 |  #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."
      |   ^~~~~

解决方案

cd output/build/host-bison-3.0.4/  
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h

六、编译buildroot遇到问题

strerror-sym.c:47:9: error: 'errnos_msgstr' undeclared (first use in this function)
  return errnos_msgstr + errnos_msgidx[idx];
         ^
strerror-sym.c:47:9: note: each undeclared identifier is reported only once for each function it appears in
strerror-sym.c:47:25: error: 'errnos_msgidx' undeclared (first use in this function)
  return errnos_msgstr + errnos_msgidx[idx];

解决方案

七、buildroot编译报错

/home/zw/rk3399/x3399_linux_new/buildroot/output/rockchip_x3399/build/host-qemu-2.10.2/linux-user/syscall.c:259:16: error: static declaration of 'gettid' follows non-static declaration
  259 | _syscall0(int, gettid)
      |                ^~~~~~
/home/zw/rk3399/x3399_linux_new/buildroot/output/rockchip_x3399/build/host-qemu-2.10.2/linux-user/syscall.c:189:13: note: in definition of macro '_syscall0'
  189 | static type name (void)   \
      |             ^~~~
In file included from /usr/include/unistd.h:1170,
                 from /home/zw/rk3399/x3399_linux_new/buildroot/output/rockchip_x3399/build/host-qemu-2.10.2/include/qemu/osdep.h:75,
                 from /home/zw/rk3399/x3399_linux_new/buildroot/output/rockchip_x3399/build/host-qemu-2.10.2/linux-user/syscall.c:20:
/usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration of 'gettid' was here
   34 | extern __pid_t gettid (void) __THROW;
      |                ^~~~~~
  CC      aarch64-linux-user/target/arm/crypto_helper.o
  GEN     trace/generated-helpers.c
  CC      aarch64-linux-user/trace/control-target.o
  CC      aarch64-linux-user/gdbstub-xml.o
  CC      aarch64-linux-user/trace/generated-helpers.o
/home/zw/rk3399/x3399_linux_new/buildroot/output/rockchip_x3399/build/host-qemu-2.10.2/linux-user/ioctls.h:173:9: error: 'SIOCGSTAMP' undeclared here (not in a function); did you mean 'SIOCSRARP'?
  173 |   IOCTL(SIOCGSTAMP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timeval)))
      |         ^~~~~~~~~~
/home/zw/rk3399/x3399_linux_new/buildroot/output/rockchip_x3399/build/host-qemu-2.10.2/linux-user/syscall.c:5595:23: note: in definition of macro 'IOCTL'
 5595 |     { TARGET_ ## cmd, cmd, #cmd, access, 0, {  __VA_ARGS__ } },
      |                       ^~~
/home/zw/rk3399/x3399_linux_new/buildroot/output/rockchip_x3399/build/host-qemu-2.10.2/linux-user/ioctls.h:174:9: error: 'SIOCGSTAMPNS' undeclared here (not in a function); did you mean 'SIOCGSTAMP_OLD'?
  174 |   IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec))) 

解决方案

将报错地方注释掉

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

BurpSuite—-Target模块(目标模块)

前言 本文主要介绍BurpSuite—-Target模块(目标模块)的相关内容 关于BurpSuite的安装可以看一下之前这篇文章&#xff1a; http://t.csdn.cn/cavWt Target功能 目标工具包含了SiteMap&#xff0c;用你的目标应用程序的详细信息。它可以让你定义哪些对象在范围上为你目前的工…

基于QGIS的长株潭城市群边界范围融合实战

背景 在面向区域的研究过程中&#xff0c;比如一些研究区域&#xff0c;如果是具体的行政区划&#xff0c;比如具体的某省或者某市或者县&#xff0c;可以直接从国家官方的地理数据中直接下载就可以。但如果并没有直接的空间数据那怎么办呢&#xff1f;比如之前遇到的一个场景&…

chatgpt赋能Python-python3_len__

Python3 len()函数&#xff1a;使用方法和常见应用 在Python中&#xff0c;len()函数是一个内置函数&#xff0c;用于返回对象的长度或元素的个数。它适用于字符串、列表、元组、字典、集合等Python数据类型。在本篇文章中&#xff0c;我们将深入探讨Python3 len()函数的使用方…

C++ [STL之string模拟实现]

本文已收录至《C语言和高级数据结构》专栏&#xff01; 作者&#xff1a;ARMCSKGT STL之string模拟实现 前言正文存储结构默认成员函数构造函数析构函数拷贝构造函数赋值重载 容量操作类获取字符串长度size获取当前容量capacity查询是否为空串emptyreserve扩容调整字符串大小si…

基于Freertos的ESP-IDF开发——6.使用DHT1温湿度传感器

基于Freertos的ESP-IDF开发——6.使用DHT1温湿度传感器 0. 前言1. DHT11驱动原理2. 完整代码3. 演示效果4. 其他FreeRtos文章 0. 前言 开发环境&#xff1a;ESP-IDF 4.3 操作系统&#xff1a;Windows10 专业版 开发板&#xff1a;自制的ESP32-WROOM-32E 准备一个DHT11温湿度传…

【Element-ui】el-table大数据量渲染卡顿问题

1、场景描述 在项目开发中&#xff0c;遇到在表格中一次性加载完的需求&#xff0c;且加载数量不少&#xff0c;有几百几千条&#xff0c;并且每条都可能有自己的下拉框&#xff0c;输入框来做编辑功能&#xff0c;此时普通的el-table肯定会导致浏览器卡死&#xff0c;那么怎么…

Windows10 双网卡配置,轻松实现内外互通

1 背景 我平常需要连接外网查阅资料&#xff0c;聊天等&#xff0c;做实验时需要将写到的代码打包部署到内网服务器中&#xff0c;所以需要频繁地切换内外网&#xff0c;修改静态网络配置。很是苦恼。 2 方法 最近&#xff0c;我找到了几种解决办法。 方法一、…

uniapp DIY可视化工具 控件拖拽工具怎么开发/拖拽库/模板引擎

uniapp DIY可视化工具 控件拖拽工具怎么开发 答&#xff1a;需要 (**拖拽库**) &#xff08;**模板引擎**&#xff09;代码自动生成 python有哪些模板引擎 Jinja2是一个小型但快速且易于使用的以纯python编写的独立模板引擎&#xff08;最主要的模板&#xff09;Chameleon是T…

深度学习之卷积神经网络(CNN)

大家好&#xff0c;我是带我去滑雪&#xff01; 卷积神经网络&#xff08;Convolutional Neural Network&#xff0c;CNN&#xff09;是一种基于深度学习的前馈神经网络&#xff0c;主要用于图像和视频识别、分类、分割和标注等计算机视觉任务。它主要由卷积层、池化层、全连接…

【开源、应用】QT—TCP网络上位机的设计

本文设计一个终端控制的上位机软件&#xff08;如“设计目标”下图所示&#xff09;&#xff0c;可以和STM32、Adruino等通信实现无线局域网控制系统。 本文的通信内容和图表内容可以参考作者之前的文章 STM32ESP8266连接电脑Qt网络上位机——QT篇https://blog.csdn.net/qq_53…

【STM32G431RBTx】备战蓝桥杯嵌入式→决赛试题→第六届

文章目录 前言一、题目二、模块初始化三、代码实现interrupt.h:interrupt.c:main.h:main.c: 四、完成效果五、总结 前言 无 一、题目 二、模块初始化 1.LCD这里不用配置&#xff0c;直接使用提供的资源包就行 2.ADC:开启ADCsingle-ended 3.LED:开启PC8-15,PD2输出模式就行了…

【JVM001】宋红康JVM字节码举例

宋红康JVM字节码举例 1 Integer package jvmT; public class IntegerTest {public static void main(String[] args) {Integer i 5;int y 5;System.out.println(iy); //trueInteger i6 5;Integer y6 5;System.out.println(i6y6);//trueInteger i5 128;Integer y5 128;System.…

SpringBoot中使用lombok

1.添加依赖 在项目的根目录中找到pom.xml&#xff0c;在dependencies下复制这段代码 <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok --><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifac…

解决Python爬虫中selenium模块中的find_element_by_id方法无法使用

如有错误&#xff0c;敬请谅解&#xff01; 此文章仅为本人学习笔记&#xff0c;仅供参考&#xff0c;如有冒犯&#xff0c;请联系作者删除&#xff01;&#xff01; 我们在学习selenium模块的时候&#xff0c;经常会用到 browser.find_element_by_id命令&#xff0c;但随着se…

代码随想录算法训练营第四十六天 | bool的背包题,细节多

139.单词拆分 文档讲解&#xff1a;代码随想录 (programmercarl.com) 视频讲解&#xff1a;动态规划之完全背包&#xff0c;你的背包如何装满&#xff1f;| LeetCode&#xff1a;139.单词拆分_哔哩哔哩_bilibili 状态&#xff1a;不会做&#xff0c;不知道怎么把bool类型与背包…

推荐系统系列之推荐系统概览(下)

在推荐系统概览的第一讲中&#xff0c;我们介绍了推荐系统的常见概念&#xff0c;常用的评价指标以及首页推荐场景的通用召回策略。本文我们将继续介绍推荐系统概览的其余内容&#xff0c;包括详情页推荐场景中的通用召回策略&#xff0c;排序阶段常用的排序模型&#xff0c;推…

软件测试实验:loadrunner的高级使用

目录 前言实验目的实验内容实验要求实验过程loadrunner中插入事务与集合点loadrunner中插入检查点loadrunner中参数化-table分析报告功能loadrunner手动设置场景loadrunner监视图标 总结 前言 本实验主要介绍了loadrunner这一强大的性能测试工具的高级使用方法&#xff0c;包括…

python实现九宫格的车辆路径轨迹上位机界面

实验环境&#xff1a;wxFormBuilder v3.5 python3.7.5 MC9S12G128开发板 基本功能&#xff1a;控制开发板上的按键&#xff0c;模拟车辆移动的上下左右四个方位&#xff0c;通过can通信告诉上位机界面&#xff0c;车辆轨迹的移动方位&#xff1b; 1. python重新封装control…

技巧:jetbrain全家桶系列如何撤销已经提交本地仓库但还没push的commit

目录 1. 哎呀&#xff0c;不小心把不能提交的“机密”加入commit了2. 使用reset来修复的话要注意有坑&#xff0c;选Soft和Mixed&#xff0c;千万别选Hard和Keep3. 使用revert&#xff0c;只能修修补补&#xff0c;但commit还在&#xff0c;当然有好处是会留下使用痕迹&#xf…

异常处理机制

编程错误 编写程序时遇到的错误可大致分为 2 类&#xff0c;分别为语法错误和运行时错误。 语法错误 语法错误&#xff0c;也就是解析代码时出现的错误。当代码不符合Python语法规则时&#xff0c;Python解释器在解析时就会报出SyntaxError语法错误&#xff0c;与此同时还会…