xen-3.3.0 and xen-tools-3.3.0 doesn't compile with gcc 4.3.3 because compilation warnings, and xen treat warning as errors. Reproducible: Always Steps to Reproduce: 1. upgrade to gcc 4.3.3 2. emerge -1av xen-tools 3. emerge -1av xen Actual Results: cat /var/tmp/portage/app-emulation/xen-3.3.0/temp/build.log >>> Unpacking source... >>> Unpacking xen-3.3.0.tar.gz to /var/tmp/portage/app-emulation/xen-3.3.0/work * Applying xen-sed-gcc.patch ... [ ok ] >>> Source unpacked in /var/tmp/portage/app-emulation/xen-3.3.0/work >>> Compiling source in /var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0 ... make -j3 CC=x86_64-pc-linux-gnu-gcc LDFLAGS=-O1 -C xen make: Entering directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen' make -f Rules.mk _build dnsdomainname: 未知的服务器错误 make[1]: Entering directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen' make -C tools make[2]: Entering directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen/tools' [ -d figlet ] && make -C figlet make[3]: Entering directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen/tools/figlet' gcc -o figlet figlet.c make[3]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen/tools/figlet' make symbols make[3]: Entering directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen/tools' gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -Wdeclaration-after-statement -o symbols symbols.c cc1: warnings being treated as errors symbols.c: 在函数‘read_symbol’中: symbols.c:84: 错误:忽略声明有 warn_unused_result 属性的‘fgets’的返回值 make[3]: *** [symbols] 错误 1 make[3]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen/tools' make[2]: *** [default] 错误 2 make[2]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen/tools' make[1]: *** [/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen/xen] 错误 2 make[1]: Leaving directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen' make: *** [build] 错误 2 make: Leaving directory `/var/tmp/portage/app-emulation/xen-3.3.0/work/xen-3.3.0/xen' * * ERROR: app-emulation/xen-3.3.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2573: Called die * The specific snippet of code: * emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" -C xen ${myopt} || die "compile failed" * The die message: * compile failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/app-emulation/xen-3.3.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-emulation/xen-3.3.0/temp/environment'. * and : gcc -fno-strict-overflow -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes -I. -I../xenstore -I../include -Wp,-MD,.build.d -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes -I. -I../xenstore -I../include -Wp,-MD,.xc_dom_compat_linux.o.d -c -o xc_dom_compat_linux.o xc_dom_compat_linux.c gcc -fno-strict-overflow -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes -I. -I../xenstore -I../include -Wp,-MD,.build.d -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes -I. -I../xenstore -I../include -Wp,-MD,.xc_dom_x86.o.d -c -o xc_dom_x86.o xc_dom_x86.c cc1: warnings being treated as errors xc_dom_x86.c: 在函数‘start_info_x86_32’中: xc_dom_x86.c:421: 错误:格式字符串不是一个字面字符串而且没有待格式化的实参 xc_dom_x86.c:421: 错误:格式字符串不是一个字面字符串而且没有待格式化的实参 xc_dom_x86.c: 在函数‘start_info_x86_64’中: xc_dom_x86.c:460: 错误:格式字符串不是一个字面字符串而且没有待格式化的实参 xc_dom_x86.c:460: 错误:格式字符串不是一个字面字符串而且没有待格式化的实参 make[3]: *** [xc_dom_x86.o] 错误 1 make[3]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0/work/xen-3.3.0/tools/libxc' make[2]: *** [build] 错误 2 make[2]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0/work/xen-3.3.0/tools/libxc' make[1]: *** [subdir-all-libxc] 错误 2 make[1]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0/work/xen-3.3.0/tools' make: *** [subdirs-all] 错误 2 make: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0/work/xen-3.3.0/tools' * * ERROR: app-emulation/xen-tools-3.3.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2791: Called die * The specific snippet of code: * emake -C tools ${myopt} || die "compile failed"; * The die message: * compile failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/app-emulation/xen-tools-3.3.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-emulation/xen-tools-3.3.0/temp/environment'. * I'm sorry about the chinese characters. emerge --info Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.28-gentoo-r2 x86_64) ================================================================= System uname: Linux-2.6.28-gentoo-r2-x86_64-AMD_Turion-tm-_64_X2_Mobile_Technology_TL-60-with-glibc2.2.5 Timestamp of tree: Fri, 20 Feb 2009 00:20:01 +0000 app-shells/bash: 3.2_p48-r1 dev-java/java-config: 1.3.7-r1, 2.1.7 dev-lang/python: 2.5.4-r2 dev-util/cmake: 2.6.2-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.3-r1 sys-apps/sandbox: 1.3.7 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19.1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.28-r1 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -msse3 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=k8 -msse3 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://mirror.lzu.edu.cn/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://distfiles.gentoo.org" LANG="zh_CN.UTF-8" LC_ALL="zh_CN.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en_US zh_CN" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/private/myoverlay /usr/local/portage/layman/gentoo-china /usr/local/portage" SYNC="rsync://202.201.0.141/gentoo-portage" USE="3dnow 3dnowext X acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dmx dri dvd dvdr dvdread eds emboss encode evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk guile hal iconv ipv6 isdnlog jpeg laptop latex ldap libnotify mad midi mikmod mmx mono mp3 mpeg mudflap multilib ncurses networkmanager nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tetex threads tiff truetype unicode usb vorbis xcb xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US zh_CN" USERLAND="GNU" VIDEO_CARDS="vesa radeon radeonhd fglrx" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 182605 [details, diff] xen-3.3.0-r1.ebuild (quick&dirty fix)
Created attachment 182606 [details, diff] xen-tools-3.3.0-r1.ebuild (quick&dirty fix)
Created attachment 182607 [details, diff] xen-3.3.0-warning-fix.patch, quick&dirty fix of compilation warning(s)
Created attachment 182609 [details, diff] xen-tools-3.3.0-warning-fix.patch, quick&dirty fix of compilation warning(s)
Created attachment 182611 [details, diff] fix sandbox violation due to unexported/uninitialized varialble `target' in xen-setup, ref: http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1405
sorry, just forget the use flags. use flag for xen/xen-tools: [ebuild R ] app-emulation/xen-3.3.0-r1 USE="-acm -custom-cflags -debug -flask -pae -xsm" [ebuild R ] app-emulation/xen-tools-3.3.0-r1 USE="api hvm -acm -custom-cflags -debug -doc -flask -pygrub -screen" I use `api' use flag for xen-tools because I want to build virt-manager, which depends libvirt, to make libvirt have xen support (xen use flag), we have to use `api' flag with xen-tools.
Comment on attachment 182605 [details, diff] xen-3.3.0-r1.ebuild (quick&dirty fix) --- xen-3.3.0.ebuild 2008-09-01 08:30:53.000000000 +0800 +++ xen-3.3.0-r1.ebuild 2009-02-20 11:41:31.000000000 +0800 @@ -54,6 +54,9 @@ cd "${S}" epatch "${FILESDIR}"/${PN}-sed-gcc.patch + # Fix compiler warning on gcc 4.3.3 + epatch "${FILESDIR}"/${P}-warning-fix.patch" + # if the user *really* wants to use their own custom-cflags, let them if use custom-cflags; then einfo "User wants their own CFLAGS - removing defaults"
Comment on attachment 182606 [details, diff] xen-tools-3.3.0-r1.ebuild (quick&dirty fix) --- xen-tools-3.3.0.ebuild 2008-09-01 08:41:07.000000000 +0800 +++ xen-tools-3.3.0-r1.ebuild 2009-02-20 10:58:37.000000000 +0800 @@ -144,6 +144,12 @@ # Do not strip binaries epatch "${FILESDIR}/"${P}-nostrip.patch + + # Fix compiler warnings + epatch "${FILESDIR}/"${P}-warning-fix.patch + + # Fix unexport $target in xen-setup + epatch "${FILESDIR}/"${P}-unexported-target-fix.patch } src_compile() {
*** Bug 259668 has been marked as a duplicate of this bug. ***
After trying the patches 'emerge xen-tools' fail for me with: ... make[2]: Entering directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0-r1/work/xen-3.3.0/tools/check' LIBXENAPI_BINDINGS=y ACM_SECURITY=n ./chk build Xen CHECK-BUILD Sun Apr 12 15:23:12 CEST 2009 Checking check_crypto_lib: OK Checking check_curl: *** check_curl FAILED: dependency libraries for curl are missing Checking check_openssl_devel: OK Checking check_python: OK Checking check_python_devel: OK Checking check_x11_devel: OK Checking check_xgettext: OK Checking check_xml2: OK Checking check_zlib_devel: OK Checking check_zlib_lib: OK make[2]: *** [check-build] Error 1 make[2]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0-r1/work/xen-3.3.0/tools/check' make[1]: *** [subdir-all-check] Error 2 make[1]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0-r1/work/xen-3.3.0/tools' make: *** [subdirs-all] Error 2 make: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0-r1/work/xen-3.3.0/tools' * * ERROR: app-emulation/xen-tools-3.3.0-r1 failed. curl and gettext is installed: root@condor:/usr/local/portage/app-emulation/xen-tools(93)# emerge -pvD gettext curl These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-devel/gettext-0.17 USE="acl doc emacs nls openmp -nocxx" 0 kB [ebuild R ] net-misc/curl-7.19.4 USE="gnutls ipv6 kerberos ldap ssl -ares -idn -libssh2 -nss -test" 0 kB
+ 26 Apr 2009; Patrick Lauer <patrick@gentoo.org> + +files/xen-tools-3.3.0-warning-fix.patch, xen-tools-3.3.0: + Fix gcc 4.3 compile failure, part of #259670
+ 26 Apr 2009; Patrick Lauer <patrick@gentoo.org> + +files/xen-3.3.0-warning-fix.patch, xen-3.3.0: + Fix gcc 4.3 compile failure, part of #259670 So the gcc 4.3 failures should be covered. Need to investigate the unexported target issue, haven't hit it locally.
+*xen-3.3.1-r1 (27 Apr 2009) + + 27 Apr 2009; Patrick Lauer <patrick@gentoo.org> + +files/xen-3.3.0-unexported-target-fix.patch, +xen-3.3.1-r1.ebuild: + Fix sandbox violation, + http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1405 Closes #259670