解决A40i/T3 SDK 编译报错问题

2023-12-29 21:04

本文主要是介绍解决A40i/T3 SDK 编译报错问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

脚本功能:解决A40i/T3 SDK 编译报错问题
1、编译报错 freadahead.c:91:3: error
2、编译报错 lib/fseterr.c:77:3: error
3、编译报错 pipe.cpp:86:22: error
4、编译报错gdbusauth.c:1298:11: error
5、编译报错gdbusmessage.c:2698:30: error
6、编译报错gdbusmessage.c:2698:30: error
7、编译报错 ismounted.c:(.text+0x23d): undefined reference to ‘major’
8、编译报错create_inode.c:395:18: error: conflicting types for ‘copy_file_range’
9、编译报错 create_inode.c:(.text+0x2d4): undefined reference to ‘minor’
10、编译报错gawk: fatal: cannot use gawk builtin `namespace’ as variable name
11、编译报错 strerror-sym.c:47:25: error:
脚本中6个函数分别解决以下6个目录遇到的编译遇到的上述的11个问题!!!

脚本函数function1 处理:out/sun8iw11p1/linux/common/buildroot/build/host-m4-1.4.17
脚本函数function2 处理:out/sun8iw11p1/linux/common/buildroot/build/host-bison-3.0.4
脚本函数function3 处理:out/sun8iw11p1/linux/common/buildroot/build/host-dbus-cpp-0.9.0/src
脚本函数function4 处理:out/sun8iw11p1/linux/common/buildroot/build/host-libglib2-2.50.1/gio
脚本函数function5 处理:out/sun8iw11p1/linux/common/buildroot/build/host-e2fsprogs-1.43.3
脚本函数function6 处理:out/sun8iw11p1/linux/common/buildroot/build/libgpg-error-1.24

脚本使用:处理上述问题执行一次本文中的脚本即可,其中./build.sh是执行sdk的编译脚本。

#!/bin/bash 
build_ret="build ok !!!"
Download="Need Rebuild to Download: "
err_dir1="out/sun8iw11p1/linux/common/buildroot/build/host-m4-1.4.17"
err_dir2="out/sun8iw11p1/linux/common/buildroot/build/host-bison-3.0.4"
err_dir3="out/sun8iw11p1/linux/common/buildroot/build/host-dbus-cpp-0.9.0/src"
err_dir4="out/sun8iw11p1/linux/common/buildroot/build/host-libglib2-2.50.1/gio"
err_dir5="out/sun8iw11p1/linux/common/buildroot/build/host-e2fsprogs-1.43.3"
err_dir6="out/sun8iw11p1/linux/common/buildroot/build/libgpg-error-1.24" 
function function1(){ 
grep -rnH "_IO_IN_BACKUP" $err_dir1/lib/stdio-impl.h > /dev/null 2>&1
if [ $? -eq 0 ];then  echo 1
elsels $err_dir1/lib/stdio-impl.h > /dev/null 2>&1if [ $? -eq 0 ];then sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' $err_dir1/lib/*.cecho "#define _IO_IN_BACKUP 0x100" >> $err_dir1/lib/stdio-impl.h  elseecho 0 fi	   
fi
}function function2(){ 
grep -rnH "IO_EOF_SEEN" $err_dir2/lib/*.c > /dev/null 2>&1
if [ $? -eq 0 ];then  echo 1
elsels  $err_dir2/lib > /dev/null 2>&1if [ $? -eq 0 ];then sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' $err_dir2/lib/*.cecho "#define _IO_IN_BACKUP 0x100" >>   $err_dir2/lib/stdio-impl.h elseecho 0fi
fi
}function function3(){
grep -rnH "build ok" $err_dir3/pipe.cpp > /dev/null 2>&1
if [ $? -eq 0 ];then   echo 1
else  ls $err_dir3/pipe.cpp > /dev/null 2>&1if [ $? -eq 0 ];then sed -i '86c\::write(_fd_write, (char*)'\0', 1);//build ok' $err_dir3/pipe.cpp elseecho 0 fi
fi
}  function function4(){
grep -rnH "build ok" $err_dir4 > /dev/null 2>&1 
if [ $? -eq 0 ];then   echo 1
else  ls $err_dir4/gdbusauth.c > /dev/null 2>&1if [ $? -eq 0 ];then   sed -i '1298c\if(line != NULL ) debug_print ("SERVER: WaitingForBegin, read '%s'", line);' $err_dir4/gdbusauth.c sed -i '2698c\if(signature_str != NULL )tupled_signature_str = g_strdup_printf("(%s)",signature_str);//build ok' $err_dir4/gdbusmessage.celseecho 0 fi
fi
}function function5(){
grep -rnH "build ok" $err_dir5/debugfs/debugfs.c > /dev/null 2>&1 
if [ $? -eq 0 ];then   echo 1
else  ls $err_dir5 > /dev/null 2>&1if [ $? -eq 0 ];then   sed -i '1c\#include <sys/types.h>'       $err_dir5/lib/ext2fs/ismounted.csed -i '2c\#include <sys/sysmacros.h>/*' $err_dir5/lib/ext2fs/ismounted.csed -i '19c\//#include <unistd.h>'       $err_dir5/misc/create_inode.c sed -i '1c\#include <sys/types.h>'       $err_dir5/misc/create_inode.c sed -i '2c\#include <sys/sysmacros.h>/*' $err_dir5/misc/create_inode.csed -i '1c\#include <sys/types.h>'       $err_dir5/debugfs/debugfs.csed -i '2c\#include <sys/sysmacros.h>/*build ok' $err_dir5/debugfs/debugfs.c  elseecho 0 fi
fi
}function function6(){
grep -rnH "build ok" $err_dir6/src/strerror-sym.c > /dev/null 2>&1 
if [ $? -eq 0 ];then   echo 1
else  ls $err_dir6 > /dev/null 2>&1if [ $? -eq 0 ];then    sed -i  '88c\sub (/#.+/, "");' 		$err_dir6/src/mkerrcodes.awksed -i '125c\sub (/#.+/, "");' 		$err_dir6/lang/cl/mkerrcodes.awk	sed -i '45c\idx = msgidxof (code);' $err_dir6/src/strerror-sym.csed -i '47c\return msgstr + msgidx[idx];//build ok' $err_dir6/src/strerror-sym.c elseecho 0 fi
fi
}
function rebuild(){  
if [ $1  -gt 0 ]; thenecho "build: "$2" ok  "
elseecho "rebuild: "$2"..."./build.sh
fi
}  
./build.sh "$@"
rebuild $(function1) $err_dir1
rebuild $(function2) $err_dir2
rebuild $(function3) $err_dir3
rebuild $(function4) $err_dir4
rebuild $(function5) $err_dir5
rebuild $(function6) $err_dir6

这篇关于解决A40i/T3 SDK 编译报错问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/550715

相关文章

SpringBoot整合Dubbo+ZK注册失败的坑及解决

《SpringBoot整合Dubbo+ZK注册失败的坑及解决》使用Dubbo框架时,需在公共pom添加依赖,启动类加@EnableDubbo,实现类用@DubboService替代@Service,配... 目录1.先看下公共的pom(maven创建的pom工程)2.启动类上加@EnableDubbo3.实

Kotlin Map映射转换问题小结

《KotlinMap映射转换问题小结》文章介绍了Kotlin集合转换的多种方法,包括map(一对一转换)、mapIndexed(带索引)、mapNotNull(过滤null)、mapKeys/map... 目录Kotlin 集合转换:map、mapIndexed、mapNotNull、mapKeys、map

nginx中端口无权限的问题解决

《nginx中端口无权限的问题解决》当Nginx日志报错bind()to80failed(13:Permissiondenied)时,这通常是由于权限不足导致Nginx无法绑定到80端口,下面就来... 目录一、问题原因分析二、解决方案1. 以 root 权限运行 Nginx(不推荐)2. 为 Nginx

解决1093 - You can‘t specify target table报错问题及原因分析

《解决1093-Youcan‘tspecifytargettable报错问题及原因分析》MySQL1093错误因UPDATE/DELETE语句的FROM子句直接引用目标表或嵌套子查询导致,... 目录报js错原因分析具体原因解决办法方法一:使用临时表方法二:使用JOIN方法三:使用EXISTS示例总结报错原

Windows环境下解决Matplotlib中文字体显示问题的详细教程

《Windows环境下解决Matplotlib中文字体显示问题的详细教程》本文详细介绍了在Windows下解决Matplotlib中文显示问题的方法,包括安装字体、更新缓存、配置文件设置及编码調整,并... 目录引言问题分析解决方案详解1. 检查系统已安装字体2. 手动添加中文字体(以SimHei为例)步骤

SpringSecurity整合redission序列化问题小结(最新整理)

《SpringSecurity整合redission序列化问题小结(最新整理)》文章详解SpringSecurity整合Redisson时的序列化问题,指出需排除官方Jackson依赖,通过自定义反序... 目录1. 前言2. Redission配置2.1 RedissonProperties2.2 Red

nginx 负载均衡配置及如何解决重复登录问题

《nginx负载均衡配置及如何解决重复登录问题》文章详解Nginx源码安装与Docker部署,介绍四层/七层代理区别及负载均衡策略,通过ip_hash解决重复登录问题,对nginx负载均衡配置及如何... 目录一:源码安装:1.配置编译参数2.编译3.编译安装 二,四层代理和七层代理区别1.二者混合使用举例

Java中读取YAML文件配置信息常见问题及解决方法

《Java中读取YAML文件配置信息常见问题及解决方法》:本文主要介绍Java中读取YAML文件配置信息常见问题及解决方法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要... 目录1 使用Spring Boot的@ConfigurationProperties2. 使用@Valu

java使用protobuf-maven-plugin的插件编译proto文件详解

《java使用protobuf-maven-plugin的插件编译proto文件详解》:本文主要介绍java使用protobuf-maven-plugin的插件编译proto文件,具有很好的参考价... 目录protobuf文件作为数据传输和存储的协议主要介绍在Java使用maven编译proto文件的插件

SQL Server配置管理器无法打开的四种解决方法

《SQLServer配置管理器无法打开的四种解决方法》本文总结了SQLServer配置管理器无法打开的四种解决方法,文中通过图文示例介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的... 目录方法一:桌面图标进入方法二:运行窗口进入检查版本号对照表php方法三:查找文件路径方法四:检查 S