public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* systemtap in xen enabled kernel gives compilation error
@ 2009-04-20  9:39 yashwanth
  2009-04-20 15:41 ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: yashwanth @ 2009-04-20  9:39 UTC (permalink / raw)
  To: systemtap

Dear all,

     while building kernel object using systemtap(version 0.6.2/0.131)
in xen enabled kernel(2.6.21-7.fc7xen) i am getting warnings which are
treated as errors due to -Werror set inside stap Makefile.the same
script works fine in kernel(2.6.23.17-88.fc7) with no warnings.The
version of gcc is same in both the kernels.

command i tried was:
stap -vv -e -k 'probe begin {printf("Hello World")}' -D
STAPCONF_ONEACHCPU_RETRY -D STAPCONF_INODE_PRIVATE -D STAPCONF_TASK_UID

the warnings are as below:

SystemTap translator/driver (version 0.6.2/0.131 built 2008-03-27)
Copyright (C) 2005-2008 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
Created temporary directory "/tmp/staprXvPjg"
Searched '/usr/share/systemtap/tapset/i686/*.stp', found 1
Searched '/usr/share/systemtap/tapset/*.stp', found 37
Pass 1: parsed user script and 38 library script(s) in
280usr/10sys/293real ms.
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0
global(s) in 0usr/0sys/4real ms.
Pass 3: translated to C into
"/tmp/staprXvPjg/stap_fb2dadc85c9f006e93459e4a44ed8875_234.c" in
0usr/0sys/0real ms.
Running make -C "/lib/modules/2.6.21-7.local.fc7xen/build"
M="/tmp/staprXvPjg" modules V=1
make: Entering directory `/usr/src/kernels/2.6.21-7.local.fc7-xen-i686'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (
\
        echo;
\
        echo "  ERROR: Kernel configuration is invalid.";
\
        echo "         include/linux/autoconf.h or
include/config/auto.conf are missing.";      \
        echo "         Run 'make oldconfig && make prepare' on kernel
src to fix it.";  \
        echo;
\
        /bin/false)
mkdir -p /tmp/staprXvPjg/.tmp_versions
rm -f /tmp/staprXvPjg/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/staprXvPjg
  gcc -m32
-Wp,-MD,/tmp/staprXvPjg/.stap_fb2dadc85c9f006e93459e4a44ed8875_234.o.d
-nostdinc -isystem /usr/lib/gcc/i386-redhat-linux/4.1.2/include
-Iinclude/asm/mach-xen -D__KERNEL__ -Iinclude  -include
include/linux/autoconf.h -D__XEN_INTERFACE_VERSION__=0x00030205 -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -Werror-implicit-function-declaration -Wpointer-arith -Os
-pipe -msoft-float -mregparm=3 -freg-struct-return
-mpreferred-stack-boundary=2  -march=i686 -mtune=generic -mtune=generic
-ffreestanding -maccumulate-outgoing-args -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -Iinclude/asm-i386/mach-xen
-Iinclude/asm-i386/mach-default -fomit-frame-pointer -g
-fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D
"STAPCONF_ONEACHCPU_RETRY" -D "STAPCONF_INODE_PRIVATE" -D
"STAPCONF_TASK_UID" -freorder-blocks -Wno-unused -Werror
-I"/usr/share/systemtap/runtime"     -DSTAPCONF_CONSTANT_TSC
-DSTAPCONF_KTIME_GET_REAL   -DMODULE -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(stap_fb2dadc85c9f006e93459e4a44ed8875_234)"  -D"KBUILD_MODNAME=KBUILD_STR(stap_fb2dadc85c9f006e93459e4a44ed8875_234)" -c -o /tmp/staprXvPjg/.tmp_stap_fb2dadc85c9f006e93459e4a44ed8875_234.o /tmp/staprXvPjg/stap_fb2dadc85c9f006e93459e4a44ed8875_234.c
cc1: warnings being treated as errors
In file included from include/linux/list.h:8,
                 from include/linux/module.h:10,
                 from /usr/share/systemtap/runtime/runtime.h:14,

from /tmp/staprXvPjg/stap_fb2dadc85c9f006e93459e4a44ed8875_234.c:42:
include/linux/prefetch.h: In function 'prefetch_range':
include/linux/prefetch.h:62: warning: pointer of type 'void *' used in
arithmetic
In file included from include/linux/ptrace.h:65,
                 from include/asm/kprobes.h:28,
                 from include/linux/kprobes.h:41,
                 from /usr/share/systemtap/runtime/runtime.h:21,

from /tmp/staprXvPjg/stap_fb2dadc85c9f006e93459e4a44ed8875_234.c:42:
include/linux/tracehook.h: In function 'utrace_regset_copyout':
include/linux/tracehook.h:241: warning: pointer of type 'void *' used in
arithmetic
include/linux/tracehook.h:244: warning: pointer of type 'void *' used in
arithmetic
include/linux/tracehook.h:249: warning: pointer of type 'void *' used in
arithmetic
include/linux/tracehook.h: In function 'utrace_regset_copyin':
include/linux/tracehook.h:267: warning: pointer of type 'void *' used in
arithmetic
include/linux/tracehook.h:270: warning: pointer of type 'void *' used in
arithmetic
include/linux/tracehook.h:275: warning: pointer of type 'void *' used in
arithmetic
include/linux/tracehook.h: In function 'utrace_regset_copyout_zero':
include/linux/tracehook.h:299: warning: pointer of type 'void *' used in
arithmetic
include/linux/tracehook.h:304: warning: pointer of type 'void *' used in
arithmetic
include/linux/tracehook.h: In function 'utrace_regset_copyin_ignore':
include/linux/tracehook.h:323: warning: pointer of type 'void *' used in
arithmetic
include/linux/tracehook.h:325: warning: pointer of type 'void *' used in
arithmetic
In file included
from /usr/share/systemtap/runtime/transport/transport.c:22,
                 from /usr/share/systemtap/runtime/print.c:17,
                 from /usr/share/systemtap/runtime/runtime.h:74,

from /tmp/staprXvPjg/stap_fb2dadc85c9f006e93459e4a44ed8875_234.c:42:
/usr/share/systemtap/runtime/transport/symbols.c: In function
'generic_swap':
/usr/share/systemtap/runtime/transport/symbols.c:313: warning: wrong
type argument to increment
/usr/share/systemtap/runtime/transport/symbols.c:314: warning: wrong
type argument to increment
/usr/share/systemtap/runtime/transport/symbols.c: In function
'_stp_sort':
/usr/share/systemtap/runtime/transport/symbols.c:348: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:348: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:348: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:350: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:350: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:352: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:352: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:358: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:361: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:361: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:361: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:363: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:363: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:365: warning: pointer
of type 'void *' used in arithmetic
/usr/share/systemtap/runtime/transport/symbols.c:365: warning: pointer
of type 'void *' used in arithmetic
In file included from /usr/share/systemtap/runtime/transport/utt.c:29,

from /usr/share/systemtap/runtime/transport/transport.c:30,
                 from /usr/share/systemtap/runtime/print.c:17,
                 from /usr/share/systemtap/runtime/runtime.h:74,

from /tmp/staprXvPjg/stap_fb2dadc85c9f006e93459e4a44ed8875_234.c:42:
include/linux/relay.h: In function 'relay_write':
include/linux/relay.h:206: warning: pointer of type 'void *' used in
arithmetic
include/linux/relay.h:206: warning: pointer of type 'void *' used in
arithmetic
include/linux/relay.h: In function '__relay_write':
include/linux/relay.h:232: warning: pointer of type 'void *' used in
arithmetic
include/linux/relay.h:232: warning: pointer of type 'void *' used in
arithmetic
include/linux/relay.h: In function 'relay_reserve':
include/linux/relay.h:258: warning: pointer of type 'void *' used in
arithmetic
make[1]: ***
[/tmp/staprXvPjg/stap_fb2dadc85c9f006e93459e4a44ed8875_234.o] Error 1
make: *** [_module_/tmp/staprXvPjg] Error 2
make: Leaving directory `/usr/src/kernels/2.6.21-7.local.fc7-xen-i686'
Pass 4: compiled C into "stap_fb2dadc85c9f006e93459e4a44ed8875_234.ko"
in 880usr/320sys/1282real ms.
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.


