While emerging xen-tools-3.3.0 with flags: custom-flags hvm The compilation fails. Reproducible: Always Steps to Reproduce: 1. Select USES: hvm custom-flags 2. emerge -av xen-tools (version 3.3.0) Actual Results: gcc -march=athlon64 -O2 -pipe -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_cpuid_x86.o.d -c -o xc_cpuid_x86.o xc_cpuid_x86.c cc1: warnings being treated as errors xc_dom_x86.c: In function 'start_info_x86_32': xc_dom_x86.c:421: error: format not a string literal and no format arguments xc_dom_x86.c:421: error: format not a string literal and no format arguments xc_dom_x86.c: In function 'start_info_x86_64': xc_dom_x86.c:460: error: format not a string literal and no format arguments xc_dom_x86.c:460: error: format not a string literal and no format arguments make[3]: *** [xc_dom_x86.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0/work/xen-3.3.0/tools/libxc' make[2]: *** [build] Error 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] Error 2 make[1]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-3.3.0/work/xen-3.3.0/tools' make: *** [subdirs-all] Error 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 2777: Called die * The specific snippet of code: * emake -C tools ${myopt} || die "compile failed"; * The die message: * compile failed *
(In reply to comment #0) > While emerging xen-tools-3.3.0 with flags: custom-flags hvm > The compilation fails. > > Reproducible: Always > > Steps to Reproduce: > 1. Select USES: hvm custom-flags > 2. emerge -av xen-tools (version 3.3.0) > > Actual Results: > > gcc -march=athlon64 -O2 -pipe -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_cpuid_x86.o.d -c -o xc_cpuid_x86.o xc_cpuid_x86.c > cc1: warnings being treated as errors > xc_dom_x86.c: In function 'start_info_x86_32': > xc_dom_x86.c:421: error: format not a string literal and no format arguments > xc_dom_x86.c:421: error: format not a string literal and no format arguments > xc_dom_x86.c: In function 'start_info_x86_64': > xc_dom_x86.c:460: error: format not a string literal and no format arguments > xc_dom_x86.c:460: error: format not a string literal and no format arguments > make[3]: *** [xc_dom_x86.o] Error 1 > make[3]: *** Waiting for unfinished jobs.... > make[3]: Leaving directory > `/var/tmp/portage/app-emulation/xen-tools-3.3.0/work/xen-3.3.0/tools/libxc' > make[2]: *** [build] Error 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] Error 2 > make[1]: Leaving directory > `/var/tmp/portage/app-emulation/xen-tools-3.3.0/work/xen-3.3.0/tools' > make: *** [subdirs-all] Error 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 2777: Called die > * The specific snippet of code: > * emake -C tools ${myopt} || die "compile failed"; > * The die message: > * compile failed > * > Please join the output of emerge --info
Please find in attachment a patch which NORMALY fixs warnings (treated as errors due to -Werror CFLAGS, this patch fix only the two warnings) and new ebuild. problem: the third argument of snprintf is a string litteral (generaly a const char *), however the 3th here is a char *, which causes warning (depends of the HOST architecture ) (note: if developer just want to copy str to str , he can use directly memcpy, which is more efficient).
Created attachment 180829 [details, diff] xen-tools-3.3.0-missing-str-litteral.patch
Created attachment 180831 [details] xen-tools-3.3.0-r1.ebuild
There is another affected file. Line 257 in tools/xenstat/xentop/xentop.c: /* Display the given message and gracefully exit */ static void fail(const char *str) { if(cwin != NULL && !isendwin()) endwin(); fprintf(stderr, str); exit(1); }
*** Bug 257274 has been marked as a duplicate of this bug. ***
Created attachment 186909 [details, diff] from http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1405
Created attachment 186910 [details, diff] xen-tools-3.3.0-missing-str-litteral.patch (modified)
Created attachment 186911 [details] xen-tools-3.3.0-r1.ebuild (modified)
Finally I could install it, applying the patches I have submited (these are the first two patches that I have modified and another one from http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1405).
It appears that each of these issues is addressed in xen-tools-3.3.1.
fixed in funtoo http://github.com/funtoo/portage/commit/09f19aa6e13f7d8fa4bac8ea4dc84a78ad7e1d1e
As we have 3.3.1 now please reopen if it's still an issue.