gcc/C++ problems in RedHat 5.1

gcc/C++ problems in RedHat 5.1

Post by Nicklas Sandgre » Mon, 13 Jul 1998 04:00:00



I cannot compile C++ sources with gcc. gcc complains about not
finding cc1plus.

Yes, I have installed egcs-2.90.27. cc1plus exists in
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/

I've just made a complete ftp installation of Redhat 5.1 (i386)
so there shouldn't be any problems one could think.

Anyone got a clue?

//Nicklas

 
 
 

gcc/C++ problems in RedHat 5.1

Post by Nicklas Sandgre » Mon, 13 Jul 1998 04:00:00



> Are you calling it with gcc? I think with egcs you have to use g++ as
> the calling program, not gcc.

Yes, I usually do so. In my previous Linux installation (Redhat 4.2) it
worked just fine.

Is there a point in removing that feature from gcc?

//Nicklas

 
 
 

gcc/C++ problems in RedHat 5.1

Post by Tom Easte » Tue, 14 Jul 1998 04:00:00



> I cannot compile C++ sources with gcc. gcc complains about not
> finding cc1plus.

> Yes, I have installed egcs-2.90.27. cc1plus exists in
> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/

> I've just made a complete ftp installation of Redhat 5.1 (i386)
> so there shouldn't be any problems one could think.

> Anyone got a clue?

> //Nicklas

It appears that if you want to compile c++ sources under RH5.1, you need
to use g++.  Also, if you want to compile QT and KDE, you have to fiddle
a bit. I ended up doing the following:

   cd /usr/bin
   mv gcc gcc.save
   ln -s egcs gcc

Compile QT and the various KDE packages.

   cd /usr/bin
   mv gcc.save gcc

--
Tom Eastep      Tandem Division of COMPAQ

 
 
 

gcc/C++ problems in RedHat 5.1

Post by Michael Meissne » Tue, 14 Jul 1998 04:00:00



> > Are you calling it with gcc? I think with egcs you have to use g++ as
> > the calling program, not gcc.

> Yes, I usually do so. In my previous Linux installation (Redhat 4.2) it
> worked just fine.

> Is there a point in removing that feature from gcc?

I believe if you read the friendly RedHat documentation, it says right up in
the front, that /usr/bin/gcc will call the older 2.7.2.3 compiler, and that if
you use /usr/bin/egcs compiler it will use the egcs-2.90.27 980315 (egcs-1.0.2
release) version, and that if you want to compile C++ or Fortran code, you must
use an egcs compiler (ie, either use the g++ version of the driver, or use
egcs).

The reason why /usr/bin/gcc is not egcs based, is because the 2.0.xx kernels
will not build with egcs (the failure I'm most familar with is ioport.c which
has invalid asm constraints that 2.7.xx generated mostly correct code, but the
egcs compilers don't).  The maintainers of 2.0.xx kernels have stated that they
won't be fixing this in the near term.  The 2.1.xx development kernels build
quite well with egcs (and the fsf 2.8.1 compiler, but that is buggier than
egcs).

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

 
 
 

gcc/C++ problems in RedHat 5.1

Post by Patrick Bau » Thu, 16 Jul 1998 04:00:00


Maybe in /etc/profile... add a line...

CC=egcs
export CC

And after u do this... as root... source /etc/profile
to make the changes take effect...

What this does... is that whenever u compile some sources...
the compile will now default to egcs..

Pat.



Quote:> I cannot compile C++ sources with gcc. gcc complains about not
> finding cc1plus.

 
 
 

1. Redhat 5.1, gcc problem.

Hi,
after install redhat 5.1,  I am having problems getting the gcc or the
egcs compiler working.

I'm running a configuration (bash 2.0)
./configure --host=i586-unknown-linux-gnu
which has the following error messages to the screen:

------------

loading cache ./config.cache
checking host system type... i586-unknown-linux-gnu
Beginning configuration for bash-2.02 for i586-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.
------------
when I view the log file (config.log), I see:
running configure, to aid debugging if configure makes a mistake.
------------
configure:695: checking host system type
configure:1124: checking for gcc
configure:1201: checking whether the C compiler (gcc  ) works
configure:1215: gcc -o conftest    conftest.c  1>&5
ld: cannot open crt1.o: No such file or directory
configure: failed program was:
#line 1211 "configure"
#include "confdefs.h"
main(){return(0);}
-------------
the object file crtl.o is not to be found on the system. Presumeably it
is in a library.
my ld.so.conf file is looks like:
/usr/X11R6/lib
/usr/lib
/usr/local/lib
/usr/i486-linux-libc5/lib
--------------
What am I missing

Thanks for any help

Steven Howe

2. Need Help with disks and scsi devices

3. RH 5.1 and egcs/gcc/c++

4. sendmail [Fwd: Masquerading my outgoing mail]

5. c++ and RedHat Linux 5.1

6. Chris FAJ

7. Delay for remote connections.

8. Sun forte C++ 5.1 vs C++ 4.2

9. RedHat 5.1 - GCC internal compiler errors

10. segmentation faults with large static arrays using gcc under RedHat 5.1

11. GCC works, but not G++ on newly installed RedHat 5.1 installation?

12. gcc 2.7.2 on Redhat 5.1