AnsweredAssumed Answered

AMDPowerProfilerDriver 7.02 fails to compile on Linux with kernel 4.19.27

Question asked by rubin55 on May 10, 2019
Latest reply on Aug 23, 2019 by aalok

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 [M] /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/ /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!