LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-17-2008, 03:16 PM   #1
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Rep: Reputation: 30
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
 
Old 12-18-2008, 09:02 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,624

Rep: Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528
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 ... '
....

Last edited by knudfl; 12-18-2008 at 12:04 PM.
 
Old 12-18-2008, 10:19 AM   #3
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
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.
 
Old 12-18-2008, 12:23 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,624

Rep: Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528
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 )
....
 
Old 12-18-2008, 12:41 PM   #5
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
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
 
Old 12-18-2008, 02:09 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,624

Rep: Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528
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
....

Last edited by knudfl; 12-18-2008 at 02:14 PM.
 
Old 12-19-2008, 09:44 AM   #7
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
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
 
Old 12-29-2008, 03:10 PM   #8
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
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
 
Old 12-30-2008, 12:34 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,624

Rep: Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528
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/
....
 
Old 01-07-2009, 11:41 AM   #10
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
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.
 
Old 01-08-2009, 01:38 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,624

Rep: Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528
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/
....

Last edited by knudfl; 01-08-2009 at 07:40 AM.
 
Old 01-08-2009, 10:19 AM   #12
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
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?
 
Old 01-09-2009, 03:15 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,624

Rep: Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528
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 ??
....
 
Old 01-09-2009, 09:49 AM   #14
Zeno McDohl
Member
 
Registered: Apr 2005
Location: Saratoga, NY
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 30
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.
 
Old 01-09-2009, 11:12 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,624

Rep: Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528Reputation: 2528
.
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 ?
....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having multiple versions of GCC Rostfrei Programming 4 11-21-2007 01:10 AM
include path for multiple versions of gcc hydrogeek Linux - General 5 11-18-2007 02:08 PM
Multiple versions of GCC Denisius Slackware 11 11-15-2007 07:39 AM
multiple versions of gcc Avatar33 Linux - General 3 02-22-2005 02:06 PM
multiple gcc versions and selectability tincat2 Linux - Software 1 06-08-2003 02:38 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration