Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Call for testing: Xen 4.0



I'd did the following with the XEN 4.0.0 release image.


1) On AMD64, Current (Sticky Tag: netbsd-5)


NetBSD-5.1_RC2-x86_64 (as of May 20 2010)


AMD64, GENERIC (NFS root), XEN3_DOM0 (default)


2) Packages built by hand (iasl) and packages from pkgsrc current.


(see attached) (packages_on_system.txt)



 Directories created and environment variables set:





4) Using instructions from:


Applied both patches to :






Both applied clean.


5) gmake xen


This went perfectly. (no errors)


6) gmake dist-tools


6A) gsed is needed

( I used a dirty hack of aliasing sed to gsed, solved the problem with


-Ttext $(RELOC) -o


RELOC is set in xen/arch/x86/boot/Makefile to $(BOOT_TRAMPOLINE), which is

also set in that file:


BOOT_TRAMPOLINE := $(shell sed -n





6B) second but, strnlen is needed by a considerable number of the utilities:


gcc  -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .lvm-util.o.d  -Werror -Wno-unused -I../include -D_GNU_SOURCE -fPIC -Wp,-MD,.lvm-util.o.d -c -o lvm-util.o lvm-util.c

cc1: warnings being treated as errors

lvm-util.c: In function 'lvm_copy_name':

lvm-util.c:54: warning: implicit declaration of function 'strnlen'


Solved it by putting a strnlen.c / strnlen.o file in the TOP directory.


(see attached strnlen.c)


Compiled with "-fPIC"


And for each Makefile that encounters a need for strnlen:

$(CC) add




And in each file that needs a declaration for strnlen:



size_t strnlen(const char *, size_t);


that was done in about 10 places to get mostly the files in xen-4.0.0/tools/blktap2/lvm to compile.



6C) Horrible X11 linking mess for building

In xen-4.0.0/tools/ioemu-qemu-xen

I changed



<     #echo "SDL_LIBS=`$sdl_config --libs` -lX11" >> $config_mak

<      echo "SDL_LIBS=-L/usr/X11R7/lib -Wl,-rpath,/usr/X11R7/lib -lSDL -lpthread -lX11" >> $config_mak


>     echo "SDL_LIBS=`$sdl_config --libs` -lX11" >> $config_mak


<     #echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak

<      echo "SDL_CFLAGS=-I/usr/pkg/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE -I/usr/X11R7/include" >> $config_mak


There was a frustrating dependency and the default filesystem upset xen so I ended up creating a bit of a mess of links between /usr/include and /usr/lib and /usr/pkg/include/SDL (lib as well) and /usr/X11R7/include (lib as well)


I finally got it to compile.  I couldnt figure out how to do this part the correct way.



-msse2: not found

cc1: warnings being treated as errors

xen/lowlevel/xc/xc.c: In function 'pyxc_vcpu_setaffinity':

xen/lowlevel/xc/xc.c:253: warning: passing argument 4 of 'xc_vcpu_setaffinity' makes integer from pointer without a cast

xen/lowlevel/xc/xc.c:253: error: too many arguments to function 'xc_vcpu_setaffinity'

xen/lowlevel/xc/xc.c: In function 'pyxc_vcpu_getinfo':

xen/lowlevel/xc/xc.c:402: error: too many arguments to function 'xc_vcpu_getaffinity'

xen/lowlevel/xc/xc.c: In function 'pyxc_getBitSize':

xen/lowlevel/xc/xc.c:442: warning: implicit declaration of function 'xc_get_bit_size'

xen/lowlevel/xc/xc.c: In function 'pyxc_hvm_build':

xen/lowlevel/xc/xc.c:948: error: 'HVM_MAX_VCPUS' undeclared (first use in this function)

xen/lowlevel/xc/xc.c:948: error: (Each undeclared identifier is reported only once

xen/lowlevel/xc/xc.c:948: error: for each function it appears in.)

xen/lowlevel/xc/xc.c:986: warning: implicit declaration of function 'xc_hvm_build_target_mem'

xen/lowlevel/xc/xc.c:1001: error: 'struct hvm_info_table' has no member named 'vcpu_online'

xen/lowlevel/xc/xc.c:948: warning: unused variable 'vcpu_avail'

xen/lowlevel/xc/xc.c: In function 'pyxc_physinfo':

xen/lowlevel/xc/xc.c:1195: error: 'xc_physinfo_t' has no member named 'max_node_id'

xen/lowlevel/xc/xc.c:1233: error: 'xc_physinfo_t' has no member named 'max_node_id'

xen/lowlevel/xc/xc.c: In function 'pyxc_xeninfo':

xen/lowlevel/xc/xc.c:1262: error: 'xen_commandline_t' undeclared (first use in this function)

xen/lowlevel/xc/xc.c:1262: error: expected ';' before 'xen_commandline'

xen/lowlevel/xc/xc.c:1263: warning: ISO C90 forbids mixed declarations and code

xen/lowlevel/xc/xc.c:1284: error: 'XENVER_commandline' undeclared (first use in this function)

xen/lowlevel/xc/xc.c:1284: error: 'xen_commandline' undeclared (first use in this function)

xen/lowlevel/xc/xc.c: In function 'pyxc_domain_set_target_mem':

xen/lowlevel/xc/xc.c:1483: warning: implicit declaration of function 'xc_domain_memory_set_pod_target'

xen/lowlevel/xc/xc.c: In function 'pyxc_domain_set_tsc_info':

xen/lowlevel/xc/xc.c:1596: warning: implicit declaration of function 'xc_domain_set_tsc_info'

xen/lowlevel/xc/xc.c: In function 'pyxc_domain_disable_migrate':

xen/lowlevel/xc/xc.c:1610: warning: implicit declaration of function 'xc_domain_disable_migrate'

xen/lowlevel/xc/xc.c: In function 'pyxc_tmem_control':

xen/lowlevel/xc/xc.c:1693: warning: implicit declaration of function 'xc_tmem_control'

xen/lowlevel/xc/xc.c: In function 'pyxc_tmem_shared_auth':

xen/lowlevel/xc/xc.c:1732: warning: implicit declaration of function 'xc_tmem_auth'

xen/lowlevel/xc/xc.c: In function 'pyxc_dom_set_memshr':

xen/lowlevel/xc/xc.c:1747: warning: implicit declaration of function 'xc_memshr_control'

error: command 'gcc' failed with exit status 1

gmake[3]: *** [buildpy] Error 1

gmake[2]: *** [subdir-install-python] Error 2

gmake[1]: *** [subdirs-install] Error 2

gmake: *** [install-tools] Error 2





Xen4.0.0 crashes when loading the netbsd XEN3_DOM0 kernel. It doesn't even give a (XEN) output or stop and panic. It simply reboots the machine while loading netbsd from mboot.c32.




