This is the mail archive of the
mailing list for the GCC project.
Re: error installing previous gcc version
- From: Brian Dessent <brian at dessent dot net>
- To: D'arito <espasapalau at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 22 Nov 2007 20:21:01 -0800
- Subject: Re: error installing previous gcc version
- References: <email@example.com>
- Reply-to: gcc-help at gcc dot gnu dot org
> I've achieved to run the configure script in a gcc-build directory, but I
> got an error withing the make. :
> ../../gcc-3.3.3/gcc/read-rtl.c: In function â??read_rtxâ??:
> ../../gcc-3.3.3/gcc/read-rtl.c:653: error: invalid lvalue in increment
> make: *** [read-rtl.o] Error 1
> make: Leaving directory `/opt/gcc3/gcc-build/gcc'
> make: *** [all-gcc] Error 2
The reason this won't compile is that the 3.3 code used a nonstandard
language extension here (lvalue cast) that was deprecated in 3.4 and
then removed in 4.0.
You run into these general sorts of problems when trying to compile
older code with a newer gcc, because gcc tends to get more strict about
rejecting invalid code over time rather than more permissive.
The solution is that you need to build an intermediate version (most
likely 3.4.x) and then use that to build your desired 3.3.3 version.
If you want a shortcut you can try applying the obstack.h changes from
this patch: <http://gcc.gnu.org/viewcvs?view=rev&revision=72826>. But
beware that there are almost certainly other incompatibilities lurking
in the gcc code base so using an intermediate version is always the
generally correct solution.