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.
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)
i believe i covered everything ...
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.
Update to gcc-config-1.3.1, and it should work by just doing 'su'.