linux stubs 32.h,解决 error: gnu/stubs-32.h: No such file or directory
场景
将服务程序从SUSE迁移到CentOS,编译出错
make[1]: Entering directory `/root/rpmbuild/BUILD/test/conf'
In file included from /usr/include/features.h:385,
from /usr/include/stdint.h:26,
from ../include/MyTypes.h:4,
from conf_init.c:1:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[1]: *** [conf_init32.o] Error 1
make[1]: Leaving directory `/root/rpmbuild/BUILD/test/conf'
make: *** [all] Error 1
解决
1 从SUSE上拷贝gnu/stubs-32.h到相应的目录
2.其他解决思路
说明如下:conf_init.c:第一行引用../include/MyTypes.h头文件,
而这个头文件在第四行引用/usr/include/stdint.h头文件,
而这个头文件在第26行引用/usr/include/features.h头文件,
而这个头文件在第385行应用了/usr/include/gnu/stubs.h头文件,
而这个头文件在第7行引用了gnu/stubs-32.h头文件
下面是/usr/include/gnu/stubs.h文件的内容如下:
/* This file selects the right generated file of `__stub_FUNCTION' macros
based on the architecture being compiled for. */
#include
#if __WORDSIZE == 32
# include
#elif __WORDSIZE == 64
# include
#els
# error "unexpected value for __WORDSIZE macro"
#endif
~
注明:这个文件说明了64位或者32位编译环境选择的头文件。所以在编译的过程中,
使用了-m2的参数就会链接到32位版本的编译器,修改所有的Makefile文件,查看
是否有什么32位编译的删除即可。
查阅的外文资料几乎没有任何用处:
On Ubuntu it's called libc6-dev-i386 - do sudo apt-get install libc6-dev-i386. See below for extra instructions for Ubuntu 12.04.
On Red Hat distros, the package name is glibc-devel.i686 (Thanks to David Gardner's comment)
On CentOS 5.8, the package name is glibc-devel.i386 (Thanks to JimKleck's comment)
On CentOS 6.3, the package name is glibc-devel.i686.
On SLES it's called glibc-devel-32bit - do zypper in glibc-devel-32bit
在SLES系统上,执行上述指令安装,在/usr/include/gnu目录下确实生成了上述的文件。
在CentOS系统上,无效。
linux stubs 32.h,解决 error: gnu/stubs-32.h: No such file or directory相关推荐
- 【ubuntu】gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
一.问题描述 在 ubuntu 20.04 系统中编译 graphlearning 源码时出现如下报错: gcc: fatal error: cannot execute 'cc1plus': exe ...
- linux输入yum后提示: -bash: /usr/bin/yum: No such file or directory的解决方案
linux输入yum后提示: -bash: /usr/bin/yum: No such file or directory的解决方案 参考文章: (1)linux输入yum后提示: -bash: /u ...
- fatal error: opencv2\core\core.hpp: No such file or directory
fatal error: opencv2\core\core.hpp: No such file or directory,可以从代码处跳转,但是运行找不到头文件 Ctrl点击头文件可以跳转,但是运行 ...
- linux移植中出现【can‘t open /dev/ttyO0: No such file or directory】解决方式
在linux移植过程中,根文件系统过载之后,文件系统运行提示出现错误: can't open /dev/ttyO0: No such file or directory 错误的打印提示如下: 解决方法 ...
- 解决adb push时显示adb: error: failed to copy ‘……: remote No such file or directory
项目场景: 把在虚拟机编译好的工程push到嵌入式端运行,执行 adb push install/rknn_mmWave_demo/ userdata 却一直显示 adb: error: failed ...
- 解决 项目cocoapods diff: /../Podfile.lock: No such file or directory
解决cocoapods diff: /../Podfile.lock: No such file or directory 最近把以前代码放到新电脑上运行,在执行pod update之后build工程 ...
- Linux CentOS安装zsh插件提示/usr/bin/env: python: No such file or directory。
执行 ./install.py 文件时,提示: /usr/bin/env: python: No such file or directory 查看系统已安装的 python 版本: ➜ ~ ls - ...
- linux下自动补全问题: autocomplete sh: ( compgen -d — ” ): No such file or directory
autocomplete sh: <( compgen -d - " ): No such file or directory http://www.dansketcher.com/2 ...
- 4种方法转义字符解决报错FileNotFoundError: [Errno 2] No such file or directory
写在前面: 前面的案例不想看可以直接看结尾的4个结论. 直接看第4个结论,就是文章的最后.二八定律.[方法4通用性极强] 快速跳转至 通用性方法4 QQ:1981791622. 备注:我是CSDN道友 ...
- 如何解决:FileNotFoundError: 以及[Errno 2]No such file or directory
------------------------------出错原因----------------------------- 因为种种问题系统无法找到对应路径的文件. --------------- ...
最新文章
- opencv学习笔记(二)
- 关于 MongoDB 与 SQL Server 通过本身自带工具实现数据快速迁移 及 注意事项 的探究...
- 诺基亚没放弃 它买下这家公司,要成为电信界的扛把子
- rsync常用的三种用法
- java 基础--NIO(4)
- java的lr词法编译器_Sample语言编译器(词法分析、正规式、LL、LR、 算符优先)...
- 【TensorFlow】ValueError: Shape must be rank 1 but is rank 0 for ' ’ with input shapes: [].问题
- Oracle.ManagedDataAccess 连接数据库用户名密码错误
- C提高_day03_作业第三题
- spring boot 学习(十一)使用@Async实现异步调用
- ES6 Generator 函数
- thinkpad x270 加装内置4G模块实现移动上网的记录
- 奈奎斯特稳定性判据的步骤(含详细推导)
- 【用html做个人简历的网页(初级)】
- Java学习 --- HTML
- 降低技术应用门槛,易现推动“AR+”迈上新台阶
- 移动IM产品发展史及趋势预测
- 如何设置自定义任务栏图标_如何为任何应用程序自定义Windows 7任务栏图标
- Springboot+mysql+大学生就业管理系统 毕业设计 -附源码290915
- Win10系统下安装编辑器之神(The God of Editor)Vim并且构建Python生态开发环境(2020年最新攻略)
热门文章
- stm32 jlink Unexceped core id found 0x00000000,excepted 0X3BA00477,MASK 0XFFFFFFFF
- 贪心科技机器学习训练营(十二)
- ActivityManagerService解读之Activity启动三探--Activity中Task与Stack
- Ubuntu安装Microsoft Windows Fonts微软字体库
- 如何计算 R 中 T 检验 的 P 值
- python函数里调用外部变量
- python批量图片压缩
- 个人网盘搭建过程--资料来自腾讯云实验室
- stm32用杜邦线与中断模拟led灯开关
- 简述java工厂模式详解_JAVA 设计模式之 工厂模式详解