Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257485 - xen-tools-3.3.0: compilation failure (xc_cpuid_x86.c)
Summary: xen-tools-3.3.0: compilation failure (xc_cpuid_x86.c)
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
: 257274 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-03 14:10 UTC by Krzysztof Magusiak
Modified: 2009-04-26 13:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xen-tools-3.3.0-missing-str-litteral.patch (xen-tools-3.3.0-missing-str-litteral.patch,1.05 KB, patch)
2009-02-03 18:15 UTC, Romain Perier (RETIRED)
Details | Diff
xen-tools-3.3.0-r1.ebuild (xen-tools-3.3.0-r1.ebuild,7.63 KB, text/plain)
2009-02-03 18:15 UTC, Romain Perier (RETIRED)
Details
from http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1405 (xen-tools-3.3.0-bug1405.patch,833 bytes, patch)
2009-03-31 22:06 UTC, Krzysztof Magusiak
Details | Diff
xen-tools-3.3.0-missing-str-litteral.patch (modified) (xen-tools-3.3.0-missing-str-litteral.patch,1.40 KB, patch)
2009-03-31 22:07 UTC, Krzysztof Magusiak
Details | Diff
xen-tools-3.3.0-r1.ebuild (modified) (xen-tools-3.3.0-r1.ebuild,7.70 KB, text/plain)
2009-03-31 22:07 UTC, Krzysztof Magusiak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Magusiak 2009-02-03 14:10:14 UTC
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
 *
Comment 1 Romain Perier (RETIRED) gentoo-dev 2009-02-03 17:39:07 UTC
(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
Comment 2 Romain Perier (RETIRED) gentoo-dev 2009-02-03 18:14:22 UTC
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).

Comment 3 Romain Perier (RETIRED) gentoo-dev 2009-02-03 18:15:22 UTC
Created attachment 180829 [details, diff]
xen-tools-3.3.0-missing-str-litteral.patch
Comment 4 Romain Perier (RETIRED) gentoo-dev 2009-02-03 18:15:57 UTC
Created attachment 180831 [details]
xen-tools-3.3.0-r1.ebuild
Comment 5 Maurice Volaski 2009-02-11 22:18:17 UTC
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);
}
Comment 6 404 Error 2009-02-12 03:53:43 UTC
*** Bug 257274 has been marked as a duplicate of this bug. ***
Comment 7 Krzysztof Magusiak 2009-03-31 22:06:34 UTC
Created attachment 186909 [details, diff]
from http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1405
Comment 8 Krzysztof Magusiak 2009-03-31 22:07:26 UTC
Created attachment 186910 [details, diff]
xen-tools-3.3.0-missing-str-litteral.patch (modified)
Comment 9 Krzysztof Magusiak 2009-03-31 22:07:57 UTC
Created attachment 186911 [details]
xen-tools-3.3.0-r1.ebuild (modified)
Comment 10 Krzysztof Magusiak 2009-03-31 22:09:25 UTC
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).
Comment 11 Daniel Robbins 2009-04-26 00:28:43 UTC
It appears that each of these issues is addressed in xen-tools-3.3.1.
Comment 13 Patrick Lauer gentoo-dev 2009-04-26 13:27:59 UTC
As we have 3.3.1 now please reopen if it's still an issue.