Bug 14220 - stap failes with "error: ‘cpu_possible_map’ undeclared" in function ‘_stp_stat_get’
Summary: stap failes with "error: ‘cpu_possible_map’ undeclared" in function ‘_stp_sta...
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-11 11:36 IST by henrypepr
Modified: 2012-06-11 15:22 IST (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description henrypepr 2012-06-11 11:36:37 IST
$ stap -v
Systemtap translator/driver (version 1.7/0.153 non-git sources)
Copyright (C) 2005-2012 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBRPM LIBSQLITE3 NSS BOOST_SHARED_PTR TR1_UNORDERED_MAP NLS

$ which stap:
 /bin/stap

$ env
XDG_SESSION_ID=2
HOSTNAME=fedora17
SELINUX_ROLE_REQUESTED=
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
SELINUX_USE_CURRENT_RANGE=
SSH_TTY=/dev/pts/0
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:*.pdf=00;33:*.ps=00;33:*.ps.gz=00;33:*.txt=00;33:*.patch=00;33:*.diff=00;33:*.log=00;33:*.tex=00;33:*.xls=00;33:*.xlsx=00;33:*.ppt=00;33:*.pptx=00;33:*.rtf=00;33:*.doc=00;33:*.docx=00;33:*.odt=00;33:*.ods=00;33:*.odp=00;33:*.xml=00;33:*.epub=00;33:*.abw=00;33:*.html=00;33:*.wpd=00;33:
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin
LANG=en_US.UTF-8
SELINUX_LEVEL_REQUESTED=
HISTCONTROL=ignoredups
SHLVL=1
LESSOPEN=||/usr/bin/lesspipe.sh %s
XDG_RUNTIME_DIR=/run/user/cadm
_=/bin/env


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.7.0/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --disable-build-with-cxx --disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC) 

$ sudo stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
Pass 1: parsed user script and 82 library script(s) using 25764virt/13740res/2476shr kb, in 150usr/50sys/199real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 3 embed(s), 0 global(s) using 208880virt/83384res/6632shr kb, in 1900usr/390sys/2399real ms.
Pass 3: translated to C into "/tmp/stapR6GZtP/stap_fc15a8ea37f2bef216b13729a4066086_1389_src.c" using 204312virt/81444res/5432shr kb, in 10usr/10sys/15real ms.
In file included from /tmp/stapR6GZtP/stap_fc15a8ea37f2bef216b13729a4066086_1389_src.c:21:0:
/usr/share/systemtap/runtime/stat.c: In function ‘_stp_stat_get’:
/usr/share/systemtap/runtime/stat.c:214:2: error: ‘cpu_possible_map’ undeclared (first use in this function)
/usr/share/systemtap/runtime/stat.c:214:2: note: each undeclared identifier is reported only once for each function it appears in
/usr/share/systemtap/runtime/stat.c: In function ‘_stp_stat_clear’:
/usr/share/systemtap/runtime/stat.c:249:2: error: ‘cpu_possible_map’ undeclared (first use in this function)
make[1]: *** [/tmp/stapR6GZtP/stap_fc15a8ea37f2bef216b13729a4066086_1389_src.o] Error 1
make: *** [_module_/tmp/stapR6GZtP] Error 2
WARNING: make exited with status: 2
Pass 4: compiled C into "stap_fc15a8ea37f2bef216b13729a4066086_1389.ko" in 5570usr/3560sys/10479real ms.
Pass 4: compilation failed.  Try again with another '--vp 0001' option.

$ uname -a
Linux fedora17 3.4.0-1.fc17.i686.PAE #1 SMP Sun Jun 3 06:54:54 UTC 2012 i686 i686 i386 GNU/Linux

$ (from dmesg):
[    0.000000] Linux version 3.4.0-1.fc17.i686.PAE (mockbuild@x86-02.phx2.fedoraproject.org) (gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC) ) #1 SMP Sun Jun 3 06:54:54 UTC 2012
[    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.4.0-1.fc17.i686.PAE root=/dev/mapper/vg_fedora17-lv_root ro rd.md=0 rd.dm=0 KEYTABLE=XX rd.lvm.lv=vg_fedora17/lv_swap rd.lvm.lv=vg_fedora17/lv_root rd.luks=0 SYSFONT=True LANG=en_US.UTF-8 rhgb quiet

$ Machine architecture
i686 in KVM, for some reason with PAE.

$  rpm -qa --qf %{name}-%{version}-%{release}.%{arch}\\n | egrep 'systemtap|elfutils|kernel|gcc' | sort
abrt-addon-kerneloops-2.0.10-4.fc17.i686
elfutils-0.153-2.fc17.i686
elfutils-libelf-0.153-2.fc17.i686
elfutils-libs-0.153-2.fc17.i686
gcc-4.7.0-5.fc17.i686
gcc-c++-4.7.0-5.fc17.i686
gcc-gfortran-4.7.0-5.fc17.i686
kernel-debuginfo-3.4.0-1.fc17.i686
kernel-debuginfo-common-i686-3.4.0-1.fc17.i686
kernel-devel-3.3.4-5.fc17.i686
kernel-devel-3.4.0-1.fc17.i686
kernel-headers-3.4.0-1.fc17.i686
kernel-PAE-3.3.4-5.fc17.i686
kernel-PAE-3.4.0-1.fc17.i686
kernel-PAE-debuginfo-3.4.0-1.fc17.i686
kernel-PAE-devel-3.3.4-5.fc17.i686
kernel-PAE-devel-3.4.0-1.fc17.i686
libgcc-4.7.0-5.fc17.i686
libreport-plugin-kerneloops-2.0.10-3.fc17.i686
systemtap-1.7-7.fc17.i686
systemtap-client-1.7-7.fc17.i686
systemtap-devel-1.7-7.fc17.i686
systemtap-runtime-1.7-7.fc17.i686


Fedora release 17 (Beefy Miracle)
Comment 1 Frank Ch. Eigler 2012-06-11 15:22:08 IST
commit e14ac0e solved this problem.