[Lustre-discuss] Can't build sun rdac driver against lustre source.

Kilian CAVALOTTI kilian at stanford.edu
Fri Jul 25 11:23:21 PDT 2008


Hi Brock,

On Friday 25 July 2008 11:03:12 am Brock Palen wrote:
> I just had to copy  genksyms and mod from
> linux-2.6.9-67.0.7.EL_lustre.1.6.5.1 to linux-2.6.9-67.0.7.EL_lustre.
> 1.6.5.1-obj
>
> I figured you should be aware of this, if its a problem with sun's
> build system for their multipath driver or lustre source package.
> This is on RHEL4.  Using the lustre RPM's form sun's website.

It's a problem with the fact that Lustre kernels for RHEL4 are packaged 
the SuSE way, with a /usr/src/linux-$VERSION-$RELEASE/ and a 
/usr/src/linux-$VERSION-$RELEASE-obj/$ARCH/$FLAVOR/ directory holding 
the object files. Whereas RHEL4 expects everything to be located in 
/usr/src/linux-$VERSION-$RELEASE/.

A workaround this is to put the .config file into the kernel sources 
directory, and prepare the kernel tree manually.

What I usually do is the following (this is for Lustre 1.6.5.1):

# rm /lib/modules/2.6.9-67.0.7.EL_lustre.1.6.5.1smp/build
# ln -s /usr/src/linux-2.6.9-67.0.7.EL_lustre.1.6.5.1 /lib/modules/2.6.9-67.0.7.EL_lustre.1.6.5.1smp/build
# cp  /usr/src/linux-2.6.9-67.0.7.EL_lustre.1.6.5.1-obj/x86_64/smp/.config /usr/src/linux-2.6.9-67.0.7.EL_lustre.1.6.5.1/
# cd  /usr/src/linux-2.6.9-67.0.7.EL_lustre.1.6.5.1/
# [edit Makefile, and replace 'custom' by 'smp' in EXTRAVERSION]
# make oldconfig
# make modules_prepare

And then, you should be able to compile any additional kernel module.

> The next problem I am stuck on is:
>
> In file included from mppLnx26_spinlock_size.c:51:
> /usr/include/linux/autoconf.h:1:2: #error Invalid kernel header
> included in userspace
> mppLnx26_spinlock_size.c: In function `main':
> mppLnx26_spinlock_size.c:102: error: `spinlock_t' undeclared (first
> use in this function)

Can't be sure it will fix this problem too, but it may be worth a try.

Cheers,
-- 
Kilian



More information about the lustre-discuss mailing list