Error building GCC

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
0xDani
Posts: 3
Joined: Wed May 22, 2013 8:22 am

Error building GCC

Post by 0xDani »

Hello!

/* Sorry for my english, it isn't my native language */

I'm following this wiki article in order to build GCC 4.6.1, enabling C and C++, but in this step:

Code: Select all

make all-gcc
the compiler throws me some errors:
gcc -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6.1/gcc -I../../gcc-4.6.1/gcc/. -I../../gcc-4.6.1/gcc/../include -I../../gcc-4.6.1/gcc/../libcpp/include -I../../gcc-4.6.1/gcc/../libdecnumber -I../../gcc-4.6.1/gcc/../libdecnumber/dpd -I../libdecnumber gtype-desc.c -o gtype-desc.o
gtype-desc.c:8868:18: error: el valor del subíndice no es ni matriz ni puntero ni vector
gtype-desc.c:8987:36: error: el valor del subíndice no es ni matriz ni puntero ni vector
gtype-desc.c:9071:31: error: el valor del subíndice no es ni matriz ni puntero ni vector
gtype-desc.c:9092:31: error: el valor del subíndice no es ni matriz ni puntero ni vector
gtype-desc.c:9099:31: error: el valor del subíndice no es ni matriz ni puntero ni vector
gtype-desc.c:9106:31: error: el valor del subíndice no es ni matriz ni puntero ni vector
As you can see, error messages are in Spanish (sorry), here is my translation, that might be incorrect:
error: index value is neither a matrix nor a pointer nor a vector
I actually know C programming, but I'm not gonna get through the whole code to try to fix it.

Could you help me?
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: Error building GCC

Post by jnc100 »

Its a known issue.

Basically, use the patch there or a more modern version of gcc.

Regards,
John.
0xDani
Posts: 3
Joined: Wed May 22, 2013 8:22 am

Re: Error building GCC

Post by 0xDani »

Thanks for the help! I'll download a newer version of GCC.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: Error building GCC

Post by sortie »

Set the LC_ALL=C environmental variable and build your gcc with --disable-nls to be sure to have english error messages. If you don't put in some effort so we have proper error messages, it's harder for us to help you and it'll be be harder to get help.

But yeah, there was a few minor releases of gcc that didn't bootstrap correctly with newer gcc versions, but the later patched versions fixed the problems.
0xDani
Posts: 3
Joined: Wed May 22, 2013 8:22 am

Re: Error building GCC

Post by 0xDani »

Yes, I've built gcc and g++ with --disable-nls in order to get errors in english, as it was recommended in the wiki.

Finally I downloaded the 4.7.0 version and could build it succesfully.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: Error building GCC

Post by sortie »

I recommend you use the newest minor version of every major release. For instance, if you wish to use the gcc 4.7.x series, I recommend you use gcc 4.7.3. I normally recommend you use the newest compiler. I just updated the cross-compiler tutorial (http://wiki.osdev.org/GCC_Cross-Compiler) heavily, and added a tutorial if you wish to update your system compiler (http://wiki.osdev.org/Building_GCC).
Post Reply