Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 13938 - [gcc-3.2.1-r6] major problems with g++
Summary: [gcc-3.2.1-r6] major problems with g++
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All All
: High critical (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-14 16:52 UTC by Artur Brodowski
Modified: 2003-01-21 11:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artur Brodowski 2003-01-14 16:52:08 UTC
i've upgraded gcc latetly to _supposed_to_be_stable_ 3.2.1-r6. well, it needs
fixing.

1. i'm having a problem with compiling any of c++ stuff, headers are
not seen by g++ (little example that should just print "hello gentoo" on
the console):

bzd@tool test $ g++ test_iostream.cpp 
proj23.cpp: In function `int main()':
proj23.cpp:10: `cout' undeclared (first use this function)
...and so on, iostream isn't recognized.

bzd@tool test $ locate iostream
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include/g++-v3/backward/iostream.h
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include/g++-v3/iostream
/usr/share/doc/gcc-3.2.1-r6/i686-pc-linux-gnu/libstdc++-v3/html/27_io/binary_iostreams_kanze.txt
/usr/share/doc/gcc-3.2.1-r6/i686-pc-linux-gnu/libstdc++-v3/html/27_io/binary_iostreams_kuehl.txt

root@tool test # gcc-config --print-environ
export PATH="/usr/i686-pc-linux-gnu/gcc-bin/3.2:/sbin:/bin:/usr/sbin:/usr/bin"
export CC="gcc"
export CXX="g++"
root@tool test # gcc-config --get-stdcxx-incdir
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include/g++-v3

should work, but it does not :(
quite interesting that things in portage compile just fine.

2. second issue is that after su g++ is not seen by the system, looks like
env-update is not run at all, so i have to env-update/source etc-profile 
manually every time. even then, g++ include path is somehow broken (still
can't find headers)

i thought all that could be gcc-config fault, i remerged it and set up
environment again, it did not help.
please do something.
Comment 1 SpanKY gentoo-dev 2003-01-15 11:58:04 UTC
1. this is invalid, read http://gcc.gnu.org/bugs.html for the exact explanation why (the short is 
that you didnt utilize the line 'using namespace std;' or 'std::cout') 
if g++ *really* failed to find the headers you would have seen this: 
test.cpp:1:24: iostreamfdsa: No such file or directory 
 
2. this isnt *really* a bug, but some consider it so because it is the behavior they expected.  
run `su -` instead of just `su` ... i believe many distro's patch su to reflect this behavior by 
default, Gentoo does not (azarah, feel free to correct me) 
Comment 2 SpanKY gentoo-dev 2003-01-15 11:59:56 UTC
i believe i covered everything ... 
Comment 3 Chris Bruner 2003-01-20 22:49:52 UTC
So your saying that just doing su and then emerging won't compile gcc. You have 
to su - to get the whole root environment in order to compile gcc.  
 
This unexpected behaviour may not be a bug, but it sure bugs me. (about 4 hours 
worth). Isn't there a way to detect if the environment is set, (besides gcc not 
compiling)? Then at least it could die quickly with a usable error message. 
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-21 11:52:08 UTC
Update to gcc-config-1.3.1, and it should work by just doing 'su'.