When using Autotools, (automake, autoconf, etc.), one common problem when cross compiling is to end up with undefined references to rpl_malloc.
There are a references to the
ac_cv_func_malloc_0_nonnull=yesenvironment variable, but the easiest is to comment out the Autotools check, which causes the problem. Malloc has a long history on what it does when you malloc a size of zero, but nowadays, these issues less common than running into rpl_malloc problems, so my vote is to delete the test if it causes problems.
# rpl_malloc problem AC_FUNC_MALLOC
# if you must check for malloc...