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 2Thank you for all help.
Regards,
Phil
--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!
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
-
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)!
-
Sounds to me like a known issue by you. Can you give a few more details
so we maybe can get it fixed?Sam
-
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
-
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)!
-
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 ***
-
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)!
-
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
-
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)!
-
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 ***
-
It doesn't handle O= directories...
Jeff
--
Work email - jdike at linux dot intel dot com
-
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)!
-
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 mrproperAnd then build the kernel:
make O=~/kernelSam
-
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)!
-
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 userI will inspired by yprs and other patches try to cook up something.
Hopefully my make-foo suffice.Sam
-
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Alan Stern | Re: 2.6.22-rc2-mm1 |
| Satyam Sharma | Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures |
| William Lee Irwin III | Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS] |
git: | |
| Dale Farnsworth | Re: [PATCH 03/39] mv643xx_eth: shorten reg names |
| Jarek Poplawski | Re: HTB accuracy for high speed |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
