You are not logged in.
hi everyone,
i'm trying to install xen on my system.
i tried installing it using yaourt, and then again manually via git copy, and makepkg.
both throw a build error
non-fatal.c: In function 'init_nonfatal_mce_checker':
non-fatal.c:97:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if ( __get_cpu_var(poll_bankmask) == NULL )
^~
non-fatal.c:103:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
switch (c->x86_vendor) {
^~~~~~
cc1: all warnings being treated as errors
/home/nir/xen/xen/src/xen-4.5.1/xen/Rules.mk:168: recipe for target 'non-fatal.o' failed
make[6]: *** [non-fatal.o] Error 1
make[6]: Leaving directory '/home/nir/xen/xen/src/xen-4.5.1/xen/arch/x86/cpu/mcheck'
/home/nir/xen/xen/src/xen-4.5.1/xen/Rules.mk:156: recipe for target 'mcheck/built_in.o' failed
make[5]: *** [mcheck/built_in.o] Error 2
make[5]: Leaving directory '/home/nir/xen/xen/src/xen-4.5.1/xen/arch/x86/cpu'
/home/nir/xen/xen/src/xen-4.5.1/xen/Rules.mk:156: recipe for target 'cpu/built_in.o' failed
make[4]: *** [cpu/built_in.o] Error 2
make[4]: Leaving directory '/home/nir/xen/xen/src/xen-4.5.1/xen/arch/x86'
/home/nir/xen/xen/src/xen-4.5.1/xen/Rules.mk:156: recipe for target '/home/nir/xen/xen/src/xen-4.5.1/xen/arch/x86/built_in.o' failed
make[3]: *** [/home/nir/xen/xen/src/xen-4.5.1/xen/arch/x86/built_in.o] Error 2
make[3]: Leaving directory '/home/nir/xen/xen/src/xen-4.5.1/xen/arch/x86'
Makefile:100: recipe for target '/home/nir/xen/xen/src/xen-4.5.1/xen/xen' failed
make[2]: *** [/home/nir/xen/xen/src/xen-4.5.1/xen/xen] Error 2
make[2]: Leaving directory '/home/nir/xen/xen/src/xen-4.5.1/xen'
Makefile:26: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/home/nir/xen/xen/src/xen-4.5.1/xen'
Makefile:65: recipe for target 'install-xen' failed
make: *** [install-xen] Error 2
==> ERROR: A failure occurred in build().
Aborting...
iv'e found this thread, but it didn't really help...
forgive me for being a newbie, just built my first arch yesterday but I'm a quick learner
thanks for the help!
Last edited by israelisraeli (2016-06-08 12:32:41)
Offline
Offline
hi loqs,
thanks for your response!
i tried reading the links, but i'm not sure what information they provide or how to use it...
Offline
i tried reading the links, but i'm not sure what information they provide or how to use it...
From your first post
cc1: all warnings being treated as errors
My second link to GCC warning options documents that -Werror causes warnings to be treated as errors and would cause the above output to be generated.
My first link is to webinterface to the xen source in particular line 45 of xen/Rules.mk
CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
which includes Werror
Now back to your first posy
non-fatal.c:97:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
Werror=misleading-indentation is the same as Wmisleading-indentation +Werror (I have just documented a source of Werror )
So now to locate a source of Wmisleading-indentation
Config.mk
Line 40 of Config.mk
HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
Werror again ( missed that occurrence in my original reply ) and -Wall my second link documents -Wall turns on -Wmisleading-indentation (only for C/C++)
I have not covered the code that triggered the -Wmisleading-indentation warning but I hope that explains why the warning was active and why the warning is being treated as an error.
I also have not covered how to resolve the failing build you could either change the code the warning detects, remove the use of -Wmisleading-indentation or remove the use of -Werror.
Offline
i hope i understood you correctly:
there is a bool flag array in one of the config files, one of them is called 'Werror' and if it's turned on the build() will treat all warnnings as error. during my build() a Wmisleading-indentation warning turned on the Werror => throw error.
so you suggest someways to work-around this error: either set 'Werror' off or set the specific warning checker off.
but why is this warring trowed in the first-place? can i find documentation on this warning? possibly something is miss-configured in my system?
thanks for your help!
Offline
but why is this warring trowed in the first-place? can i find documentation on this warning? possibly something is miss-configured in my system?
The misleading-indentation warning is new in gcc6.
https://gcc.gnu.org/gcc-6/porting_to.html
https://gcc.gnu.org/gcc-6/changes.html
Last edited by mis (2016-06-07 09:00:03)
Offline
ok, i get it now - somewhere in the code some sloppy xen developer wrote
if(codition)
/intend/ do1()
/intend/ do2()
and the gcc compiler is clever enough to notice that only do1() is conditional and stop the build. from the documentation i understand that adding -Wno-misleading-indentation to the build flags should solve my issue.
first of all, thanks! i finally understand what's the issue
one (hopefully) last noob question: i spent some time with the documentation time to figure out how to edit build flags, but i didn't find it... (how do i add build flags?)
Offline
one (hopefully) last noob question: i spent some time with the documentation time to figure out how to edit build flags, but i didn't find it... (how do i add build flags?)
I am assuming you are using the xen packagebuild from aur
PKGBUILD
line 20
options=(!buildflags !strip)
Specifies do not use the default build flags and do not strip binaries
line 129
export CFLAGS=-fno-caller-saves
I have not tested if modifying the CFLAGS would work for you.
Offline
changing this line to
export CFLAGS=-fno-caller-saves -Wno-misleading-indentation
throws
==> Starting build()...
/tmp/yaourt-tmp-nir/aur-xen/./PKGBUILD: line 129: export: `-Wno-misleading-indentation': not a valid identifier
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build xen.
Offline
try
export CFLAGS="-fno-caller-saves -Wno-misleading-indentation"
note the quotes
Offline
not quite the syntax yet...
makepkg:
configure: error: unrecognized option: `-Wno-misleading-indentation'
Try `./configure --help' for more information
==> ERROR: A failure occurred in build().
Aborting...
yaourt
Makefile:170: recipe for target 'out/rom16.o' failed
make[6]: *** [out/rom16.o] Error 1
make[6]: Leaving directory '/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools/firmware/seabios-dir-remote'
/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools/firmware/../../tools/Rules.mk:116: recipe for target 'subdir-all-seabios-dir' failed
make[5]: *** [subdir-all-seabios-dir] Error 2
make[5]: Leaving directory '/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools/firmware'
/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools/firmware/../../tools/Rules.mk:111: recipe for target 'subdirs-all' failed
make[4]: *** [subdirs-all] Error 2
make[4]: Leaving directory '/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools/firmware'
Makefile:38: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools/firmware'
/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools/../tools/Rules.mk:116: recipe for target 'subdir-install-firmware' failed
make[2]: *** [subdir-install-firmware] Error 2
make[2]: Leaving directory '/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools'
/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools/../tools/Rules.mk:111: recipe for target 'subdirs-install' failed
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory '/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools'
Makefile:69: recipe for target 'install-tools' failed
make: *** [install-tools] Error 2
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build xen.
Last edited by israelisraeli (2016-06-07 18:50:43)
Offline
not quite the syntax yet...
makepkg:configure: error: unrecognized option: `-Wno-misleading-indentation' Try `./configure --help' for more information ==> ERROR: A failure occurred in build(). Aborting...
Seems you added it to the configure options. If you use the PKGBUILD from AUR only edit line 129.
Seems when you used yaourt you did that..
but there is an other error that doesn't occure before, because compilation failed earlier with the misleading-indentation error.
Offline
you're right, iv'e fixed the pkgbuild in the first method and now i get the same "advanced" error as in yaourt. any ideas on this error code?
Offline
What is the full output from makepkg now?
Makefile:170: recipe for target 'out/rom16.o' failed
possibly line 170 of Makefile
make[6]: Leaving directory '/tmp/yaourt-tmp-nir/aur-xen/src/xen-4.5.1/tools/firmware/seabios-dir-remote'
in the tools/firmware/seabios-dir-remote directory
If you just want a virtualization environment have you considered qemu as an alternative that comes prebuilt in the official repositories.
Offline
full output
Makefile:170: recipe for target 'out/rom16.o' failed
make[6]: *** [out/rom16.o] Error 1
make[6]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools/firmware/seabios-dir-remote'
/home/nir/bld/xen/src/xen-4.5.1/tools/firmware/../../tools/Rules.mk:116: recipe for target 'subdir-all-seabios-dir' failed
make[5]: *** [subdir-all-seabios-dir] Error 2
make[5]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools/firmware'
/home/nir/bld/xen/src/xen-4.5.1/tools/firmware/../../tools/Rules.mk:111: recipe for target 'subdirs-all' failed
make[4]: *** [subdirs-all] Error 2
make[4]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools/firmware'
Makefile:38: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools/firmware'
/home/nir/bld/xen/src/xen-4.5.1/tools/../tools/Rules.mk:116: recipe for target 'subdir-install-firmware' failed
make[2]: *** [subdir-install-firmware] Error 2
make[2]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools'
/home/nir/bld/xen/src/xen-4.5.1/tools/../tools/Rules.mk:111: recipe for target 'subdirs-install' failed
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools'
Makefile:69: recipe for target 'install-tools' failed
make: *** [install-tools] Error 2
==> ERROR: A failure occurred in build().
i really wonder why do i encounter so many errors while installing it, i have a fresh build of arch, and the arch wiki simply says "install xen(aur)". maybe some of the packages in aur are outdated? will it be easier to compile from source - i just wonder if there aren't any manual optimizations that need to be done in order to configure arch as DOM0.
i can cosider KVM/Quemo but i understand that it's less mature and provides less features than xen...
my plan is to run arch for everyday use + coding / compiling and windows for gaming only (VGA passthrougth)
Offline
full output
Makefile:170: recipe for target 'out/rom16.o' failed make[6]: *** [out/rom16.o] Error 1 make[6]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools/firmware/seabios-dir-remote' /home/nir/bld/xen/src/xen-4.5.1/tools/firmware/../../tools/Rules.mk:116: recipe for target 'subdir-all-seabios-dir' failed make[5]: *** [subdir-all-seabios-dir] Error 2 make[5]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools/firmware' /home/nir/bld/xen/src/xen-4.5.1/tools/firmware/../../tools/Rules.mk:111: recipe for target 'subdirs-all' failed make[4]: *** [subdirs-all] Error 2 make[4]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools/firmware' Makefile:38: recipe for target 'all' failed make[3]: *** [all] Error 2 make[3]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools/firmware' /home/nir/bld/xen/src/xen-4.5.1/tools/../tools/Rules.mk:116: recipe for target 'subdir-install-firmware' failed make[2]: *** [subdir-install-firmware] Error 2 make[2]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools' /home/nir/bld/xen/src/xen-4.5.1/tools/../tools/Rules.mk:111: recipe for target 'subdirs-install' failed make[1]: *** [subdirs-install] Error 2 make[1]: Leaving directory '/home/nir/bld/xen/src/xen-4.5.1/tools' Makefile:69: recipe for target 'install-tools' failed make: *** [install-tools] Error 2 ==> ERROR: A failure occurred in build().
By full output I mean all output that is generated after you ran makepkg preferably including the command itself
i really wonder why do i encounter so many errors while installing it, i have a fresh build of arch, and the arch wiki simply says "install xen(aur)". maybe some of the packages in aur are outdated? will it be easier to compile from source - i just wonder if there aren't any manual optimizations that need to be done in order to configure arch as DOM0.
If this was caused for instance solely by the change to gcc6 that was added to the main repositories on 2016-05-02 so no one with an up to date system would have been able to build the package since then.
https://aur.archlinux.org/packages/xen/ was last updated 2015-07-04 missing releases 4.5.2,4.5.3,4.6.0 and 4.6.1.
AUR packages are community maintained and many of them may be outdated.
i can cosider KVM/Quemo but i understand that it's less mature and provides less features than xen...
I do not know enough about the differences to comment on this
my plan is to run arch for everyday use + coding / compiling and windows for gaming only (VGA passthrougth)
qemu should be capable of doing that (hardware allowing for the vga passthrough part)
Offline
iv'e mannaged to build and install xen from this git
https://gitlab.com/johnth/aur-xen/commits/master
for now it's probably good enough to try it out gain some experience, but i'm wondering if it's a good habit
Offline
I've just seen that the package in AUR is marked as out-of-date since 2015-10-13.
Looking at the comments it seems the maintainer is working on updating it... though the newest comments are two month old.
Offline
thanks for all of your help anyway!
Offline