Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5106 Discussions

Error building vdk driver on linux

achakraborty
Beginner
619 Views
Hi,

I run make prepare and make scripts in the kenel source dirs, as documented in the README. But still I can't build the vdk driver for either 2.6.24.7 or 2.6.30-rc4 kernel. I get following errors for 2.6.24.7:
/usr/bin/make "V=0" -C /lib/modules/2.6.24.7/build SUBDIRS=/home/anirban/ptu32_001_lin_intel64/vdk/src modules
make[1]: Entering directory `/home/anirban/linux-2.6.24.7'
CC /home/anirban/ptu32_001_lin_intel64/vdk/src/vtune.o
CC /home/anirban/ptu32_001_lin_intel64/vdk/src/random.o
CC /home/anirban/ptu32_001_lin_intel64/vdk/src/pcg.o
CC /home/anirban/ptu32_001_lin_intel64/vdk/src/per_cpu_buffer.o
CC /home/anirban/ptu32_001_lin_intel64/vdk/src/os_dependent.o
CC /home/anirban/ptu32_001_lin_intel64/vdk/src/user_status.o
CC /home/anirban/ptu32_001_lin_intel64/vdk/src/plugin.o
CC /home/anirban/ptu32_001_lin_intel64/vdk/src/utility.o
CC /home/anirban/ptu32_001_lin_intel64/vdk/src/vtlib32_64.o
/home/anirban/ptu32_001_lin_intel64/vdk/src/vtlib32_64.c: In function get_node_id:
/home/anirban/ptu32_001_lin_intel64/vdk/src/vtlib32_64.c:787: error: implicit declaration of function phys_to_nid
make[2]: *** [/home/anirban/ptu32_001_lin_intel64/vdk/src/vtlib32_64.o] Error 1
make[1]: *** [_module_/home/anirban/ptu32_001_lin_intel64/vdk/src] Error 2
make[1]: Leaving directory `/home/anirban/linux-2.6.24.7'
make: *** [default] Error 2

And I can't even go this far when I try to build it for 2.6.30-rc4. I get following errors right at the beginning:
checking for template makefile ... Makefile.in
checking for kernel headers ... /usr/src/linux-2.6.30-rc4/include
checking if C compiler is working ... yes
checking if C compiler supports anonymous structs and unions ... yes
checking architecture ... x86_64
checking kernel version ... 2.6.30-rc4
checking whether kernel modules can be built ... no
**
** ERROR: unable to build kernel module
**
** The kernel headers in /usr/src/linux-2.6.30-rc4
** are either inaccessible or not (properly) configured.
**
** The kernel headers must be accessible and configured prior
** to building the sampling driver (or any kernel module).
**
** Please see VDK doc/HOWTO-BUILD-VTUNE-DRIVER for help in
** preparing a kernel environment suitable for building the
** sampling driver.

Any help will be highly appreacited.
Thanks,

Anirban
0 Kudos
2 Replies
Peter_W_Intel
Employee
619 Views

Hi Anirban,

I suspect that PTU3.2 is too old - which can't support latest OSs and latest Intel processors.

Ihaven't seenin release notes thatlatest product can support kernel2.6.30-RC4, itmay not be tested! But it can support 2.6.27.5-117.fc10

Also make sure that you installed kernel source (consistent with running OS version)properly first. Then pay attention below in HOWTO-BUILD-VTUNE-DRIVER: (for example, you are working on not claimed supporting OS)

For 2.6-based kernels, the kernel sources can be configured as follows:

# boot into the kernel you wish to build driver for
# and make sure the kernel source tree is placed in
# /usr/src/linux-`uname -r`
#
cd /usr/src/linux-`uname -r`
vi Makefile # set EXTRAVERSION to a value corresponding to `uname -r`
make mrproper
cp /boot/config-`uname -r` .config
make oldconfig
make prepare
make scripts

Good luck!

Regards, Peter

0 Kudos
David_A_Intel1
Employee
619 Views
Anirban:

Please remember that PTU is supported on the whatif.intel.com forums. This forum is for the VTune analyzer and it's features.

0 Kudos
Reply