交叉编译: undefined reference to `rpl_malloc'
来源:互联网 发布:傲剑万法升级数据大全 编辑:程序博客网 时间:2024/06/15 16:29
ndefined reference to `rpl_malloc'
今天交叉编译一个程序時遇到了一个很奇怪的问题,编译到最后一步链接時,发生了下面的错误:
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。把上面的几句话删掉后重新编译,就正常了。
阅读全文
0 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'
- RS485总线通信协议的设计与实现
- 在Eclipse中做SVN代码回退操作
- mysql创建表
- Android RecycleView---- RecycleView的简单使用
- 1304:计算阶乘和
- 交叉编译: undefined reference to `rpl_malloc'
- 写文章 数据嗨客 | 第2期:线性回归 数据嗨客 | 第2期:线性回归 泊数 泊数 1 年前 普林大数据学院——“机器学习”系列 普林大数据学院依托北京大数据研究院和北京大学,为有需求的企业
- Python模拟登录百度主页
- Selenium小结
- c++内存管理
- s5pv210 中断学习笔记
- java实现二叉树的构建以及3种遍历方法
- 跟我学NodeJS(一)
- 红黑树核心原理