Re: UML dead with current -git?

Previous thread: [PATCH] PHYLIB: Spinlock fixes for softirqs by Maciej W. Rozycki on Tuesday, September 18, 2007 - 10:58 am. (3 messages)

Next thread: [PATCH 1/2] gpio_keys: add gpio_to_irq return code check by Anti Sullin on Tuesday, September 18, 2007 - 11:43 am. (2 messages)
To: <linux-kernel@...>
Date: Tuesday, September 18, 2007 - 11:14 am

Hello everybody,

I'm trying to build a UML machine on x86-64 (config attached)
but I'm getting compile errors.

What am I doing wrong?

make allnoconfig ARCH=um
make menuconfig ARCH=um
selected a few options
make -j 5 ARCH=um
..
include/linux/jiffies.h:225:31: error: division by zero in #if
include/linux/jiffies.h:225:46: warning: "SHIFT_HZ" is not defined
In file included from arch/um/include/sysdep/kernel-offsets.h:2,
from arch/um/kernel/asm-offsets.c:1:
include/linux/sched.h: In function 'dequeue_signal_lock':
include/linux/sched.h:1506: error: implicit declaration of function 'local_irq_save'
include/linux/sched.h:1508: error: implicit declaration of function 'local_irq_restore'
In file included from include/linux/crypto.h:21,
from arch/um/include/sysdep/kernel-offsets.h:5,
from arch/um/kernel/asm-offsets.c:1:
include/linux/module.h: At top level:
include/linux/module.h:222: error: requested alignment is not a constant
In file included from arch/um/kernel/asm-offsets.c:1:
arch/um/include/sysdep/kernel-offsets.h:25:29: error: asm/arch/unistd.h: No such file or directory
In file included from arch/um/include/sysdep/kernel-offsets.h:30,
from arch/um/kernel/asm-offsets.c:1:
arch/um/include/common-offsets.h: In function 'foo':
arch/um/include/common-offsets.h:8: error: 'struct thread_struct' has no member named 'regs'
make[1]: *** [arch/um/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

Thank you for all help.

Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!

To: Philipp Marek <philipp@...>
Cc: <linux-kernel@...>
Date: Tuesday, September 18, 2007 - 1:13 pm

Builds for me. Did you start with an mrproper? These errors look
like the UML build getting confused by left-overs from an x86_64
build.

Jeff

--
Work email - jdike at linux dot intel dot com
-

To: Jeff Dike <jdike@...>
Cc: <linux-kernel@...>
Date: Tuesday, September 18, 2007 - 2:09 pm

No, I didn't. Shouldn't that get cleaned up by a (completely new) config
anyway?

I'll try and tell you tomorrow.

Thank you!

Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!
-

To: Jeff Dike <jdike@...>
Cc: Philipp Marek <philipp@...>, <linux-kernel@...>
Date: Tuesday, September 18, 2007 - 1:55 pm

Sounds to me like a known issue by you. Can you give a few more details
so we maybe can get it fixed?

Sam
-

To: Sam Ravnborg <sam@...>
Cc: Philipp Marek <philipp@...>, <linux-kernel@...>
Date: Tuesday, September 18, 2007 - 9:35 pm

I believe what happened here is an x86_64 build followed by a
UML/x86_64 build with no intervening mrproper.

I've always considered this to be a "don't do that" sort of thing.
However, maybe we could stick the arch of the current build somewhere
in the tree, check that before any serious part of a subsequent
build, and error out if $ARCH is different.

Jeff

--
Work email - jdike at linux dot intel dot com
-

To: Jeff Dike <jdike@...>
Cc: Sam Ravnborg <sam@...>, <linux-kernel@...>
Date: Wednesday, September 19, 2007 - 8:43 am

Yes, after a "make mrproper" it compiles fine.
Well, on this line it may be nice to be able to put the target architecture
somewhere ...
make mrproper
make menuconfig ARCH=um
make ARCH=um
... some tweaking
make menuconfig
and the .config is overwritten with the "wrong" architecture.
(I know about .config.bak and so on ... just a small wish)

Thank you!

Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!
-

To: Philipp Marek <philipp@...>
Cc: Jeff Dike <jdike@...>, Sam Ravnborg <sam@...>, <linux-kernel@...>
Date: Wednesday, September 19, 2007 - 11:50 am

Yes, I've tried to coerce the top-level Makefile into honoring/using
the include/asm symlink if it exists, i.e., taking ARCH from
readlink include/asm && sed -e 's/include-asm//', but sadly my
makefile foo was not good enough.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-

To: Randy Dunlap <randy.dunlap@...>
Cc: Jeff Dike <jdike@...>, Sam Ravnborg <sam@...>, <linux-kernel@...>
Date: Wednesday, September 19, 2007 - 12:17 pm

Hello Randy!

How about that?
readlink include/asm
returns
asm-um
in my case, so I only have to strip the "asm-" part ...

Regards,

Phil

diff --git a/Makefile b/Makefile
index e0fdf49..c9284ba 100644
--- a/Makefile
+++ b/Makefile
@@ -163,6 +163,9 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ )

