LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Multiple gcc versions? (https://www.linuxquestions.org/questions/linux-server-73/multiple-gcc-versions-691302/)

Zeno McDohl 12-17-2008 03:16 PM

Multiple gcc versions?
 
I have gcc 4.2.3 installed normally. Then I have the exec of gcc 3.3.6 named gcc-3.3.6 in the same dir as the gcc exec. What else do I need to do to ensure the older exec will work? Because it doesn't seem like it does right now, gives me this:
Quote:

gcc-3.3.6: installation problem, cannot exec `cc1': No such file or directory

knudfl 12-18-2008 09:02 AM

gcc-3.3.6 usualy comes together with g77 and/or f77, they will
probably be used sometimes, gcc-3.3.6 may be not so usefull.
And why use it at all ?

Having 3, e.g gcc-4.2.3, gcc-4.1.2 and 4.3.1 is no problem.
Can be called with 'CC=gcc-4.x.x command ... '
or / and 'CXX=g++-4.x.x command ... '
....

Zeno McDohl 12-18-2008 10:19 AM

Quote:

gcc-3.3.6 may be useless and
why use it at all ?
Because various users can no longer compile their MUD or are getting memory corruption and would like to use the gcc version I originally had.

knudfl 12-18-2008 12:23 PM

Sorry, my failure : There is no gcc-3.3.6 in my Slackware 12.1
( For some other Linux's something like that is installed
together with the old g77 )

Do you know, where gcc-3.3.6 (/usr/bin/gcc-3.3.6 ?) came from ?

Try ' grep gcc-3.3 /var/log/packages/* ' to find the package.

( I doubt, the 3.3.6 from slack 10.2 will work in 12.1 )
....

Zeno McDohl 12-18-2008 12:41 PM

Quote:

Do you know, where gcc-3.3.6 (/usr/bin/gcc-3.3.6 ?) came from ?
When I installed Slackware, it came with it.

I am using Slackware 10.2.0

knudfl 12-18-2008 02:09 PM

OK, I remember software, which couldn't find 'cc1'

# 'ln -s /usr/lib/gcc-lib/i486-slackware-linux/3.3.6/cc1 \
/usr/local/bin'
will work in some occasions.
But better delete it after use, may confuse things
with the other compiler.
....
And by the way, gcc-4.2.3 indicates Slackware 12.1
....

Zeno McDohl 12-19-2008 09:44 AM

Quote:

But better delete it after use, may confuse things
with the other compiler.
It's going to be used forever...

Quote:

And by the way, gcc-4.2.3 indicates Slackware 12.1
I upgraded gcc recently.

The only thing in /usr/lib/gcc-lib/i486-slackware-linux/3.3.6 is f771 and include

Zeno McDohl 12-29-2008 03:10 PM

I have tried building the old gcc source to install in a different dir, and I get this error:
Code:

# gcc -c -g -O2      -gnatpg -gnata -I- -I. -Iada -I./ada ada/ada.ads -o ada/ada.o
# gcc -c -g -O2      -gnatpg -gnata -I- -I. -Iada -I./ada ada/a-charac.ads -o ada/a-charac.o
# a-charac.ads:16:01: (style) multiple blank lines
# make[1]: *** [ada/a-charac.o] Error 1
# make[1]: Leaving directory `/root/oldgcc/gcc-3.3.6/gcc'
# make: *** [all-gcc] Error 2


knudfl 12-30-2008 12:34 AM

Are you building gcc-3.3.6 with CC=gcc-3.3.6 ??

The gcc people recommends the method from LFS
to be used for building gcc.
Please use a build directory outside gcc-X.x

LFS 4 chapter 5, pass 1
http://lfs.sourceforge.net/view/4.0/chapter05/gcc.html
chapter 6, pass 2
http://lfs.sourceforge.net/view/4.0/chapter06/gcc.html

LFS 6.3 http://www.linuxfromscratch.org/lfs/view/6.3/
....

Zeno McDohl 01-07-2009 11:41 AM

I didn't specify anything like that CC=3.3.6, no.

Where would I do that? There is nothing simple like CC=4.4.2 in the Makefile.

knudfl 01-08-2009 01:38 AM

The configure script, often present in a source code
package will write your argument " CC= " into the
Makefile, when it is done like this 'CC=gcc-3.3.6 ./configure'

If there is no "configure" , make should take this
argument : 'CC=gcc-3.3.6 make'

The expression 'gcc-3.3.6' must be spelled exactly
as you have it in /usr/bin/ ( and not " =3.3.6 " )

More examples # 5
http://www.linuxquestions.org/questi...-lenny-694054/
....

Zeno McDohl 01-08-2009 10:19 AM

I am confused. So I should be compiling with gcc-3.3.6? Because if my first post I mentioned it does not work. I am missing something?

knudfl 01-09-2009 03:15 AM

gcc-3.3.6 , # 1
Quote:

What else do I need to do to ensure the older exec will work?
Sorry, I thought, the issue was 3.3.6 .
So what is the real question ??
....

Zeno McDohl 01-09-2009 09:49 AM

The issue is 3.3.6 as I said it does not work:
Quote:

gcc-3.3.6: installation problem, cannot exec `cc1': No such file or directory
I have gcc 4.2.3 installed and working.

I need gcc 3.3.6 installed and working as well.

knudfl 01-09-2009 11:12 AM

.
Did you try with a link to /usr/local/bin/ ?

If cc1 is present in
/usr/lib/gcc-lib/i486-slackware-linux/3.3.6/ ?

Which software is complaining ?
....


All times are GMT -5. The time now is 09:46 PM.