As part of the installation of uProf 2.0 on Red Hat Enterprise 7.5, I am running into this error message when I attempt to install the Power Profiler Linux Driver. (I downloaded the tar ball rather than trying the RPM.)
The User Guide for version 2.0 says to run
sudo AMDPowerProfilerDriver.sh install
I am running as root in any case...
When I run the command above, I get the following message:
ERROR: Linux headers is required for installing AMD Power Profiler driver.
Please install the sources using
sudo yum install kernel-devel
and then start the installation again.
[root@localhost bin]#
But I have installed these already:
[root@localhost bin]# sudo yum install kernel-devel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Package kernel-devel-3.10.0-957.5.1.el7.x86_64 already installed and latest version
Nothing to do
Taking a look at the install script itself, the issue occurs at a point where the script checks for the existence of a directory; see verify_kernel_header() below. Since uname -r returns 3.10.0-862.el7.x86_64, we expect a directory /lib/modules/3.10.0-862.el7.x86_64/build to exist. It does:
[root@localhost bin]# ls -la /lib/modules/3.10.0-862.el7.x86_64/build
lrwxrwxrwx. 1 root root 38 Jan 5 22:00 /lib/modules/3.10.0-862.el7.x86_64/build -> /usr/src/kernels/3.10.0-862.el7.x86_64
I can verify that it is looking at /lib/modules/3.10.0-862.el7.x86_64/build
So... why is this failing??
Hi alvaroafernandez,
Thanks for reporting this issue. We will fix this issue in the next release of uProf.
Thanks,
Swarup
Hello SWARUP,
I have the same problem and I am using version 3.3 of AMD uProf. I did not use the installer instead I downloaded the tarball and extracted it to the root directory of a machine running CentOS 8 using an AMD Ryzen 3950X CPU. Please help.
Hi tg_l3harris,
One of the reasons could be that the kernel headers are not installed. Could you please check and let us know the following details.
1. Get the kernel version, using command ‘uname -r’
2. Check if there is a folder under /usr/src/kernel/<kernel-version>
Example
$ls /usr/src/kernel/4.18.0-193.19.1.el8_2.x86_64
Note:- The kernel-version folder name should exactly match with ‘uname -r’ output.
3. Kernel headers are located at /usr/src/kernels/4.18.0-193.19.1.el8_2.x86_64 and if it is not present, needs to be installed to build uProf.
Hi tg_l3harris,
After installing kernel-headers, you might need to install few more dependencies. Usually those missing dependencies shown during compilation. Please share the compilation errors you are getting.
Hello swarup,
Success! I installed other dependencies and then the profile driver. Thank you for your help.
Hi tg_l3harris,
Good to know that you are able to install it now. Feel free to let us know your feedback and queries.