gcc make error
Got fedora core 4 with gcc4 on my system at the moment. Need to install gcc 3.3.6
Have done the following:
# Download gcc-3.3.6.tar.gz to /tmp
# tar -xf gcc-3.3...
# cd gcc-3.3.....
# ./configure prefix=/usr/local (Runs ok)
# make (Get error message below)
"First, we highly recommend that GCC be built into a separate directory than the sources which does not reside within the source tree. This is how we generally build GCC; building where srcdir == objdir should still work, but doesn't get extensive testing; building where objdir is a subdirectory of srcdir is unsupported."
I suggest to read through the relevant sections in the LFS installatin documentation - this is almost ready for cut-and-paste and has worked for me every time
../gcc-3.3.6/configure ...and your options here...
maybe you should run "make bootstrap" instead of just "make"
Thanks for your feedback.
Earlier today I did the following;
# Downloaded gcc-3.3.6.tar to /tmp
# tar -xf gcc-3.3.6.tar
# mkdir /tmp/gcc-build
# cd /tmp/gcc-build
# ../configure --prefix=/usr/local/
Now I get the same error message as above, so I go into gcc-3.3.6/gcc/f and look at com.h and com.c at line 236 and 11080 as stated in the error message. I found that the return parameter in the header file was different than the return type used in the source file. So I change the file and did make again. The process went on for a while then I get this message:
Sorry if this seems strange now and I also might be wrong here, but:
Does'nt Fedora use prebuilt packages like .rpm or even .deb?
As far as I know, you don't usually compile your own programs there (even if you could), you just install prebuilt packages - would'nt that be the easy way?
Again - LFS (rather their excellent handbook on how to do it and why...)would be my reference for this if I had problems. Your error seems to stem from a part or the compiler you will probably never use anyway - from trying to build gjc - you should specify during configure, which compilers you want to build. For c and c++ this would be:
../configure --prefix=/usr/local/ --enable-languages=c,c++
LFS uses quite a few more options and they are explaining exactly why they are being used and not using them can lead to all sorts of problems later on or even during build...
Their recommended options are these:
Thanks for your input.
One question, by installing gcc via a rpm package would that overwrite my existing gcc 4.0 on the system? (How can I prevent that)
It will probably get installed alongside.
I don't know about how this is handeled on Fedora but typically it is possible to have multiple versions installed - its different between distributions how they handle which one is the "active" compiler - on Gentoo there is a tool gcc-config, which switches compiler-versions - it simply adjusts the paths to binaries and libraries...
Older versions of gcc on Fedora 4
The fedora 4 install disk comes with a couple of packages that actually will use older versions of gcc to build things. I've seen on a couple of other sites that GCC version 4 is too strict, so I tried to install gcc 3.3.6 and it wouldn't compile (I think, again, because 4.0.2 is too strict). After some browsing I found this:
(linuxquestions.org won't let me insert hyperlinks because I don't post here often).
Essentially, installing the packages compat-gcc-32 and compat-gcc-32-c++ will give you the commands gcc32 and g++32. These are gcc version 3.2.3.
I currently have installed:
These are all from the fedora 4 install disks. That seems to resolve some issues with what I'm trying to do.
The thing about these is that they actually use different commands for the old versions of gcc. Using gcc -V 3.2.3 doesn't work. You actually have to type the commands gcc32 or g++32. Try ./configure --help in the directory where you're trying to build something to see how to get the configure script to use a different command.
|All times are GMT -5. The time now is 05:05 AM.|