Altera_Forum
Honored Contributor
14 years agoToolchain compile problems on RHEL 6.3
I am having some problems compiling the Nios2 toolchain on RHEL 6.3 64bit and need some advice. In a nutshell, the gcc3 build in the tool chain produces a segmentation fault during the compile.
Because I went to a lot of trouble getting Quartus and Eclipse/Nios2 working on RHEL 6.3 64 I hesitate to use another version. Also, once it works I can help others get it working, share the Parallels VM instance, etc. The main question is whether it is better to work on getting the toolchain to compile with the version of gcc on RHEL 6.3, which is gcc-4.4.6-4.el6.x86_64, try to work around the segmentation fault, just report a gcc bug and wait for help, or is the only practical approach to take the easy way out and use an existing VM. From my point of view, the best solution would seem to be to get the tool chain to build with gcc4 and completely sidestep the problem. However, having not worked on linux for the last 10 years, getting back up to speed might be painful. --------------- Gory Details --------------- Note, these are related to gcc3. I put them here so it is clear the nature of the obstacle. I don't expect anyone in this forum to try to solve a problem compiling gcc3. Note that bison can't process c-parse.y in gcc3. For example: structsp_attr: struct_head identifier '{' { start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } component_decl_list '}' maybe_attribute { $$ = finish_struct ($<ttype>4, nreverse ($5), chainon ($1, $7)); } processes, but structsp_attr: struct_head identifier '{' { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } component_decl_list '}' maybe_attribute { $$ = finish_struct ($<ttype>4, nreverse ($5), chainon ($1, $7)); } does not. I had to remove the "$$ = " on the third line. I am not a bison expert, so I can't say if this works, as I have not be able to compile gcc3 yet, due to the segmentation fault. The fault results: In file included from /home/mike/Embedded/Altera/nios2-linux/toolchain-build/build/sysroot//usr/include/bits/pthreadtypes.h:23, from /home/mike/Embedded/Altera/nios2-linux/toolchain-build/build/sysroot//usr/include/bits/types.h:206, from /home/mike/Embedded/Altera/nios2-linux/toolchain-build/build/sysroot//usr/include/stdio.h:36, from /home/mike/Embedded/Altera/nios2-linux/toolchain-build/../gcc3/gcc/tsystem.h:79, from /home/mike/Embedded/Altera/nios2-linux/toolchain-build/../gcc3/gcc/crtstuff.c:62: /home/mike/Embedded/Altera/nios2-linux/toolchain-build/build/sysroot//usr/include/bits/sched.h:94: internal compiler error: Segmentation fault Please submit a full bug report, This will give you the nature of the error, which is not a nios2 specific issue.