Bug 200687 - Inconsistent directory structure for /usr/src/kernel/2.6.17-1.2462.fc6-xen-x86_64
Inconsistent directory structure for /usr/src/kernel/2.6.17-1.2462.fc6-xen-x8...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel-xen (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Juan Quintela
Virtualization Bugs
:
Depends On:
Blocks: 202095 202993
  Show dependency treegraph
 
Reported: 2006-07-30 17:10 EDT by William Cohen
Modified: 2009-12-14 15:38 EST (History)
3 users (show)

See Also:
Fixed In Version: 2.6.18-8.1.6.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-12 10:27:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description William Cohen 2006-07-30 17:10:42 EDT
Description of problem:

The directory structure used for /usr/src/kernel/2.6.17-1.2462.fc6-xen-x86_64
doesn't match the directory structure used for other kernel-devel packages. This
prevents third party modules, e.g. systemtap modules from building.


Version-Release number of selected component (if applicable):

kernel-xen-devel-2.6.17-1.2462.fc6

How reproducible:

Always

Steps to Reproduce:
1. Have system running kernel-xen. Also have kernel-xen-devel,
kernel-xen-debuginfo, and systemtap installed installed.
2. As root attempt to run a simple hello world systemtap script.

 /usr/bin/stap -vv -e 'probe begin { log ("hello world") }'

  
Actual results:

Created temporary directory "/tmp/stapz5uekT"
Searched '/usr/share/systemtap/tapset/2.6.17-1.2462.fc6xen/x86_64/*.stp', match
count 0
Searched '/usr/share/systemtap/tapset/2.6.17-1.2462.fc6xen/*.stp', match count
0Searched '/usr/share/systemtap/tapset/2.6.17/x86_64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/2.6.17/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/2.6/x86_64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/2.6/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/x86_64/*.stp', match count 1
Searched '/usr/share/systemtap/tapset/*.stp', match count 26
Searched '/usr/share/systemtap/tapset/LKET/2.6.17-1.2462.fc6xen/x86_64/*.stp',
match count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6.17-1.2462.fc6xen/*.stp', match
count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6.17/x86_64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6.17/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6/x86_64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/x86_64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/*.stp', match count 13
Pass 1: parsed user script and 40 library script(s) in 80usr/0sys/103real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 global(s) in
20usr/0sys/2real ms.
probe_732 locks nothing
Running grep " [tT] " /proc/kallsyms | sort -k 1,16 -s -o
/tmp/stapz5uekT/symbols.sorted
Pass 3: translated to C into "/tmp/stapz5uekT/stap_4110.c" in
50usr/60sys/120real ms.
Running make -C "/lib/modules/2.6.17-1.2462.fc6xen/build" M="/tmp/stapz5uekT"
modules V=1
make: Entering directory `/usr/src/kernels/2.6.17-1.2462.fc6-xen-x86_64'
make: *** No rule to make target `modules'.  Stop.
make: Leaving directory `/usr/src/kernels/2.6.17-1.2462.fc6-xen-x86_64'
Pass 4: compiled C into "stap_4110.ko" in 10usr/0sys/9real ms.
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stapz5uekT
[wcohen@localhost ~]$



Expected results:

Script runs and prints out "hello, world"




Additional info:

The xen kernel src directory has the needed code for building the module in the
build subdirectory:

$ ls /usr/src/kernels/2.6.17-1.2462.fc6-xen-x86_64/
build  xen

$ ls /usr/src/kernels/2.6.17-1.2462.fc6-xen-x86_64/build
arch    drivers  init    lib       Module.symvers  security
block   fs       ipc     Makefile  net             sound
crypto  include  kernel  mm        scripts         usr

While the matching non-virtualized kernel has the build directory right there:

$ ls /usr/src/kernels/2.6.17-1.2462.fc6-x86_64/
arch    drivers  init    lib       Module.symvers  security
block   fs       ipc     Makefile  net             sound
crypto  include  kernel  mm        scripts         usr
Comment 1 William Cohen 2006-07-31 15:11:02 EDT
Removed the old build symlink in  /lib/modules/2.6.17-1.2462.fc6xen. Then made a
new symlink:

ln -s  ../../../usr/src/kernels/2.6.17-1.2462.fc6-xen-x86_64/build build

Also had to deal with bz#197220

cd /usr/src/kernels/2.6.17-1.2462.fc6-xen-x86_64/build
touch include/config/auto.conf

This allowed the very simple systemtap script to run:

/usr/bin/stap -vv -e 'probe begin { log("hello, world"); }'

The change in the symbolic link and touching the include/config/auto.conf allow
the systemtap testsuite to run on a xen kernel.

Comment 2 Red Hat Bugzilla 2007-07-24 21:32:13 EDT
change QA contact
Comment 5 William Cohen 2007-09-12 10:35:02 EDT
Checked to make sure that this bug doesn't affect RHEL5. RHEL5 works fine on the
2.6.18-8.1.6el5-xen-i686. It looks like the problem has been resolved in the
newer versions.

Note You need to log in before you can comment on or make changes to this bug.