linux内核编译问题——undefined reference to `error'
来源:互联网 发布:淘宝待清洗订单 编辑:程序博客网 时间:2024/06/06 01:08
内核版本 2.6.33.9
make zImage时出现如下错误:
LD arch/arm/boot/compressed/vmlinuxarch/arm/boot/compressed/decompress.o(.text+0x23c0): In function `do_decompress':arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:67: undefined reference to `error'arch/arm/boot/compressed/decompress.o(.text+0x23e0):arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:73: undefined reference to `error'arch/arm/boot/compressed/decompress.o(.text+0x2404):arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:80: undefined reference to `error'arch/arm/boot/compressed/decompress.o(.text+0x2468):arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:95: undefined reference to `error'arch/arm/boot/compressed/decompress.o(.text+0x2548):arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:152: undefined reference to `error'/usr/src/rtllinux-3.2-rc1/linux/arch/arm/boot/compressed/Makefile:111: recipe for target 'arch/arm/boot/compressed/vmlinux' failedmake[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1/usr/src/rtllinux-3.2-rc1/linux/arch/arm/boot/Makefile:54: recipe for target 'arch/arm/boot/compressed/vmlinux' failedmake[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2/usr/src/rtllinux-3.2-rc1/linux/arch/arm/Makefile:252: recipe for target 'zImage' failedmake: *** [zImage] Error 2
根据提示中目录 ./arch/arm/boot/compressed/decompress.o找到decompress.c文件,查看源码,发现do_decompress函数并无问题。
void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)){ decompress(input, len, NULL, NULL, output, NULL, error); }
然后查看源码中所引用目录及文件,发现./lib/decompress_inflate.c 找到其所在目录,打开文件,发现末尾行对decompress 函数的定义为 #define decompress gunzip
再在当前文件下找到 gunzip 的定义,
STATIC int INIT gunzip(unsigned char *buf, int len, int(*fill)(void*, unsigned int), int(*flush)(void*, unsigned int), unsigned char *out_buf, int *pos, void(*error_fn)(char *x))
发现所用为error_fn 而非 error,于是改回error后发现仍然出现错误,
参考http://blog.csdn.net/einsteinz/article/details/5757607 文章中所提,将decompress.c 中所有error 改为error_fn 发现可以继续编译。
0 0
- linux内核编译问题——undefined reference to `error'
- ----linux--内核编译的问题:undefined reference to `printascii'
- 【嵌入式Linux】[内核编译]:内核编译时出现的问题:undefined reference to `__gnu_mcount_nc'
- 编译linux 内核时:decompress.c:(.text+0x25c4): undefined reference to `error'的解决办法
- 编译内核出现问题: undefined reference to `__gnu_mcount_nc'
- 编译链接报undefined reference to error
- linux gcc编译undefined reference to `stricmp'问题
- cocos2dx问题:error: undefined reference to 'XXX'
- linux下生产者与消费者问题代码,以及编译c代码时error:undefined reference to sem_wait 解决方法之一
- linux c++ 编译undefined reference to
- linux编译,解决类似于undefined reference to `*'
- ffmpeg libx264编译出现error: undefined reference to 'x264_picture_init'等问题的解决方法
- linux下编译c代码时error:undefined reference to sem_init sem_wait 解决方法之一
- Linux gcc编译提示:undefined reference to `sqrtf' collect2: error: ld returned 1 exit status
- Linux下undefined reference to `pthread_create' 问题
- 编译内核是发现错误:undefined reference to `dm9000_initialize'
- A20内核编译错误undefined reference to `hwmon_device_register'
- 内核2.6.22.6编译出现 undefined reference to __mutex_unlock_slowpath,
- 从曹操杀华陀而联想到的系统性能问题才是真正的致命的问题
- java的插入排序算法学习
- oracle中sql语句中多个查询结果的交集、差集和并集
- HTM-16.2代码(11)——xTZSearch
- Android中view的加载机制(三)
- linux内核编译问题——undefined reference to `error'
- 深入浅出RxJava三--响应式的好处
- Java设计模式(14)行为型:模板方法模式
- Mybatis传多个参数(三种解决方案)
- Android 布局文件单行显示,多余文字用“...”代替
- php的pow函数
- CentOS 6.7 安装Scala 2.10.4 和 Spark 1.6.0
- html5下input的placeholder标签兼容ie9
- [HDU1573] X问题