Cross Compile Missing <malloc.h>

asked 2015-02-17 13:13:59 -0800

AllJoyner gravatar image

I have an Alljoyn service that works correctly on an Arduino Due, but when I change the build target to my Arduino Yun I receive the following error when I select the verify action (not even upload!):

aj_target.h:32:20: fatal error: malloc.h: No such file or directory.

I understand that the micro-controller on the Yun may not have the power to run the Alljoyn thin client, but I'm not even getting to that point, the build fails long before upload.

To provide a simple example, I used the "Blink" example that comes with the Arduino IDE and added #include <malloc.h> before void setup() and it verifies without issue on my Arduino Due but not the Yun.

Blink.ino:16:20: fatal error: malloc.h No such file or directory compilation terminated.
Error compiling.

Does the Yun not come with a malloc.h or is there some additional environmental setup I need specifically related to the Yun?

edit retag flag offensive close merge delete

Comments

I have not tried to compile AJTCL using the Arduino IDE (sketch model) specifically for the Yun. Perhaps the Yun doesn't need malloc.h at all. Try removing it and see if you get any undefined reference errors. If not I would go ahead and use that change locally. If this does turn out being the problem you can file a bug on ASA explaining that the Yun needs some #ifdefs around including malloc.h. Let me know if this solves the problem.

jprestwo ( 2015-02-17 13:19:44 -0800 )edit

you might try on the core mailing list. https://lists.allseenalliance.org/mailman/listinfo/allseen-core

ry.jones ( 2015-09-10 10:25:12 -0800 )edit