[Trilinos-Users] Workaround for odd bug involving /usr/include/c++/4.0.0/cstdlib:110: error: '::malloc' has not been declared on OS X.4 Mac Pro

Aron Ahmadia aja2111 at columbia.edu
Fri Nov 17 19:02:45 MST 2006

Dear all,

I've encountered a strange bug in building the Trilinos packages on my
machine.  I have not yet tracked down the source of the bug, I am as likely
to blame it on a compiler misconfiguration or a broken set of system
includes as the Trilinos package, which is why I have not yet submitted it
as a bug report.

Regardless, the error is preventing a build of the triutils package, and
shows up as this:

/usr/include/c++/4.0.0/cstdlib:110: error: '::malloc' has not been declared

The only thing in my knowledge that could cause this is if the function
malloc is not in global scope.  This would mean that the previous definition
of malloc in stdlib.h did not occur for one reason or another.

A quick workaround for this problem is to add the following directive to

#include <memory>

Prior to

#include <cstdlib>

More later.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20061117/2dedc36d/attachment.html

More information about the Trilinos-Users mailing list