On Tuesday 25 October 2005 01:47, Andy wrote:
> Hi Paolo, thanks for your reply!

> > But the solution is easy: clean your kernel tree and start over, adding
> > to all
> > commands SUBARCH=i386. On a recent enough kernel (and 2.6.13.4 is surely
> > recent enough) this will produce a 32-bit fully working executable, which
> > will run your 32bit root FS.

> OK, when I try "make linux ARCH=um SUBARCH=i386", the build fails quite
> early with the following:

>   CC      arch/um/sys-i386/stub_segv.o
> In file included from /usr/include/asm/sigcontext.h:7,
>                  from arch/um/sys-i386/stub_segv.c:7:
> /usr/include/asm-i386/sigcontext.h:18: error: redefinition of 'struct
> _fpreg'
> /usr/include/asm-i386/sigcontext.h:23: error: redefinition of 'struct
> _fpxreg'
> /usr/include/asm-i386/sigcontext.h:29: error: redefinition of 'struct
> _xmmreg'
> /usr/include/asm-i386/sigcontext.h:33: error: redefinition of 'struct
> _fpstate'
> /usr/include/asm-i386/sigcontext.h:57: error: redefinition of 'struct
> sigcontext'
> make[1]: *** [arch/um/sys-i386/stub_segv.o] Error 1
> make: *** [arch/um/sys-i386] Error 2
Ok, this is a "glibc/x86_64" headers bug. The attached patch should fix it 
(received two days ago the same report from another user).

> Step 6 of part 2.1 of the UML HOWTO
> (http://user-mode-linux.sourceforge.net/UserModeLinux-HOWTO-2.html#ss2.1)
> says:

> "Make sure that you don't build this kernel in /usr/src/linux. On some
> distributions, /usr/include/asm is a link into this pool. The user-mode
> build changes the other end of that link, and things that include
> <asm/anything.h> stop compiling."

> Is this what I'm experiencing?
No. I've never* seen a real distro having that config - distro makers were 
burned enough.

* I've started using Linux around 2.4.19, less than 4 years ago IIRC.

> I'm running 'make' in a temp directory, is 
> that what it means by "don't build this kernel in /usr/src/linux"? Any idea
> how to resolve this?

-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
Index: linux-2.6.13/arch/um/sys-i386/stub_segv.c
===================================================================
--- linux-2.6.13.orig/arch/um/sys-i386/stub_segv.c
+++ linux-2.6.13/arch/um/sys-i386/stub_segv.c
@@ -4,7 +4,6 @@
  */
 
 #include <signal.h>
-#include <asm/sigcontext.h>
 #include <asm/unistd.h>
 #include "uml-config.h"
 #include "sysdep/sigcontext.h"

Reply via email to