I am really hungry to try more to get this running (particularly running dom0 disklessly via NFS, which I have working for the JASPER_FOREST Intel platform and XEN33/netbsd-XEN3_DOM0, but I am on GREEN_CITY Intel platform with a WESTMERE and NIANTIC, and I am struggling to get any XEN to work at all. I have diskless NFS netbsd amd64 running now, and am also trying to get the onboard e1000/if_wm to work and Niantic as well.


03:00.0 Ethernet controller [0200]: Intel Corporation 82599EB 10 Gigabit Network Connection [8086:10fb] (rev 01)

        Subsystem: Intel Corporation Ethernet Server Adapter X520-2 [8086:0003]


01:00.0 Ethernet controller [0200]: Intel Corporation 82575EB Gigabit Network Connection [8086:10a7] (rev 02)

        Subsystem: Intel Corporation Device [8086:34e0]


If anyone can help me, I can turn around fixes and the like.


I also tried:




(aka xenkernel40.tar.gz )


Which is a pkgsrc version of this and it fails to build as well.


I also tried all of this same stuff with top of the tree Xen, and the failures were the same.

packages on system:

hand build:



To create an IASL from Intel. 

Binary in /usr/pkg/bin

Used pkgsrc: 

GConf-2.28.0        Configuration database system used by GNOME
ORBit2-2.14.17      High-performance CORBA ORB with C language support
SDL-1.2.14nb1       Simple DirectMedia Layer, a cross-platform multimedia 
aalib-    ASCII Art library
arts-1.5.10         Analog Real-Time Synthesizer
asciidoc-8.5.3nb1   ASCII to formatted document converter
autoconf-2.65nb1    Generates automatic source code configuration scripts
automake-1.11.1     GNU Standards-compliant Makefile generator
bash-4.1            The GNU Bourne Again Shell
bison-2.4.2         GNU yacc(1) replacement
bmake-20100423      Portable (autoconf) version of NetBSD 'make' utility
bootstrap-mk-files-20090807nb2 *.mk files for the bootstrap bmake utility
consolekit-0.3.0nb4 Framework for defining and tracking users, login sessions, 
and seats
curl-7.20.0         Client that groks URLs
dbus-        Message bus system
dbus-glib-0.84      GLib bindings for the D-BUS message bus system
dev86-0.16.17nb2    Linux 8086 development environment
digest-20080510     Message digest wrapper utility
docbook-xml-4.5     XML DTD designed for computer documentation
docbook-xsl-1.74.0nb1 Docbook XSL modular stylesheet
esound-0.2.41       The Enlightened sound daemon
f2c-20090411nb4     Fortran to C compiler including a script to emulate f77
fftw-3.2.2nb1       Collection of fast C routines to compute DFTs
flac-1.2.1nb1       Free lossless audio codec
flex-2.5.35nb1      Fast clone of lex(1), the lexical scanner generator
gdbm-1.8.3nb1       The GNU database manager
getopt-1.1.4        Program to help shell scripts parse command-line parameters
glib2-2.22.5nb1     Some useful routines for C programming (glib2)
gmake-3.81          GNU version of 'make' utility
gsed-4.2.1          GNU implementation of sed, the POSIX stream editor
gtar-base-1.23      The GNU tape archiver with remote magnetic tape support
hal-0.5.11nb27      FreeDesktop hardware abstraction layer
hal-info-20091130   FreeDesktop hardware abstraction layer (info subpackage)
intltool-0.40.6     Toolbox for internationalisation
jpeg-8b             IJG's jpeg compression utilities
lcms-    Little Color Management System -- a color management library
libIDL-0.8.14       CORBA Interface Definition Language parser
libaudiofile-0.2.7  Sound library for SGI audio file
libf2c-20090201nb3  f2c Fortran support library
libffi-3.0.9        Foreign function interface
libgcrypt-1.4.5     GNU cryptographic library
libgpg-error-1.7    Definitions of common error values for all GnuPG components
libidn-1.18         Internationalized Domain Names command line tool
libltdl-2.2.6b      Generic shared library support (libltdl abstraction library)
libmad-0.15.1bnb1   High-quality MPEG audio decoder
libogg-1.2.0        Ogg project codecs library
liboil-0.3.17       Library of simple, CPU-optimized functions
libsamplerate-0.1.7 Sample rate converter library
libsndfile-1.0.21   Library for reading and writing audio files
libtool-base-2.2.6bnb4 Generic shared library support script (the script itself)
libvolume_id-0.81.1 Library to provide file system type information
libvorbis-1.3.1     Library for the Ogg Vorbis audio encoding format
libxml2-2.7.7       XML parser library from the GNOME project
libxslt-1.1.26      XSLT parser library from the GNOME project
m4-1.4.14           GNU version of UNIX m4 macro language processor
mercurial-1.5.3     Fast, lightweight source control management system
mng-1.0.10nb2       Multiple-image Network Graphics (MNG) reference library
nas-1.9.1nb2        Network Audio System
ncurses-5.7nb3      CRT screen handling and optimization package
ocaml-3.11.2        The latest implementation of the Caml dialect of ML
ocaml-findlib-1.1.2pl1nb2 Library finder for OCaml
osabi-NetBSD-5.1_RC2 Operating System version dummy-package
p5-Error-0.17016    Perl extension module for try/throw/catch exception handling
p5-XML-Parser-2.36nb1 Perl extension interface to James Clark's XML parser, 
patch-2.5.4nb2      Patch files using diff output
pciids-20091229     Repository of PCI IDs (pci.ids database)
pciutils-3.1.3nb1   PCI bus manipulation utility similar to NetBSD pcictl(8)
pcre-8.02           Perl Compatible Regular Expressions library
perl-5.10.1nb1      Practical Extraction and Report Language
pkg-config-0.23nb1  System for managing library compile/link flags
pkg_install-20100421 Package management and administration tools for pkgsrc
png-1.2.43          Library for manipulating PNG images
policykit-0.9nb7    Framework for managing admin policies and privileges
pulseaudio-0.9.21nb2 Sound server for POSIX and Win32 systems
py26-curses-0nb4    Curses module for Python
py26-readline-0nb4  Line editing support for Python
py26-xml-0.8.4nb3   Collection of libraries to process XML with Python
python26-2.6.5      Interpreted, interactive, object-oriented programming 
qt3-libs-3.3.8nb12  C++ X GUI toolkit
qt3-tools-3.3.8nb5  QT GUI (WYSIWYG) builder and other tools
readline-6.1        GNU library that can recall and edit previous input
scmgit-      GIT version control suite meta-package
scmgit-base- GIT Tree History Storage Tool (base package)
scmgit-docs- GIT Tree History Storage Tool (documentation)
speex-1.2rc1nb1     Open-source, patent-free voice codec
tcl-8.4.18          Ousterhout's Tool Command Language, a scripting language
tiff-3.9.2nb2       Library and tools for reading and writing TIFF data files
tk-8.4.18nb1        Graphical toolkit for TCL
unzip-6.0           List, test and extract compressed files in a ZIP archive
usbids-20081118     Repository of USB IDs (usb.ids database)
wget-1.12           Retrieve files from the 'net via HTTP and FTP
x11-links-0.49      Shadow tree of links to native X11 headers and libraries
xenkernel33-3.3.2   Xen 3.3.2 Kernel
xentools33-3.3.2nb3 Userland Tools for Xen 3.3.x
xmlcatmgr-2.2nb1    XML and SGML catalog manager
xmlto-0.0.21nb1     Tool to help transform XML documents into other formats
xpkgwedge-1.16      Allows X11 pkgs to be built and used outside of ${X11BASE}

Attachment: strnlen.c
Description: Binary data

Home | Main Index | Thread Index | Old Index