Bug 2104 - C++ compilation doesn't work following installation of relevant packages
Summary: C++ compilation doesn't work following installation of relevant packages
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: egcs
Version: 5.2
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-04-10 01:47 UTC by jao
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-04-12 14:45:06 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.