[lustre-discuss] Kernel Module Build

Andreas Dilger adilger at whamcloud.com
Thu Jan 10 15:15:41 PST 2019


On Jan 10, 2019, at 15:29, Tauferner, Andrew T <andrew.t.tauferner at intel.com> wrote:
> 
> Yes.  Here's the proof:
> 
> attaufer at head-2:~/lustre-release> sh autogen.sh && ./configure --with-linux=/nfshome/attaufer/kernel/usr/src/kernels/4.14.54-mos-tc3-20181113
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... x86_64-unknown-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether make supports nested variables... yes
> 
> <snip>
> 
> config.status: config.h is unchanged
> config.status: executing depfiles commands
> config.status: executing libtool commands

Does the configure output show lustre.spec being created?  You can also
check in config.log:

    $ grep "\.spec" config.log
    config.status:1548: creating lustre.spec
    config.status:1548: creating lustre-dkms.spec

If it was created, as requested in my previous email, did you check if
the lustre.spec file was included into the lustre-2.12.0.tar.gz file
(that file is created by rpmbuild during the "make rpms" process)?

    $ tar tzvf lustre-2.12.0.tar.gz | grep "\.spec"

> Type 'make' to build Lustre.
> attaufer at head-2:~/lustre-release> make rpms
> make  dist-gzip am__post_remove_distdir='@:'
> make[1]: Entering directory '/nfshome/attaufer/lustre-release'
> if test -d "lustre-2.12.0"; then find "lustre-2.12.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "lustre-2.12.0" || { sleep 5 && rm -rf "lustre-2.12.0"; }; else :; fi
> test -d "lustre-2.12.0" || mkdir "lustre-2.12.0"
> (cd ldiskfs && make  top_distdir=../lustre-2.12.0 distdir=../lustre-2.12.0/ldiskfs \
>     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
> make[2]: Entering directory '/nfshome/attaufer/lustre-release/ldiskfs'
> make[2]: Leaving directory '/nfshome/attaufer/lustre-release/ldiskfs'
> (cd lustre-iokit && make  top_distdir=../lustre-2.12.0 distdir=../lustre-2.12.0/lustre-iokit \

I don't think we need this whole spew each time...  Usually the errors
are in the last 20 or so lines.

You never really mentioned it, but what distro are you using?  I've recently built on both RHEL6 and RHEL7 using this process without problems (the build mechanism for the full release packages is somewhat different and more complex), so it seems likely that there is something strange with your environment.

Based on the 4.14 kernel, I'd assume RHEL7.5 alt?  Any strange RPM macros that might be affecting the build?  Have you tried on a different system?

Cheers, Andreas

> tardir=lustre-2.12.0 && false | GZIP=--best gzip -c >lustre-2.12.0.tar.gz
> make[1]: Leaving directory '/nfshome/attaufer/lustre-release'
> if test -d "lustre-2.12.0"; then find "lustre-2.12.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "lustre-2.12.0" || { sleep 5 && rm -rf "lustre-2.12.0"; }; else :; fi
> rpmbuilddir=`mktemp -t -d rpmbuild-lustre-$USER-XXXXXXXX`; \
> make  \
>        rpmbuilddir="$rpmbuilddir" rpm-local || exit 1; \
> cp ./rpm/* .; \
> /usr/bin/rpmbuild \
>        --define "_tmppath $rpmbuilddir/TMP" \
>        --define "_topdir $rpmbuilddir" \
>        --define "dist %{nil}" \
>        -ts lustre-2.12.0.tar.gz || exit 1; \
> cp $rpmbuilddir/SRPMS/lustre-2.12.0-*.src.rpm . || exit 1; \
> rm -rf $rpmbuilddir
> make[1]: Entering directory '/nfshome/attaufer/lustre-release'
> make[1]: Leaving directory '/nfshome/attaufer/lustre-release'
> error: Failed to read spec file from lustre-2.12.0.tar.gz
> autoMakefile:1189: recipe for target 'srpm' failed

> make: *** [srpm] Error 1
> 
> Andrew Tauferner
> 1-952-562-4944 (office)
> 
> -----Original Message-----
> From: Andreas Dilger [mailto:adilger at whamcloud.com] 
> Sent: Thursday, January 10, 2019 3:39 PM
> To: Tauferner, Andrew T <andrew.t.tauferner at intel.com>
> Cc: Degremont, Aurelien <degremoa at amazon.com>; lustre-discuss at lists.lustre.org
> Subject: Re: [lustre-discuss] Kernel Module Build
> 
> Did you run "sh autogen.sh && ./configure" before your "make rpms"?  The lustre.spec file should be generated by configure.  You can check this before running the "make rpms", and check the tarball to see if it is included. 
> 
> Cheers, Andreas
> 
>> On Jan 10, 2019, at 14:19, Tauferner, Andrew T <andrew.t.tauferner at intel.com> wrote:
>> 
>> Hmm.  Same error with v2_12_0.  It would seem that the 4.14 kernel isn't the issue.
>> 
>> attaufer at head-2:~/lustre-release> git status
>> On branch 2.12.0
>> nothing to commit, working tree clean
>> attaufer at head-2:~/lustre-release> make rpms
>> make  dist-gzip am__post_remove_distdir='@:'
>> make[1]: Entering directory '/nfshome/attaufer/lustre-release'
>> :
>> tardir=lustre-2.12.0 && false | GZIP=--best gzip -c >lustre-2.12.0.tar.gz
>> make[1]: Leaving directory '/nfshome/attaufer/lustre-release'
>> if test -d "lustre-2.12.0"; then find "lustre-2.12.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "lustre-2.12.0" || { sleep 5 && rm -rf "lustre-2.12.0"; }; else :; fi
>> rpmbuilddir=`mktemp -t -d rpmbuild-lustre-$USER-XXXXXXXX`; \
>> make  \
>>       rpmbuilddir="$rpmbuilddir" rpm-local || exit 1; \
>> cp ./rpm/* .; \
>> /usr/bin/rpmbuild \
>>       --define "_tmppath $rpmbuilddir/TMP" \
>>       --define "_topdir $rpmbuilddir" \
>>       --define "dist %{nil}" \
>>       -ts lustre-2.12.0.tar.gz || exit 1; \
>> cp $rpmbuilddir/SRPMS/lustre-2.12.0-*.src.rpm . || exit 1; \
>> rm -rf $rpmbuilddir
>> make[1]: Entering directory '/nfshome/attaufer/lustre-release'
>> make[1]: Leaving directory '/nfshome/attaufer/lustre-release'
>> error: Failed to read spec file from lustre-2.12.0.tar.gz
>> autoMakefile:1189: recipe for target 'srpm' failed
>> make: *** [srpm] Error 1
>> 
>> Andrew Tauferner
>> 1-952-562-4944 (office)
>> 1-507-696-4609 (mobile)
>> 
>> 
>> -----Original Message-----
>> From: Degremont, Aurelien [mailto:degremoa at amazon.com] 
>> Sent: Wednesday, January 9, 2019 11:49 AM
>> To: Tauferner, Andrew T <andrew.t.tauferner at intel.com>; Andreas Dilger <adilger at whamcloud.com>
>> Cc: lustre-discuss at lists.lustre.org
>> Subject: Re: [lustre-discuss] Kernel Module Build
>> 
>> 2.10.6 does not support Linux 4.14.
>> There is several patches that needs to be cherry picked to have it working.
>> 
>> 2.12 is fine though.
>> 
>> 
>> Aurélien 
>> 
>> Le 09/01/2019 18:43, « lustre-discuss au nom de Tauferner, Andrew T » <lustre-discuss-bounces at lists.lustre.org au nom de andrew.t.tauferner at intel.com> a écrit :
>> 
>>   I configured like so:
>> 
>>   attaufer at head-2:~/lustre-release> ./configure --disable-server --with-linux=/nfshome/attaufer/kernel/usr/src/kernels/4.14.54-mos-tc3-20181113
>> 
>>   The make failed as follows:
>> 
>>   attaufer at head-2:~/lustre-release> make rpms
>>   make  dist-gzip am__post_remove_distdir='@:'
>>   make[1]: Entering directory '/nfshome/attaufer/lustre-release'
>>   grep -v config.h.in config.h.in > undef.h
>>   if test -d "lustre-2.10.6"; then find "lustre-2.10.6" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "lustre-2.10.6" || { sleep 5 && rm -rf "lustre-2.10.6"; }; else :; fi
>>   test -d "lustre-2.10.6" || mkdir "lustre-2.10.6"
>> :
>>   /usr/bin/rpmbuild \
>>           --define "_tmppath $rpmbuilddir/TMP" \
>>           --define "_topdir $rpmbuilddir" \
>>           --define "dist %{nil}" \
>>           -ts lustre-2.10.6.tar.gz || exit 1; \
>>   cp $rpmbuilddir/SRPMS/lustre-2.10.6-*.src.rpm . || exit 1; \
>>   rm -rf $rpmbuilddir
>>   make[1]: Entering directory '/nfshome/attaufer/lustre-release'
>>   make[1]: Leaving directory '/nfshome/attaufer/lustre-release'
>>   error: Failed to read spec file from lustre-2.10.6.tar.gz
>>   autoMakefile:1179: recipe for target 'srpm' failed
>>   make: *** [srpm] Error 1
>> 
>>   Andrew Tauferner
>>   1-952-562-4944 (office)
>>   1-507-696-4609 (mobile)
>> 
>> 
>>   -----Original Message-----
>>   From: Andreas Dilger [mailto:adilger at whamcloud.com] 
>>   Sent: Wednesday, January 9, 2019 1:20 AM
>>   To: Tauferner, Andrew T <andrew.t.tauferner at intel.com>
>>   Cc: Peter Jones <pjones at whamcloud.com>; lustre-discuss at lists.lustre.org
>>   Subject: Re: [lustre-discuss] Kernel Module Build
>> 
>>   You can typically do the simple steps:
>> 
>>    - checkout Lustre release (4.14 probably needs the 2.12.0 release, but maybe
>>      2.10.6 will also work)
>>    - sh autogen.sh
>>    - ./configure
>>    - make rpms
>> 
>>   You have to have the kernel-headers package installed for the target kernel,
>>   along with the proper .config file.
>> 
>>> On Jan 7, 2019, at 16:03, Tauferner, Andrew T <andrew.t.tauferner at intel.com> wrote:
>>> 
>>> I looked over that documentation before but it wasn’t clear how to build only the Lustre kernel modules (lnet.ko, lustre.ko, libcfs.ko, etc.).  I was relying on the 4.14 kernel build but the lustre code in the staging directory there is quite old and disappears completely in 4.18.  So now I need to do an out of tree build for Lustre.  Also, the target kernel is not running on the build system.
>>> 
>>> Andy
>>> 
>>>> From: Peter Jones [mailto:pjones at whamcloud.com] 
>>>> Sent: Monday, January 7, 2019 4:44 PM
>>>> 
>>>> http://wiki.lustre.org/Compiling_Lustre should hopefully have the info you need
>>>> 
>>>> 
>>>> From: "Tauferner, Andrew T" <andrew.t.tauferner at intel.com>
>>>>> 
>>>>> I’m trying to build Lustre (v2_10_6) kernel modules for a custom x86_64 kernel.  Can somebody point me to the proper place for source and build instructions?  Thanks.
>>>>> 

Cheers, Andreas
---
Andreas Dilger
CTO Whamcloud






More information about the lustre-discuss mailing list