‘__NR_sigreturn’ was not declared in this scope
安装交叉编译器gdbserver 按readme来编译报错找不到
linux-arm-low.c: In function ‘CORE_ADDR arm_sigreturn_next_pc(regcache*, int, int*)’:
linux-arm-low.c:769:29: error: ‘__NR_sigreturn’ was not declared in this scopegdb_assert (svc_number == __NR_sigreturn || svc_number == __NR_rt_sigreturn);^
./../common/gdb_assert.h:34:13: note: in definition of macro ‘gdb_assert’((void) ((expr) ? 0 : \^
linux-arm-low.c: In function ‘CORE_ADDR get_next_pcs_syscall_next_pc(arm_get_next_pcs*)’:
linux-arm-low.c:823:21: error: ‘__NR_sigreturn’ was not declared in this scopeif (svc_number == __NR_sigreturn || svc_number == __NR_rt_sigreturn)^
make: *** [linux-arm-low.o] 错误 1
按博客方法处理https://www.codenong.com/cs106254960/
//在这个linux-arm-low.c文件添加文件包含
#ifndef __NR_sigreturn
#include <asm/unistd.h>
#endif
继续编译又引入新的问题,新问题参考博客https://www.programmersought.com/article/98671620102/
/usr/bin/ld: build-gnulib-gdbserver/import/libgnu.a(fcntl.o): Normal ELF relocation (M: 40)
/usr/bin/ld: build-gnulib-gdbserver/import/libgnu.a(fcntl.o): Normal ELF relocation (M: 40)
/usr/bin/ld: build-gnulib-gdbserver/import/libgnu.a(fcntl.o): Normal ELF relocation (M: 40)
/usr/bin/ld: build-gnulib-gdbserver/import/libgnu.a(fcntl.o): Normal ELF relocation (M: 40)
/usr/bin/ld: build-gnulib-gdbserver/import/libgnu.a(fcntl.o): Normal ELF relocation (M: 40)
build-gnulib-gdbserver/import/libgnu.a: Unable to add symbol: File format error
collect2: error: ld returned 1 exit status
Makefile:399: recipe for target ‘gdbserver’ failed
make: *** [gdbserver] Error 1
查阅了会,链接工具不一致,迎着头皮看了遍make输出信息,截取部分输出
make[4]: Entering directory '/home/lala0903/linux/tool/gdb-9.1/gdb/gdbserver/build-gnulib-gdbserver/import'GEN alloca.hGEN configmake.hGEN warn-on-use.hmake all-recursive
make[5]: Entering directory '/home/lala0903/linux/tool/gdb-9.1/gdb/gdbserver/build-gnulib-gdbserver/import'CC cloexec.oCC dirname-lgpl.oCC stripslash.oGEN ref-add.sedGEN ref-del.sedAR libgnu.aarm-linux-gnueabihf-ranlib ./libiberty.a; \cd ..; \
else true; fi
make[2]: Leaving directory '/home/lala0903/linux/tool/gdb-9.1/gdb/gdbserver/build-libiberty-gdbserver'
make[1]: Leaving directory '/home/lala0903/linux/tool/gdb-9.1/gdb/gdbserver'CXX alloc.oCXX arch/arm-linux.oCXX gdbsupport/agent.oCXX gdbsupport/btrace-common.o
从上面看出有CC 和CXX,感觉奇怪应该是不止gcc还有g++,于是查看了下makefile
CC = arm-linux-gnueabihf-gcc
CXX = g++
CXX_DIALECT = -std=gnu++11
AR = arm-linux-gnueabihf-ar
AR_FLAGS = rc
不知道为什么配置出来的make中g++ 竟然不是交叉编译工具,本地没装arm g++,装了一个修改makefile解决问题,不知道是否是不存在g++交叉编译工具导致的config配置问题,需要实验一下
‘__NR_sigreturn’ was not declared in this scope相关推荐
- 【C++】mingw32-make+cmake:error: ‘nullptr‘ was not declared in this scope解决方法
###问题 使用cmake成功(Configuring done Generating done)后,在cmd终端中执行 mingw32-make报错: error: 'nullptr' was no ...
- ndk error: malloc was not declared in this scope
error: 'malloc' was not declared in this scope 解决方法: NDK_TOOLCHAIN_VERSION=4.8 APP_CPPFLAGS += -frtt ...
- 'imread' was not declared in this scope
在opencv3中,会报这个异常: 'imread' was not declared in this scope 解决方法: #include <opencv2/core/core.hpp&g ...
- 'htons' was not declared in this scope 解决
'htons' was not declared in this scope ndk 如果是在ndk下,引用如下即可: /* Must include in android ndk env */ #i ...
- 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题
环境工具:Win10.VS2013.cocos2d-x-2.2.6.Cygwin.ADT 问题来源:写了一个小游戏,VS2013上运行成功,就尝试着打包apk,项目导入到ADT里面,添加了cocos2 ...
- 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope
解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决: ...
- ‘close’ was not declared in this scope
'close' was not declared in this scope 'read' was not declared in this scope 'sysconf' was not decla ...
- 文档源代码opencv 中的错误error: ‘SurfFeatureDetector’ was not declared in this scope
本篇文章朋友在青岛游玩的时候突然想到的...最近就有想写几篇关于文档源代码的文章,所以回家到之后就奋笔疾书的写出来发布了 这是文档中的源代码,:但是译编的时候会有一下错误: error ...
- was not declared in this scope
"was not declared in this scope"是一个错误信息,在编译的时候会遇到.其含义为标识符在其出现的地方是未被定义的. 出现该错误的时候,会同时把未定义的变 ...
- C++之‘malloc’ was not declared in this scope和invalid conversion from ‘void*’ to ‘char*’
1.错误一 'malloc' was not declared in this scope 2解决 加上头文件文件<stdlib.h> 3.错误二 invalid conversion f ...
最新文章
- linux怎样自动检查link文件_自动共享和上传文件到兼容的托管站点 | Linux 中国
- 【错误记录】Groovy 函数参数动态类型报错 ( Caught: groovy.lang.MissingMethodException: No signature of method )
- es6 初步深入学习
- 在Windows下安装chromedriver
- 天津大学计算机学院院长及副院长,李晓红 教授
- centos 安装rar 和 unrar
- leetcode 移动零
- 一加3支持android9吗,不忘老用户!一加3更新Android 9,网友:真的不将就
- TCP协议最大字节数计算
- dva开发一个cnode网站(1)
- 深圳小汽车摇号结果采集
- 02333软件工程——结构化方法
- trinity的简介、下载及使用
- BaiduMap---百度地图官方Demo之OpenGL绘制功能(介绍如何使用OpenGL绘制在地图中进行绘制)
- 虚拟化及vmware产品介绍
- 小米手机连接ubuntu adb调试
- 郗慧林:从投资到被投资
- 判断输入的数是不是2和3和5的倍数
- 使用perl进行完美的文本替换
- 注册资本认缴制年限是如何规定的
热门文章
- CUBA使用Spring查询接口
- 八爪鱼采集器增值API接口 memo
- poi在Excel中创建折线图
- 利用FlashPaper在web页面中显示PDF文件(兼容各浏览器)
- 全球计算机病毒损失报告,世界十大计算机病毒 CIH的危险被公认,第二经济损失26亿美元...
- JavaScript预解析
- 2022茶艺师(初级)考试试题模拟考试平台操作
- FileZilla打开连接后本地站点无法显示自己的本地电脑
- 【基于Centos】驱动安装
- ios android 系统占用空间,iOS 系统占用了 20G 储存空间?别担心,教你快速解决!...