There were numerous warnings treated as errors when using systemtap and kernel of the following versions: fluffy: ~/code/systemtap$ stap -V SystemTap translator/driver (version 0.6.2/0.131 built 2008-03-16) Copyright (C) 2005-2008 Red Hat, Inc. and others This is free software; see the source for copying conditions. fluffy: ~/code/systemtap$ uname -rm 2.6.21.7-2.fc8xen x86_64 The following commands were executed: stap -ve 'probe begin { printf("hello world\n") }' -v &>log.txt stap -DSTAPCONF_INODE_PRIVATE -ve 'probe begin { printf("hello world\n") }' -v &>log2.txt The errors are saved in log.txt and log2.txt. Thanks, Eugene
Created attachment 2329 [details] stap -ve 'probe begin { printf("hello world\n") }' -v &>log.txt
Created attachment 2330 [details] stap -DSTAPCONF_INODE_PRIVATE -ve 'probe begin { printf("hello world\n") }' -v &>log2.txt
The operative gcc warning is "warning: pointer of type 'void *' used in arithmetic", which is a consequence of -Wpointer-arith. I don't know why this warning is turned on in your build. Regardless, our own code should not calculate with uncast void*'s, which appears to be gnu-c-ism, but rather cast to char*'s first.
Looks like -Wpointer-arith is from /lib/modules/2.6.21.7-2.fc8xen/build/Makefile: 315 CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 316 -fno-strict-aliasing -fno-common \ 317 -Werror-implicit-function-declaration -Wpointer-arith Removing -Wpointer-arith, and running scripts, will trigger the following error: stap_872252efaf2a43c17f3b0b219f69fcf2_15559: Unknown symbol tsc_khz
$ uname -rm 2.6.21.7-2.fc8xen x86_64 tsc_khz is not exported. $ cat runtime/autoconf-tsc-khz.c #include <linux/version.h> #include <asm/tsc.h> #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) && defined(__i386__) <--- removing the arch test will work. x64 is not tested, and so it assumes that tsc_khz is exported when it's not.
runtime/autoconf* change committed: http://sources.redhat.com/ml/systemtap-cvs/2008-q1/msg00202.html -Wpointer-arith in kernel-xen reported: https://bugzilla.redhat.com/show_bug.cgi?id=437807 Thanks, Eugene
The systemtap runtime now builds with -Wpointer-arith; the kernel's own include/linux/relay.h file doesn't, but that's beyond our control.