Friday, April 21, 2006

error: attempt to use poisoned "realloc"

Today I tried to compile ITK 2.2 on my machine again and ran into the "poisoned" error. A quick research on the internet recovered that this is caused by the gcc people having replaced realloc with something like xrealloc(the same applies to malloc).

Naively I tried to just replace both words in all the .c files:

find . -name "*.c*" | xargs perl -pi -e 's/realloc/xrealloc/g'
find . -name "*.c*" | xargs perl -pi -e 's/malloc/xmalloc/g'

But that didn't work at all and caused even more errors. I ended up with downloading a new version of CableSwig from the net and because I am still compiling keep your fingers crossed...


Post a Comment

<< Home