beegfs-client fails to build due to missing kernel source

1k views Asked by At

I'm trying to set up a Centos 7 server with the Beegfs-client. As part of the setup, I need to rebuild the client based on the kernel I'm running, however beegfs-client does not find the kernel sources:

After installing beegfs-client-7.1.5-el7.noarch on Centos 7, I'm trying to build it:

[root@someserver ~]# /etc/init.d/beegfs-client rebuild
- BeeGFS module autobuild
Makefile:117: *** Linux kernel build directory not found. Please check if the kernel module development packages are installed for the current kernel version. (RHEL: kernel-devel; SLES: linux-kernel-headers, kernel-source; Debian: linux-headers).  Stop.
make: *** [auto_rebuild] Error 2

OK, fair enough, let's install them, then:

[root@someserver ~]# yum install -y kernel-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.funet.fi
 * extras: ftp.funet.fi
 * updates: ftp.funet.fi
Package kernel-devel-3.10.0-1160.62.1.el7.x86_64 already installed and latest version
Nothing to do

Uh, OK? Do I need to copy the source (currently residing in /usr/src/kernels/3.10.0-1160.62.1.el7.x86_64) somewhere?

1

There are 1 answers

0
Jarmund On

Thanks to @Tsyvarev for pointing me in the right direction.

It was found that the symlink /lib/modules/3.10.0-1160.el7.x86_64/build was pointing to itself. The fix was to remove this, and replace it with the proper one: ln -s /usr/src/kernels/3.10.0-1160.62.1.el7.x86_64 /lib/modules/3.10.0-1160.el7.x86_64/build

After this the beegfs-client autobuild found the kernel source and worked fine.