+# sadly perl is defined below ... so we can't use it here, can we?
+ASMARCH := $(shell test -s include/asm && readlink include/asm | cut -f2 -d-)
+
# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
#
@@ -182,7 +185,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile

-ARCH ?= $(SUBARCH)
+ARCH ?= $(or $(SUBARCH), $(ASMARCH))
CROSS_COMPILE ?=

# Architecture as present in compile.h

--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!
-

To: Philipp Marek <philipp@...>
Cc: Jeff Dike <jdike@...>, Sam Ravnborg <sam@...>, <linux-kernel@...>
Date: Wednesday, September 19, 2007 - 1:47 pm

This doesn't work when there is no include/asm symlink.

It also didn't apply cleanly due to tab(s) being converted
to spaces (but of course I fixed that part).

---
~Randy
-

To: Randy Dunlap <randy.dunlap@...>
Cc: Philipp Marek <philipp@...>, Jeff Dike <jdike@...>, Sam Ravnborg <sam@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 1:42 am

Why? I specifically test for that, and tried it on my machine.
What's the bug?
ASMARCH should come out empty, and the ?= and $(or) should take care of
Yes, sorry. I'll try to attach inline next time.

Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!
-

To: Ph. Marek <philipp@...>
Cc: Jeff Dike <jdike@...>, Sam Ravnborg <sam@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 12:35 pm

Sorry, I can't reproduce it now.
The variable was coming out empty though. I saw path strings like
linux-2.6.23-rc6/arch//Makefile

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-

To: Philipp Marek <philipp@...>
Cc: Randy Dunlap <randy.dunlap@...>, Sam Ravnborg <sam@...>, <linux-kernel@...>
Date: Wednesday, September 19, 2007 - 2:05 pm

It doesn't handle O= directories...

Jeff

--
Work email - jdike at linux dot intel dot com
-

To: Jeff Dike <jdike@...>
Cc: Randy Dunlap <randy.dunlap@...>, Sam Ravnborg <sam@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 1:44 am

Sorry, I don't understand you. What are "0=" directories? Do you mean that
if there's no include/ directory?

Well, I guess that there are non-obvious corner cases in the include/asm
symlink usage, that amateurs simply do not know ...

Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!
-

To: Ph. Marek <philipp@...>
Cc: Jeff Dike <jdike@...>, Randy Dunlap <randy.dunlap@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 3:01 am

When building a kernel you can specify an other output directory
so you do not mix up your source tree with generated files.
To do so do like this:

Prepare the stuff:
mkdir ~/kernel
cp .config ~/kernel
make mrproper

And then build the kernel:
make O=~/kernel

Sam
-

To: Sam Ravnborg <sam@...>
Cc: Jeff Dike <jdike@...>, Randy Dunlap <randy.dunlap@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 3:25 am

Oh yes ... thats the character 'o', not the number zero ...
Sorry, changing the font shows that :-)

Yes, that's right. Wouldn't $(srctree) help? That's defined just above, so
should be fine.

Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!
-

To: Philipp Marek <philipp@...>
Cc: Jeff Dike <jdike@...>, Randy Dunlap <randy.dunlap@...>, <linux-kernel@...>
Date: Thursday, September 20, 2007 - 4:26 am

We want a solution that:
- Always use the same ARCH as before
- Error out if user specify another ARCH
- Tell what ARCH is used to user

I will inspired by yprs and other patches try to cook up something.
Hopefully my make-foo suffice.

Sam
-

Previous thread: [PATCH] PHYLIB: Spinlock fixes for softirqs by Maciej W. Rozycki on Tuesday, September 18, 2007 - 10:58 am. (3 messages)

Next thread: [PATCH 1/2] gpio_keys: add gpio_to_irq return code check by Anti Sullin on Tuesday, September 18, 2007 - 11:43 am. (2 messages)