Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build GCC part 1 (stage: gcc_build) #3

Open
markcoker opened this issue Jul 11, 2016 · 9 comments
Open

Failed to build GCC part 1 (stage: gcc_build) #3

markcoker opened this issue Jul 11, 2016 · 9 comments

Comments

@markcoker
Copy link

I believe it is due to the following errors.

../../gcc-4.1.1/gcc/toplev.c:524:1: error: redefinition of a 'extern inline'
function 'floor_log2' is not supported in C99 mode
floor_log2 (unsigned HOST_WIDE_INT x)
../../gcc-4.1.1/gcc/toplev.c:559:1: error: redefinition of a 'extern inline'
function 'exact_log2' is not supported in C99 mode
exact_log2 (unsigned HOST_WIDE_INT x)

@nickpack
Copy link
Member

@markcoker Which OS are you building this on? Note that the project has been dead for years now - if this is a simple fix I'll have a look at it, but if its anything more significant its unlikely to be resolved.

@markcoker
Copy link
Author

No worries, thanks for your time. Im building it on macOS 10.12 ... I haven't tested it on linux yet (to be honest, I just used binaries gcc arm binaries, so this is more informal).

@Nick73
Copy link

Nick73 commented Nov 20, 2016

Same issue here on Ubuntu 16.04. I'd love to build Android for my iPod but this is the only thing stopping me

@nickpack
Copy link
Member

Had a brief look at this, and basically looks as if your system compiler toolchains are too new - https://gcc.gnu.org/ml/gcc-patches/2007-02/msg00119.html

I'll have to look into it a bit more, though I strongly suspect you're going to need to install older versions of gcc in order to be able to build this (Its highly unlikely that a patch to the code the toolchain script builds will ever surface)

@markcoker
Copy link
Author

Thanks for that information, what version is needed do you know 4.0?

@Nick73
Copy link

Nick73 commented Nov 22, 2016

I believe 4.1.1

@Nick73
Copy link

Nick73 commented Nov 25, 2016

../../gcc-4.1.1/gcc/toplev.c: At top level:
../../gcc-4.1.1/gcc/toplev.c:524:1: error: redefinition of ‘floor_log2’
 floor_log2 (unsigned HOST_WIDE_INT x)

../../gcc-4.1.1/gcc/toplev.c:559:1: error: redefinition of ‘exact_log2’
 exact_log2 (unsigned HOST_WIDE_INT x)

Which leaves this output:


Makefile:2060: recipe for target 'toplev.o' failed
make[1]: *** [toplev.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/nick/Desktop/toolchain/gcc-build/gcc'
Makefile:3905: recipe for target 'all-gcc' failed
make: *** [all-gcc] Error 2

Ubuntu 16.04

@ghost
Copy link

ghost commented Sep 4, 2017

Hey everyone, sorry for awaking this thread again...

However, I had the exact same issue, pain in the fucking ass.

I tried on a Ubuntu 12.04 VM, and it worked fine. No errors (except newlib, but that can be ignored).

@speck1234
Copy link

speck1234 commented Apr 15, 2018

Did you run the VM in Ubuntu itself, Mac OS or WIndows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants