On Wed, Mar 22, 2006 at 04:10:32PM +0100, Christian E. Boehme wrote: > The actual problem, however, lies in the path resolution algorithm for > standard headers. For whatever reason, the frontend > (/usr/lib/gcc/powerpc-linux-gnu/4.0.3/cc1plus) looks for headers under > /usr/lib/gcc/powerpc-linux-gnu/4.0.3/../../../../include/c++/4.0.3 > which is as wrong as can be: that assumption ignores the possibility > that /usr/lib might indeed be a link to some other location outside > the /usr tree (which is the case over here). Consequently, a > ``cd ../../../..'' from /usr/lib/gcc/powerpc-linux-gnu/4.0.3 does _not_ > arrive at /usr. /usr/lib/gcc/powerpc-linux-gnu/3.4.6/cc1plus does not > show this behaviour, BTW.
Ok, this is pretty much an unsupported configuration in Debian. Debian policy assumes, for instance, that any symlinks within a single top-level directory can be made relative symlinks: e.g., /usr/include/X11 -> /usr/X11R6/include/X11. If your /usr data doesn't fit on a single partition, I strongly recommend using bind mounts instead of symlinks (supported in 2.4 and 2.6 Linux kernels). > You (as in distributor) can solve that problem with using > ``--with-gxx-include-dir=/usr/include/c++/4.0'' during configuration > as was done with g++-3.4 or tell the GCC people to change their mind > about their path resolution policy. Now that I understand the nature of the bug you're describing, I agree that it's a bug and probably should be fixed (though that's left up to the package maintainer, not me). It's just not one that anyone else is likely to trip over. > > Er, I'm not surprised that trying to invoke g++-4.0 as "g++ -V 3.4" doesn't > > work completely. If I run this command, I get link errors as well; if I run > > g++-3.4 -Wall simple.c++ -o simple, the program builds and runs fine. > > Hmm. Wasn't the ``-V'' option specifically introduced for purposes that > require a specific compiler version (it's even documented here: > http://gcc.gnu.org/onlinedocs/gcc-4.0.3/gcc/Target-Options.html) ? I have no idea; I'm just not surprised that the various bits of the compiler aren't truly interchangeable. Cheers, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. [EMAIL PROTECTED] http://www.debian.org/
signature.asc
Description: Digital signature