cancel
Showing results for 
Search instead for 
Did you mean: 

Drivers & Software

kiroma
Journeyman III

Can't compile AMDPowerDriver on Linux 5.6.12 - implicit function declaration error

I'm on OpenSUSE Tumbleweed and I just tired to install the AMDPowerDriver through the install script. The compilation process however failed due to the following:

/usr/src/AMDPowerProfiler-8.00/src/PwrDriverUtils.c: In function ‘HelpMapMMIOSpace’:
/usr/src/AMDPowerProfiler-8.00/src/PwrDriverUtils.c:316:30: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
  316 |     *mappedAddress = (uint64)ioremap(address, size);
      |                              ^~~~~~~
/usr/src/AMDPowerProfiler-8.00/src/PwrDriverUtils.c: In function ‘HelpUnmapMMIOSpace’:
/usr/src/AMDPowerProfiler-8.00/src/PwrDriverUtils.c:325:5: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
  325 |     iounmap((void*)mappedAddress);
      |     ^~~~~~~
cc1: some warnings being treated as errors
0 Likes
1 Reply
kiroma
Journeyman III

Re: Can't compile AMDPowerDriver on Linux 5.6.12 - implicit function declaration error

Looks like it's just missing #include <linux/io.h>

Unfortunately there are more errors ahead:

/home/kiroma/AMDPowerProfiler-8.00/src/PwrProfModule.c: In function ‘PwrProfInitModule’:
/home/kiroma/AMDPowerProfiler-8.00/src/PwrProfModule.c:207:51: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  207 |                             Entries[entry_created].proc_fops);
      |                             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
      |                                                   |
      |                                                   const struct file_operations *
In file included from /home/kiroma/AMDPowerProfiler-8.00/src/PwrProfModule.c:16:
/usr/src/linux-5.6.12-1/include/linux/proc_fs.h:64:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
   64 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
      |                        ^~~~~~~~~~~
0 Likes