GCC install problem?

GCC install problem?

Post by Martin Filtenbor » Sun, 03 Jan 1999 04:00:00



Hmmm...

Runnin' RH5.1 on an AMD K6/233;
Installed right out of the box!
Executing "gcc hello.cc", my installation responds:
gcc: installation problem, cannot exec 'cc1plus': No such file or
directory

If I change the code to C, and the filename to "hello.c", it compiles to
an a.out, so this works fine.

Any good ideas?

My guess is that the Path needs to be extended somehow, only I can't
figure out what the extension should be...


 
 
 

GCC install problem?

Post by Robert Wues » Mon, 04 Jan 1999 04:00:00



> Hmmm...

> Runnin' RH5.1 on an AMD K6/233;
> Installed right out of the box!
> Executing "gcc hello.cc", my installation responds:
> gcc: installation problem, cannot exec 'cc1plus': No such file or
> directory

> If I change the code to C, and the filename to "hello.c", it compiles to
> an a.out, so this works fine.

> Any good ideas?

> My guess is that the Path needs to be extended somehow, only I can't
> figure out what the extension should be...



This one got me earlier today: I was bummin' about what I could have
done to break things when they were working so well before :-).

So, after a minute of panic, and another scratching my head ('cause
Linux systems don't just break like that normally), I realized that
Redhat installs gcc-2.7.2.3 as the c compiler and egcs as the c++
compiler (so you can build kernels which still require gcc-2.7.2.3).

When you run gcc file.cc, you're telling gcc-2.7.2.3 to try and run the
c++ compiler that is not installed (you found that out real quick).  The
solution is to explicitly use the command `g++', not `gcc' to compile
c++ files.

Robert

 
 
 

GCC install problem?

Post by Michael Meissne » Mon, 04 Jan 1999 04:00:00



> Hmmm...

> Runnin' RH5.1 on an AMD K6/233;
> Installed right out of the box!
> Executing "gcc hello.cc", my installation responds:
> gcc: installation problem, cannot exec 'cc1plus': No such file or
> directory

> If I change the code to C, and the filename to "hello.c", it compiles to
> an a.out, so this works fine.

RedHat ships two versions of GCC (2.7.2.3 and EGCS 1.0.3--).  GCC 2.7.2.3 is
fairly ancient (about 3 years old).  RedHat doesn't ship the C++ that went with
that version of GCC (the C++ language has changed much since then).  The EGCS
release is much newer (1.1.1 is the current release, 1.0.3 is about 4-6 months
old), and includes an up to date version of C++.  However, because GCC 2.7.2.3
is installed as /usr/bin/gcc, they installed it as /usr/bin/egcs instead.  This
BTW is all documented in the RedHat documentation (at least it was for RedHat
5.2).  So, assuming you loaded the egcs release, you just have to do:

        egcs ...  foo.cc

instead of:

        gcc ... foo.cc

or you could do:

        g++ ... foo.cc

(using g++ includes the standard C++ libraries, wheras calling egcs/gcc means
you don't get the g++ libraries without adding them on the command line).

As to why ship two versions of GCC -- the 2.0.xx kernel doesn't build with EGCS
(the 2.1.xx and 2.2.0-prex kernels do build with EGCS) due to problems with asm
statements.

--
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA

 
 
 

GCC install problem?

Post by James Youngma » Mon, 04 Jan 1999 04:00:00



> Hmmm...

> Runnin' RH5.1 on an AMD K6/233;
> Installed right out of the box!
> Executing "gcc hello.cc", my installation responds:
> gcc: installation problem, cannot exec 'cc1plus': No such file or
> directory

RH 5.1's "gcc" is GCC 2.7.x, compiled withoug C++ support.  Use RH
5/1's EGCS compiler to compile C++; the name of the C++ compiler is
"c++" or "g++", not "gcc".

--

 
 
 

GCC install problem?

Post by Lester Memmot » Thu, 10 Jun 1999 04:00:00


I'm using RedHat 5.2 and found that the install doesn't put cc1plus (from
egcs) in the path.  I corrected it by putting a link in /usr/bin to the
actual file:
ln -s /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29/cc1plus
/usr/bin/cc1plus

You can use "find / -name cc1plus" to see where cc1plus resides on your
system if it has been installed.  If you run this as root you get fewer
error messages since root can recurs through all directories.

Once you do this gcc should be able to call cc1plus (from egcs) with no
problems.

Hope this helps,
lm


> Hmmm...

> Runnin' RH5.1 on an AMD K6/233;
> Installed right out of the box!
> Executing "gcc hello.cc", my installation responds:
> gcc: installation problem, cannot exec 'cc1plus': No such file or
> directory

> If I change the code to C, and the filename to "hello.c", it compiles to
> an a.out, so this works fine.

> Any good ideas?

> My guess is that the Path needs to be extended somehow, only I can't
> figure out what the extension should be...



------------------  Posted via SearchLinux  ------------------
                  http://www.searchlinux.com
 
 
 

GCC install problem?

Post by Paul Kimo » Thu, 10 Jun 1999 04:00:00


[Spurious ^M's removed.  Why does searchlinux.com afflict us with them?]

Quote:> I'm using RedHat 5.2 and found that the install doesn't put cc1plus (from
> egcs) in the path.  I corrected it by putting a link in /usr/bin to the
> actual file:

You are not supposed to have cc1plus (or cc1, for that matter) in your
path.  It is supposed to be buried somewhere in /usr/lib/gcc-lib and
called by the appropriate front end (e.g., g++).

--

 
 
 

1. gcc install problems

I am trying to configure gcc-2.7.2 under Solaris2.4 and am having a problem.
I keep getting an error that says,

/usr/ucb/cc: /language optional software package not installed.

I installed Solaris 2.4 right off the cdrom and added the patches. What am
I missing that is preventing me from getting gcc going?

Paul

2. No boot after update

3. GCC Install Problem

4. setjmp.h

5. gcc install problem

6. Using VME device?

7. Question, does Linux support WD8003E?

8. GCC Install problems

9. gcc install problem on solaris 8 sparc

10. HOWTO build/install GCC 3.1 from SRPM w/o replacing GCC 2.96 ?

11. How can I completely replace gcc installed by default with new gcc-3.2?

12. Install gcc without gcc