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

Vtune kernel driver, build error "Failed to build the drivers"

MickeJ-IUA
Novice
1,840 Views

Building the sepdk driver fails, below is my terminal output.

./build-driver --enable-config-check

C compiler to use: [ /sbin/gcc ]
C compiler version: 13.2.1

Make command to use: [ /sbin/make ]
Make version: 4.4.1

Kernel source directory: [ /lib/modules/6.8.1-1418.native/build ]
Kernel version: 6.8.1-1418

Cleaning workspaces ...
Done

Building socperf driver ...
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:214:13: warning: no previous prototype for ‘SOCPERF_Read_Data3’ [-Wmissing-prototypes]
214 | extern VOID SOCPERF_Read_Data3(PVOID data_buffer)
| ^~~~~~~~~~~~~~~~~~
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:997:11: warning: no previous prototype for ‘SOCPERF_Switch_Group3’ [-Wmissing-prototypes]
997 | OS_STATUS SOCPERF_Switch_Group3(VOID)
| ^~~~~~~~~~~~~~~~~~~~~
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:1182:13: warning: no previous prototype for ‘lwpmudrv_Stop_Mem’ [-Wmissing-prototypes]
1182 | extern VOID lwpmudrv_Stop_Mem(VOID)
| ^~~~~~~~~~~~~~~~~
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:1400:1: warning: no previous prototype for ‘socperf_Service_IOCTL’ [-Wmissing-prototypes]
1400 | socperf_Service_IOCTL(IOCTL_USE_INODE struct file *filp,
| ^~~~~~~~~~~~~~~~~~~~~
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:1525:1: warning: no previous prototype for ‘socperf_Device_Control’ [-Wmissing-prototypes]
1525 | socperf_Device_Control(IOCTL_USE_INODE struct file *filp,
| ^~~~~~~~~~~~~~~~~~~~~~
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:1562:1: warning: no previous prototype for ‘socperf_Device_Control_Compat’ [-Wmissing-prototypes]
1562 | socperf_Device_Control_Compat(struct file *filp,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:1614:12: warning: no previous prototype for ‘SOCPERF_Abnormal_Terminate’ [-Wmissing-prototypes]
1614 | extern int SOCPERF_Abnormal_Terminate(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./arch/x86/include/asm/mem_encrypt.h:15,
from ./include/linux/mem_encrypt.h:17,
from ./arch/x86/include/asm/processor-flags.h:6,
from ./arch/x86/include/asm/processor.h:5,
from ./arch/x86/include/asm/timex.h:5,
from ./include/linux/timex.h:67,
from ./include/linux/time32.h:13,
from ./include/linux/time.h:60,
from ./include/linux/stat.h:19,
from ./include/linux/module.h:13,
from /home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:61:
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c: In function ‘socperf_Load’:
./include/linux/init.h:184:22: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
184 | #define THIS_MODULE (&__this_module)
| ~^~~~~~~~~~~~~~~
| |
| struct module *
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:1738:34: note: in expansion of macro ‘THIS_MODULE’
1738 | pmu_class = class_create(THIS_MODULE, SOCPERF_DRIVER_NAME);
| ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
from ./include/linux/cdev.h:8,
from /home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:69:
./include/linux/device/class.h:228:54: note: expected ‘const char *’ but argument is of type ‘struct module *’
228 | struct class * __must_check class_create(const char *name);
| ~~~~~~~~~~~~^~~~
/home/ello/Apps/sepdk/src/socperf/src/socperfdrv.c:1738:21: error: too many arguments to function ‘class_create’
1738 | pmu_class = class_create(THIS_MODULE, SOCPERF_DRIVER_NAME);
| ^~~~~~~~~~~~
./include/linux/device/class.h:228:29: note: declared here
228 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /home/ello/Apps/sepdk/src/socperf/src/socperfdrv.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1921: /home/ello/Apps/sepdk/src/socperf/src] Error 2
make[1]: *** [Makefile:145: default] Error 2
make: *** [Makefile:215: default] Error 2

Failed to build the drivers

 

 

1 Solution
yuzhang3_intel
Moderator
1,656 Views

A similar issue was reported in the forum, we are investigating now. VTune should work if you don't care about power metrics. SoCWatch driver is for power measurement.

View solution in original post

0 Kudos
6 Replies
yuzhang3_intel
Moderator
1,754 Views

Could you provide the platform and VTune release information? BTW, the public 2024.1 is released, please try with the latest version, thanks.

0 Kudos
MickeJ-IUA
Novice
1,723 Views

Thank you. I am using Linux.

 

I download "sepdk.tar.gz" from the Intel Webpage Intel® VTune™ Profiler Sampling Driver Downloads

This documentation page with ID nr 657847 states it was updated 1/23/2024

Tell me if this driver download link is correct.

0 Kudos
yuzhang3_intel
Moderator
1,697 Views

After you install VTune Profiler, the driver source is there as below, you can build the source, don't need to download from web page.

/opt/intel/oneapi/vtune/latest/sepdk

 

Following the steps in the link to build your driver.

https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2024-0/build-install-sampling-drivers-for-linux-targets.html#GUID-CC4C2F86-21A6-402A-97B0-3DA1FFD2C8F4

 

 

0 Kudos
MickeJ-IUA
Novice
1,666 Views

Thank you. The documentation page you refer to has a note:

NOTE:

If the current version of the sampling driver that is shipped with the VTune Profiler installation does not suit your needs, for example, due to a recent change in the Linux* kernel, you can find the latest version of the sampling driver on the Sampling Driver Downloads page.

 

When compilation failed i followed the note in the installation documentation you referred to. quote "you can find the latest version of the sampling driver on the Sampling Driver Downloads page." If the latest version is not there you need to correct the documentation.

 

After upgrading and testing again building one of the drivers failed.


ERROR: Failed to build socwatch2_15-x32_64-6.8.2-1420.nativesmp.ko driver

 

I post the complete build log in the attached txt file.

0 Kudos
yuzhang3_intel
Moderator
1,657 Views

A similar issue was reported in the forum, we are investigating now. VTune should work if you don't care about power metrics. SoCWatch driver is for power measurement.

0 Kudos
MickeJ-IUA
Novice
1,645 Views

Ok 

 

i will proceed without the power measurement driver

 

Thank you

0 Kudos
Reply