build fails on AIX(Undefined symbol: .rpl_malloc)
Bug #1321757 reported by
Brent S Elmer
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.
To post a comment you must log in.
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.