thanks in advance,Please help me out

Regards,
Yashwanth

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: systemtap in xen enabled kernel gives compilation error
  2009-04-20  9:39 systemtap in xen enabled kernel gives compilation error yashwanth
@ 2009-04-20 15:41 ` Frank Ch. Eigler
  2009-04-21  6:57   ` yashwanth
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2009-04-20 15:41 UTC (permalink / raw)
  To: yashwanth.reddy; +Cc: systemtap

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 894 bytes --]


yashwanth <yashwanth.reddy@atc.tcs.com> writes:

> Dear all,
>      while building kernel object using systemtap(»¿version 0.6.2/0.131)
> in xen enabled kernel(2.6.21-7.fc7xen) i am getting warnings which are
> treated as errors due to -Werror set inside stap Makefile. [...]
> cc1: warnings being treated as errors
> In file included from include/linux/list.h:8,
>                  from include/linux/module.h:10,
>                  from /usr/share/systemtap/runtime/runtime.h:14,
>
> from /tmp/staprXvPjg/stap_fb2dadc85c9f006e93459e4a44ed8875_234.c:42:
> include/linux/prefetch.h: In function 'prefetch_range':
> include/linux/prefetch.h:62: warning: pointer of type 'void *' used in
> arithmetic
> [...]

You could comment out the '-Werror' part in stap src/buildrun.cxx.  Or
if you can find a gcc flag to suppress that particular warning, we
could add it.


