undefined symbol: rpl_realloc

x86上跨平台交叉编译aarch64的二进制文件,报错:

ld: error: undefined symbol: rpl_realloc
>>> referenced by lb.c:999
>>>               lb.o:(main)
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [lookbusy] Error 1
make: *** [all] Error 2

解决方案:

方法一:

Edit configure.ac and comment out AC_FUNC_MALLOC and AC_FUNC_REALLOC if present.

方法二:

在编译脚本的./configure前,增加

export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes

参考文献:

https://stackoverflow.com/a/68541115

https://github.com/openvenues/libpostal/issues/134#issue-193357645

Share

You may also like...

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注