This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/2538] New: probe module compilation fails on sles10


While getting systemtap to run on the latest version of suse sles10, I
ran into a strange (to me) problem - for some reason, another include
path gets inserted in between the -I and the
"/usr/local/share/systemtap/runtime" during the module build process.

Here's the relevant snippet from the full output (copied below):

-Werror -I -I/usr/src/linux-2.6.16-20060408024659/ 
"/usr/local/share/systemtap/runtime" -DMODULE

whereas it should be:

-Werror -I "/usr/local/share/systemtap/runtime" -DMODULE

The generated probe module Makefile looks fine:

CFLAGS += -Wno-unused -Werror
CFLAGS += -I "/usr/local/share/systemtap/runtime"
obj-m := stap_11901.o

but apparently the sles10 module build system doesn't like the space
between -I and "/usr/local/share/systemtap/runtime".

The following one-line patch removes the space and fixes the problem
for me (seems it couldn't hurt in any case), but I wonder why I
haven't seen this before; it may be a misconfiguration on my part,
but I've also heard from someone else that they had the same
problem.  I wouldn't have thought that a space would make any
difference - normally there isn't one with -I, but I don't really
know if there's a standard for this or not.  If it's a sles10 bug,
I'll close this one and file one over there.

--- buildrun.cxx.orig	2006-04-11 07:35:25.000000000 -0500
+++ buildrun.cxx	2006-04-11 09:00:47.000000000 -0500
@@ -72,7 +72,7 @@ compile_pass (systemtap_session& s)
 
   // Assumes linux 2.6 kbuild
   o << "CFLAGS += -Wno-unused -Werror" << endl;
-  o << "CFLAGS += -I \"" << s.runtime_path << "\"" << endl;
+  o << "CFLAGS += -I\"" << s.runtime_path << "\"" << endl;
   o << "obj-m := " << s.module_name << ".o" << endl;
 
   o.close ();


full output of stap -v -v -v add.stp:

Created temporary directory "/tmp/stapep1qBw"
Searched
'/usr/local/share/systemtap/tapset/2.6.16-20060408024659-smp/i686/*.stp', match
count 0
Searched '/usr/local/share/systemtap/tapset/2.6.16-20060408024659-smp/*.stp',
match count 0
Searched '/usr/local/share/systemtap/tapset/2.6.16/i686/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/2.6.16/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/2.6/i686/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/2.6/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/i686/*.stp', match count 1
Searched '/usr/local/share/systemtap/tapset/*.stp', match count 14
Pass 1: parsed user script and 15 library script(s) in 80usr/10sys/95real ms.
Eliding unused function warn
Eliding unused function exit
Eliding unused function error
Pass 2: analyzed script: 2 probe(s), 1 function(s), 3 global(s) in
10usr/0sys/2real ms.
Probe #0 locks x2[w] x1[w] 
Probe #1 locks x2[r] x1[r] x3[rw] 
Running grep " [tT] " /proc/kallsyms | sort -k 1,8 -s -o
/tmp/stapep1qBw/symbols.sorted
Pass 3: translated to C into "/tmp/stapep1qBw/stap_4229.c" in
40usr/50sys/102real ms.
Running make -C "/lib/modules/2.6.16-20060408024659-smp/build"
M="/tmp/stapep1qBw" modules V=1
make: Entering directory `/usr/src/linux-2.6.16-20060408024659-obj/i386/smp'
make -C ../../../linux-2.6.16-20060408024659
O=../linux-2.6.16-20060408024659-obj/i386/smp modules
make -C /usr/src/linux-2.6.16-20060408024659-obj/i386/smp \
KBUILD_SRC=/usr/src/linux-2.6.16-20060408024659 \
KBUILD_EXTMOD="/tmp/stapep1qBw" -f /usr/src/linux-2.6.16-20060408024659/Makefile
modules
rm -rf /tmp/stapep1qBw/.tmp_versions
mkdir -p /tmp/stapep1qBw/.tmp_versions
make -f /usr/src/linux-2.6.16-20060408024659/scripts/Makefile.build
obj=/tmp/stapep1qBw
  gcc -m32 -Wp,-MD,/tmp/stapep1qBw/.stap_4229.o.d  -nostdinc -isystem
/usr/lib/gcc/i586-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -Iinclude2
-I/usr/src/linux-2.6.16-20060408024659/include -include
/usr/src/linux-2.6.16-20060408024659-obj/i386/smp/include/linux/autoconf.h 
-I/tmp/stapep1qBw  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-Werror-implicit-function-declaration -fno-strict-aliasing -fno-common
-ffreestanding -Os -fomit-frame-pointer -pipe -msoft-float
-mpreferred-stack-boundary=2 -march=i586 -mtune=generic -mregparm=3
-Iinclude/asm-i386/mach-generic
-I/usr/src/linux-2.6.16-20060408024659/include/asm-i386/mach-generic
-Iinclude/asm-i386/mach-default
-I/usr/src/linux-2.6.16-20060408024659/include/asm-i386/mach-default
-Wdeclaration-after-statement -Wno-pointer-sign -Wno-unused -Werror -I
-I/usr/src/linux-2.6.16-20060408024659/ "/usr/local/share/systemtap/runtime"
-DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(stap_4229)" 
-D"KBUILD_MODNAME=KBUILD_STR(stap_4229)" -c -o /tmp/stapep1qBw/.tmp_stap_4229.o
/tmp/stapep1qBw/stap_4229.c
/tmp/stapep1qBw/stap_4229.c:29:21: error: runtime.h: No such file or directory
/tmp/stapep1qBw/stap_4229.c:30:21: error: current.c: No such file or directory
/tmp/stapep1qBw/stap_4229.c:31:19: error: stack.c: No such file or directory
/tmp/stapep1qBw/stap_4229.c:32:18: error: regs.c: No such file or directory
/tmp/stapep1qBw/stap_4229.c:38:28: error: loc2c-runtime.h: No such file or directory
/tmp/stapep1qBw/stap_4229.c: In function 'function_log':
/tmp/stapep1qBw/stap_4229.c:147: error: implicit declaration of function
'_stp_printf'
/tmp/stapep1qBw/stap_4229.c: In function 'probe_0':
/tmp/stapep1qBw/stap_4229.c:247: error: implicit declaration of function
'_stp_print_flush'
/tmp/stapep1qBw/stap_4229.c:255: error: implicit declaration of function '_stp_exit'
/tmp/stapep1qBw/stap_4229.c: In function 'enter_0_0':
/tmp/stapep1qBw/stap_4229.c:266: error: implicit declaration of function
'per_cpu_ptr'
/tmp/stapep1qBw/stap_4229.c:266: error: implicit declaration of function
'smp_processor_id'
cc1: warnings being treated as errors
/tmp/stapep1qBw/stap_4229.c:266: warning: assignment makes pointer from integer
without a cast
/tmp/stapep1qBw/stap_4229.c:286: error: implicit declaration of function
'_stp_softerror'
/tmp/stapep1qBw/stap_4229.c: In function 'enter_1_0':
/tmp/stapep1qBw/stap_4229.c:479: warning: assignment makes pointer from integer
without a cast
/tmp/stapep1qBw/stap_4229.c: In function 'register_probe_0':
/tmp/stapep1qBw/stap_4229.c:520: error: implicit declaration of function
'_stp_error'
/tmp/stapep1qBw/stap_4229.c: In function 'systemtap_module_init':
/tmp/stapep1qBw/stap_4229.c:547: error: implicit declaration of function
'alloc_percpu'
/tmp/stapep1qBw/stap_4229.c:547: error: expected expression before 'struct'
/tmp/stapep1qBw/stap_4229.c:547: warning: assignment makes pointer from integer
without a cast
/tmp/stapep1qBw/stap_4229.c: In function 'systemtap_module_exit':
/tmp/stapep1qBw/stap_4229.c:592: error: implicit declaration of function
'free_percpu'
/tmp/stapep1qBw/stap_4229.c:594: error: implicit declaration of function '_stp_warn'
/tmp/stapep1qBw/stap_4229.c: At top level:
/tmp/stapep1qBw/stap_4229.c:598: warning: function declaration isn't a prototype
/tmp/stapep1qBw/stap_4229.c:602: warning: function declaration isn't a prototype
/tmp/stapep1qBw/stap_4229.c:607: error: expected ')' before 'long'
/tmp/stapep1qBw/stap_4229.c:610: error: expected ')' before 'long'
/tmp/stapep1qBw/stap_4229.c:613: error: expected ')' before 'long'
/tmp/stapep1qBw/stap_4229.c:614: error: expected declaration specifiers or '...'
before string constant
/tmp/stapep1qBw/stap_4229.c:614: warning: data definition has no type or storage
class
/tmp/stapep1qBw/stap_4229.c:614: warning: type defaults to 'int' in declaration
of 'MODULE_DESCRIPTION'
/tmp/stapep1qBw/stap_4229.c:614: warning: function declaration isn't a prototype
/tmp/stapep1qBw/stap_4229.c:615: error: expected declaration specifiers or '...'
before string constant
/tmp/stapep1qBw/stap_4229.c:615: warning: data definition has no type or storage
class
/tmp/stapep1qBw/stap_4229.c:615: warning: type defaults to 'int' in declaration
of 'MODULE_LICENSE'
/tmp/stapep1qBw/stap_4229.c:615: warning: function declaration isn't a prototype
In file included from /tmp/stapep1qBw/stap_4229.c:618:
/tmp/stapep1qBw/stap-symbols.h:1: error: array type has incomplete element type
make[3]: *** [/tmp/stapep1qBw/stap_4229.o] Error 1
make[2]: *** [_module_/tmp/stapep1qBw] Error 2
make[1]: *** [modules] Error 2
make: *** [modules] Error 2
make: Leaving directory `/usr/src/linux-2.6.16-20060408024659-obj/i386/smp'
Pass 4: compiled C into "stap_4229.ko" in 390usr/100sys/481real ms.
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stapep1qBw

-- 
           Summary: probe module compilation fails on sles10
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: zanussi at us dot ibm dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=2538

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]