build fails on AIX(Undefined symbol: .rpl_malloc)

Bug #1321757 reported by Brent S Elmer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python-Crypto
New
Undecided
Unassigned

Bug Description

I get the following link error when building pycrypto on AIX with the xlc compiler:

ld: 0711-317 ERROR: Undefined symbol: .rpl_malloc

I fix the problem by commenting out the following line in src/config.h

/*#define malloc rpl_malloc*/

There should be some way in the configuration to detect this on AIX and comment it out.

Revision history for this message
Kevin Adler (zeke-t) wrote :

The problem is due to the AIX malloc() implementation returning a NULL pointer for an input size of 0 ie. malloc(0) -> NULL. You're supposed to write your own rpl_malloc, which ensures that rpl_malloc(0) does not return NULL, however on AIX you can just define _LINUX_SOURCE_COMPAT to get this behavior instead.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.