Page 1 of 1

error: conflicting types for ‘malloc’

Posted: Wed Dec 14, 2011 6:59 pm
by kr651129
The subject basically says it all, I'm compiling binutils 2.9.1 and when I configure it I get the following error and I have googled it and have found nothing

Code: Select all

../../binutils-2.8.1/binutils/../libiberty/cplus-dem.c: At top level:
../../binutils-2.8.1/binutils/../libiberty/cplus-dem.c:3039:8: error: conflicting types for ‘malloc’
../../binutils-2.8.1/binutils/../libiberty/cplus-dem.c:3040:8: warning: conflicting types for built-in function ‘realloc’ [enabled by default]
make[1]: *** [cplus-dem.o] Error 1
make[1]: Leaving directory `/usr/src/build-binutils/binutils'
make: *** [all-binutils] Error 2
thoughts?

Re: error: conflicting types for ‘malloc’

Posted: Wed Dec 14, 2011 7:21 pm
by gerryg400
The binutils version numbering scheme means that the version you are using 2.8 or 2.9 is very old. In the scheme 2.10 is newer than 2.9, and 2.22 is the newest. (I think)

Re: error: conflicting types for ‘malloc’

Posted: Thu Dec 15, 2011 3:04 am
by Love4Boobies
Heh, five new versions of the C standard have been finalized since that version of Binutils (C99, TC1, TC2, TC3, C1X).

Re: error: conflicting types for ‘malloc’

Posted: Fri Dec 16, 2011 9:00 am
by kr651129
Well, I'm an idiot, I was trying to build my cross compiler while I was at work because it takes a while for the make-all and I just wasn't paying attention because I was at work and downloaded the wrong versions lol. Thanks for the help :)