cancel
Showing results for 
Search instead for 
Did you mean: 

Server Gurus Discussions

rubin55
Journeyman III

AMDPowerProfilerDriver 7.02 fails to compile on Linux with kernel 4.19.27

When trying to compile AMDPowerProfiler-7.02 on Linux (kernel 4.19.27), I get the following error:

THINK /usr/src/AMDPowerProfiler-7.02 # make
make -C /lib/modules/4.19.27-gentoo-r1-safe/build M=/usr/src/AMDPowerProfiler-7.02 EXTRA_CFLAGS="-I/usr/src/AMDPowerProfiler-7.02/inc -DKERNEL_MODULE -DLINUX -D_LINUX " modules
make[1]: Entering directory '/usr/src/linux-4.19.27-gentoo-r1'
CC /usr/src/AMDPowerProfiler-7.02/src/PwrProfCoreUtils.o
In file included from /usr/src/AMDPowerProfiler-7.02/inc/PwrProfCoreUtils.h:12,
from /usr/src/AMDPowerProfiler-7.02/src/PwrProfCoreUtils.c:9:
./arch/x86/include/asm/ftrace.h: In function ‘arch_syscall_match_sym_name’:
./arch/x86/include/asm/ftrace.h:58:10: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
return !strcmp(sym + 3, name + 3) ||
^~~~~~
./arch/x86/include/asm/ftrace.h:59:5: error: implicit declaration of function ‘strncmp’ [-Werror=implicit-function-declaration]
(!strncmp(sym, "__x64_", 6) && !strcmp(sym + 9, name + 3)) ||
^~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:304: /usr/src/AMDPowerProfiler-7.02/src/PwrProfCoreUtils.o] Error 1
make[1]: *** [Makefile:1520: _module_/usr/src/AMDPowerProfiler-7.02] Error 2
make[1]: Leaving directory '/usr/src/linux-4.19.27-gentoo-r1'
make: *** [Makefile:56: all] Error 2

I can imagine a <string.h> missing somewhere, but since this is a kernel module, I'm not sure if including /usr/include/string.h is such a good idea and/or where that should be done. Any help appreciated!

3 Replies
arjun
Staff

Please add "#include "../linux/string.h" at the beginning of the following file

/usr/src/linux-headers-`uname -r`/arch/x86/include/asm/ftrace.h

0 Likes
prithvi5
Journeyman III

Try the strncmp man page:

#include <string.h>

0 Likes
aalok
Staff

Hi,

 

Thanks for using uProf and apologies for the delay in response.
This failure is observed as uProf-2.0 failed to build a linux device driver with Kernel header (version 4.19). In uProf v3.1 we have added the support to accommodate changes made for kernel v 4.19. Please use the latest binaries located at https://developer.amd.com/amd-uprof/.

Please let us know if you face any issues.

 

Regards, 

Aalok Agarwal

AMDuProf Team