[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#637218: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory

Sedat Dilek wrote:

> ANYWAY, these workarounds should not be necessary, it should work OOTB.
> Not sure, what's wrong.

Well, some files have moved, and GCC does not know about their new
locations yet.  There are two ways to cope with that:

 A. Patch GCC to learn the new state of the world.  The patches in
    Debian's gcc packaging with names debian/patches/gcc-multiarch-* 
    accomplish that, as you presumably know.  The world will be a
    better place when they go upstream.

 B. Tell GCC at runtime to look in the right place.

Of course (A) works.  The gcc-snapshot packaging does exactly that.

Meanwhile I am happy to know that (B) also works, since it is
something that is likely to apply with little effort to other
compilers, too (i.e., no need to deeply understand the compiler
source).  This is advertised to work, and I don't consider it a
workaround.  As we have seen, gcc's build process doesn't make it easy
to add flags during bootstrap; thanks for helping find the problems
there, so they can be fixed!  (This should make it easier to apply
other flags to a gcc build in the future, too.)

When (B) works, using a non-multiarch-aware compiler becomes as simple
as putting a few wrappers like

	exec $HOME/opt/gcc/bin/ld -B/usr/lib/i386-linux-gnu "$@"

	exec $HOME/opt/gcc/bin/gcc -B/usr/lib/i386-linux-gnu \
		-I/usr/include/i386-linux-gnu "$@"

on the $PATH.

Hope that explains a little.

Reply to: