交叉编译: undefined reference to `rpl_malloc'
来源:互联网 发布:js注释快捷键 edit 编辑:程序博客网 时间:2024/06/05 09:59
ndefined reference to `rpl_malloc'
fool posted @ 2011年3月06日 07:25 in Linux with tags 交叉编译autotools , 9159 阅读
今天交叉编译一个程序時遇到了一个很奇怪的问题,编译到最后一步链接時,发生了下面的错误:
1
2
/opt/toolschain/3
.4.1
/arm-linux/lib/libjson
.so: undefined reference to `rpl_realloc'
/opt/toolschain/3
.4.1
/arm-linux/lib/libjson
.so: undefined reference to `rpl_malloc'
很显然,在链接libjson库時发生了错误,libjson不知道为什么链接了两个不存在的函数:rpl_realloc和rpl_malloc。因为工具链中的所有库都是自己编译的,所以只能从自己身上找错误==。
遂重新编译libjson,发现config.h里有下面的几句话:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#define HAVE_MALLOC 0
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#define HAVE_REALLOC 0
...
/* Define to rpl_malloc if the replacement function should be used. */
#define malloc rpl_malloc
/* Define to rpl_realloc if the replacement function should be used. */
#define realloc rpl_realloc
看来是交叉编译時autotools认为我的工具链的libc中不包含malloc和realloc,然后擅自做主张给我替换成了rpl_malloc和rpl_realloc。把上面的几句话删掉后重新编译,就正常了。
1 0
- 交叉编译: undefined reference to `rpl_malloc'
- 交叉编译: undefined reference to `rpl_malloc'
- json-c 交叉编译(undefined reference to rpl_malloc )
- spawn-fcgi 交叉编译(undefined reference to rpl_malloc )
- 交叉编译tslib,遇到undefined reference to rpl_malloc错误解决办法
- undefined reference to rpl_malloc
- undefined reference to rpl_malloc
- undefined reference to `rpl_malloc'
- undefined reference to rpl_malloc
- 编译tslib1.4出现错误undefined reference to rpl_malloc错误
- sqlite3 交叉编译 undefined reference to `fdatasync' 错误解决
- 交叉编译中出现的 'Undefined reference to __aeabi_read_tp' 错误
- mips-openwrt交叉编译 undefined reference to `__stack_chk_guard 错误
- Qt交叉编译环境-undefined reference to `inotify_init1@GLIBC_2解决
- 编译出错 "undefined reference to"
- 编译出错 "undefined reference to" .
- Glib交叉编译:g__cancellable_lock undeclared!&HEADER/C_IN undeclared!&undefined reference to "localeconv"
- 交叉编译MIPS架构ASLA ../src/.libs/libasound.so: undefined reference to `atomic_sub'
- 【myeclipse】myeclipse中如何导入mysql-connector-java-5.1.8-bin.jar包
- Ubuntu CCS6详细安装教程
- Java_socket程序学习02-一个客户端对一个服务器-客户端键盘输入
- 宅急送项目第五天笔记!
- EDate(日期)标签之日期加减
- 交叉编译: undefined reference to `rpl_malloc'
- 菜鸟学排序:折半插入排序
- Topcoder srm 653 div.2 1000 - SingingEasy(区间DP)
- 无法启动此程序,因为计算机中丢失msvcp100.dll。
- javaee学习之路(七)Servlet监听器
- 设计模式实践之旅——Singleton Pattern
- mysql数据库是.frm,.myd,myi备份如何导入mysql
- Objective-C中的@property和@synthesize用法
- ASP.NET中website与webApplication区别