Package: systemtap-common
Version: 1.7-1+deb7u1
Severity: normal
Tags: patch
Dear Maintainer,
Trying a simple procfs probe like this:
-------profs-read.stp-------------
probe procfs("readme").read {
$value = "100\n"
}
-------------------------------
reports an error while compiling:
-------------------------------------------------
# stap profs-read.stp
In file included from
/tmp/staphcNerS/stap_4162120524274ba06e575bd8424aaf44_1037_src.c:173:0:
/usr/share/systemtap/runtime/procfs.c: In function
‘_stp_mkdir_proc_module’:
/usr/share/systemtap/runtime/procfs.c:148:27: error: dereferencing pointer to
incomplete type
make[3]: *** [/tmp/staphcNerS/stap_4162120524274ba06e575bd8424aaf44_1037_src.o]
Error 1
make[2]: *** [_module_/tmp/staphcNerS] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
WARNING: make exited with status: 2
Pass 4: compilation failed. Try again with another '--vp 0001' option.
-------------------------------------------------
It seems struct vfsmount is not defined. It can be fixed adding:
--------------------------------
#include <linux/mount.h>
--------------------------------
in top of file /usr/share/systemtap/runtime/procfs.c
-- System Information:
Debian Release: 7.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
systemtap-common depends on no packages.
Versions of packages systemtap-common recommends:
ii systemtap 1.7-1+deb7u1
systemtap-common suggests no packages.
-- no debconf information
--- /usr/share/systemtap/runtime/procfs.c.orig 2014-09-11 12:39:39.000000000 +0200
+++ /usr/share/systemtap/runtime/procfs.c 2014-09-11 12:39:19.000000000 +0200
@@ -21,6 +21,8 @@
#include <linux/pid_namespace.h>
#endif
+#include <linux/mount.h>
+
/* The maximum number of files AND directories that can be opened.
* It would be great if the translator would emit this based on the actual
* number of needed files.