Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 2104

Summary: C++ compilation doesn't work following installation of relevant packages
Product: [Retired] Red Hat Linux Reporter: jao
Component: egcsAssignee: David Lawrence <dkl>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-04-12 14:45:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description jao 1999-04-10 01:47:55 UTC
I believe there is a bug in your setup of the C++ part of
gcc.

I just did a custom install of Red Hat 5.2, and selected for
installation all packages pertaining to C and
C++ development.

gcc worked when compiling .c files. However, when compiling
.cc files, there was an error message, indicating that
cc1plus could not be found. cc1plus and related executables
are in /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29, but
they aren't on the default PATH, nor are there any links to
them on PATH. I fixed this by setting up some links in
/usr/local/bin:

[jao@zack jao]$ ls -l /usr/local/bin
total 0
lrwxrwxrwx   1 root     root           51 Apr  9 03:21 cc1
-> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29/cc1
lrwxrwxrwx   1 root     root           55 Apr  9 03:23
cc1plus ->
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29/cc1plus
lrwxrwxrwx   1 root     root           51 Apr  9 03:21 cpp
-> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.29/cpp


Being new to Linux, I'm not sure this is the best solution,
but it seems to work.

I think you should fix your egcs-c++ installation to ensure
that these executables are reachable from /usr/bin or
/usr/local/bin.

I'd also appreciate it if you could let me know if my fix is
correct, or if there is something else more consistent with
FSSTND. Thanks.

Jack Orenstein

Comment 1 Chris Siebenmann 1999-04-10 03:39:59 UTC
This appears to be an interesting consequence of RedHat 5.2's
C++ compiler being egcs but the default 'gcc' being gcc-2.7.2.3.
'c++ -c foo.cc' and 'egcs -c foo.cc' both work, but 'gcc -c foo.cc'
bombs out with this error, presumably because it's trying to use
the 2.7.2.3 C++ compiler (not installed).

Comment 2 Bill Nottingham 1999-04-12 14:45:59 UTC
You should not be using gcc for c++; use egcs/c++ instead.