- FChE

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: systemtap in xen enabled kernel gives compilation error
  2009-04-20 15:41 ` Frank Ch. Eigler
@ 2009-04-21  6:57   ` yashwanth
  0 siblings, 0 replies; 3+ messages in thread
From: yashwanth @ 2009-04-21  6:57 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

Dear Frank,

Thank you for your reply.

Commenting '-Werror' in stap src/buildrun.cxx will work fine.
Our problem was the stap script was running fine in normal kernel but it
was throwing error in xen enabled kernel.

The root cause for the problem was the presence of the additional
parameter '-Wpointer-arith' in the CFLAGS which is defined in Makefile
of xen enabled
kernel("/lib/modules/2.6.21-7.fc7xen/build/Makefile"),which was not
present in normal kernel.The presence of "-Wpointer-arith" in CFLAGS was
generating warning whenever there is conversion of void pointer to
respective pointer type.These warnings are treated as errors because
"-Werror" was present in stap generated Makefile.

Commenting  the additional parameter '-Wpointer-arith' in the CFLAGS
resolved the issue.

Thanks,
Yashwanth    

On Mon, 2009-04-20 at 11:40 -0400, Frank Ch. Eigler wrote: 
> yashwanth <yashwanth.reddy@atc.tcs.com> writes:
> 
> > Dear all,
> >      while building kernel object using systemtap(version 0.6.2/0.131)
> > in xen enabled kernel(2.6.21-7.fc7xen) i am getting warnings which are
> > treated as errors due to -Werror set inside stap Makefile. [...]
> > cc1: warnings being treated as errors
> > In file included from include/linux/list.h:8,
> >                  from include/linux/module.h:10,
> >                  from /usr/share/systemtap/runtime/runtime.h:14,
> >
> > from /tmp/staprXvPjg/stap_fb2dadc85c9f006e93459e4a44ed8875_234.c:42:
> > include/linux/prefetch.h: In function 'prefetch_range':
> > include/linux/prefetch.h:62: warning: pointer of type 'void *' used in
> > arithmetic
> > [...]
> 
> You could comment out the '-Werror' part in stap src/buildrun.cxx.  Or
> if you can find a gcc flag to suppress that particular warning, we
> could add it.
> 
> 
> - FChE

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-21  6:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-20  9:39 systemtap in xen enabled kernel gives compilation error yashwanth
2009-04-20 15:41 ` Frank Ch. Eigler
2009-04-21  6:57   ` yashwanth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).