Bug 143999 - app-emulation/xen{,tools}-3.0.2 "cross" build failed
|
Bug#:
143999
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: aross@gentoo.org
|
Reported By: tonich@artparade.ru
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: app-emulation/xen{,tools}-3.0.2 "cross" build failed
|
|
Keywords: Bug
|
|
Status Whiteboard: scheduled for xen-tools-3.0.2-r4
|
|
Opened: 2006-08-15 06:07 0000
|
I'm trying build xen in 32bit system with 64 bit kernel booted (ia32
emulation), but it fails with errors:
# emerge xen
Calculating dependencies... done!
>>> Emerging (1 of 1) app-emulation/xen-3.0.2 to /
>>> checking ebuild checksums ;-)
>>> checking auxfile checksums ;-)
>>> checking miscfile checksums ;-)
>>> checking xen-3.0.2-src.tgz ;-)
>>> Unpacking source...
>>> Unpacking xen-3.0.2-src.tgz to /var/tmp/portage/xen-3.0.2/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/xen-3.0.2/work/xen-3.0.2 ...
make: Entering directory `/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen'
make -C tools
make[1]: Entering directory
`/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/tools'
make -C figlet
make[2]: Entering directory
`/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/tools/figlet'
gcc -o figlet figlet.c
make[2]: Leaving directory
`/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/tools/figlet'
make symbols
make[2]: Entering directory
`/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/tools'
gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-Wdeclaration-after-statement -o symbols symbols.c
make[2]: Leaving directory
`/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/tools'
make[1]: Leaving directory
`/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/tools'
make include/xen/compile.h
make[1]: Entering directory `/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen'
tools/figlet/figlet -d tools/figlet Xen 3.0.2 > include/xen/banner.h.new
__ __ _____ ___ ____
\ \/ /___ _ __ |___ / / _ \ |___ \
\ // _ \ '_ \ |_ \| | | | __) |
/ \ __/ | | | ___) | |_| | / __/
/_/\_\___|_| |_| |____(_)___(_)_____|
make[1]: Leaving directory `/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen'
make include/xen/acm_policy.h
make[1]: Entering directory `/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen'
make[1]: Leaving directory `/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen'
[ -e include/asm ] || ln -sf asm-x86 include/asm
make -C arch/x86 asm-offsets.s
make[1]: Entering directory
`/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/arch/x86'
gcc -O2 -fomit-frame-pointer -DNDEBUG -m64 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -nostdinc -fno-builtin -fno-common
-fno-strict-aliasing -iwithprefix include -Werror -Wno-pointer-arith -pipe
-I/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/include
-I/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/include/asm-x86/mach-generic
-I/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/include/asm-x86/mach-default
-msoft-float -mno-red-zone -fpic -fno-reorder-blocks
-fno-asynchronous-unwind-tables -g -D__XEN__ -S -o asm-offsets.s
x86_64/asm-offsets.c
x86_64/asm-offsets.c:1: sorry, unimplemented: 64-bit mode not compiled in
x86_64/asm-offsets.c: In function `__dummy__':
x86_64/asm-offsets.c:29: error: structure has no member named `r15'
x86_64/asm-offsets.c:30: error: structure has no member named `r14'
x86_64/asm-offsets.c:31: error: structure has no member named `r13'
x86_64/asm-offsets.c:32: error: structure has no member named `r12'
x86_64/asm-offsets.c:33: error: structure has no member named `rbp'
x86_64/asm-offsets.c:34: error: structure has no member named `rbx'
x86_64/asm-offsets.c:35: error: structure has no member named `r11'
x86_64/asm-offsets.c:36: error: structure has no member named `r10'
x86_64/asm-offsets.c:37: error: structure has no member named `r9'
x86_64/asm-offsets.c:38: error: structure has no member named `r8'
x86_64/asm-offsets.c:39: error: structure has no member named `rax'
x86_64/asm-offsets.c:40: error: structure has no member named `rcx'
x86_64/asm-offsets.c:41: error: structure has no member named `rdx'
x86_64/asm-offsets.c:42: error: structure has no member named `rsi'
x86_64/asm-offsets.c:43: error: structure has no member named `rdi'
x86_64/asm-offsets.c:46: error: structure has no member named `rip'
x86_64/asm-offsets.c:49: error: structure has no member named `rsp'
x86_64/asm-offsets.c:63: error: structure has no member named
`syscall_callback_eip'
make[1]: *** [asm-offsets.s] Error 1
make[1]: Leaving directory
`/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/arch/x86'
make: *** [/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen/xen] Error 2
make: Leaving directory `/var/tmp/portage/xen-3.0.2/work/xen-3.0.2/xen'
!!! ERROR: app-emulation/xen-3.0.2 failed.
Call stack:
ebuild.sh, line 1539: Called dyn_compile
ebuild.sh, line 939: Called src_compile
xen-3.0.2.ebuild, line 60: Called die
command:
# XEN_TARGET_ARCH="x86_32" emerge xen
solves this problem
xen-tools have the same problem
Sven, are you in a position to duplicate this with your amd64 hardware? I only
have x86.
Sure, I just need to set up a 32bit domain, but I'm pretty sure I don't need to
do it. The xen packages use uname -m to find the architecture, which in case of
a 64bit kernel will be x86_64, for which a 32bit system can't compile code.
Pretty simple and straightforward fix is to force XEN_TARGET_ARCH to the
correct value, as tonich did on the command line. I'm thinking about code like
the following:
--- xen-3.0.2.ebuild.orig 2006-08-16 06:48:16.000000000 +0000
+++ xen-3.0.2.ebuild 2006-08-16 07:03:36.000000000 +0000
@@ -25,6 +25,21 @@
RESTRICT="test"
+pkg_setup() {
+ if [[ -z ${XEN_TARGET_ARCH} ]]
+ then
+ if use x86
+ then
+ export XEN_TARGET_ARCH="x86_32"
+ elif use amd64
+ then
+ export XEN_TARGET_ARCH="x86_64"
+ else
+ die "Unsupported architecture!"
+ fi
+ fi
+}
+
src_unpack() {
unpack ${A}
# if the user *really* wants to use their own custom-cflags, let them
Another thing might be to integrate complete cross-compile support into the
packages. I haven't tried to cross-compile the beast on x86 for amd64, which
might be worth a shot.
Fixed in app-emulation/xen-3.0.2 without a bump, since the other change
intended for -r1 (#147876) was scrapped.
Fixed in app-emulation/xen-tools-3.0.2-r4, thanks.