[LU-3497] Lustre build system hardcoded to using ZFS development headers in /usr/include only. Created: 24/Jun/13  Updated: 18/Dec/14  Resolved: 03/Sep/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.1, Lustre 2.5.0
Fix Version/s: Lustre 2.5.0, Lustre 2.4.2

Type: Bug Priority: Critical
Reporter: James A Simmons Assignee: Minh Diep
Resolution: Fixed Votes: 0
Labels: yuc2
Environment:

Any build box.


Issue Links:
Duplicate
is duplicated by LU-3377 Cannot build with zfs if development ... Resolved
Severity: 3
Rank (Obsolete): 8794

 Description   

Currently the LB_ZFS_USER macro test only for /usr/include patch for development headers. This puts a hard requirement of installing the zfs development rpm on any build box. For a non administrator on a build box this is not a option. Those needed headers are also available in the source tree of zfs so we can use that as a second option to allow a normal user to build lustre rpms.



 Comments   
Comment by James A Simmons [ 24/Jun/13 ]

Patch at http://review.whamcloud.com/#/c/6750/

Comment by Peter Jones [ 24/Jun/13 ]

Thanks James! Minh could you please take care of this one?

Comment by Minh Diep [ 25/Jun/13 ]

Hi James,

I hit this when I built without zfs/spl installed on the system

checking zfs source directory... /mnt/build/build/lu3497/BUILD/usr/src/zfs-0.6.1/
checking zfs build directory... /mnt/build/build/lu3497/BUILD/usr/src/zfs-0.6.1/2.6.32-358.11.1.el6_lustre.g4b6bec2.x86_64
checking zfs source version... 0.6.1-24_gf9ca914
checking zfs file name for module symbols... Module.symvers
checking zfs devel headers... Not found
configure: error:

Required zfs osd cannot be built due to missing zfs development headers.

...

[mpiuser@client-1 lu3497]$ ls BUILD/usr/src/zfs-0.6.1/
2.6.32-358.11.1.el6_lustre.g4b6bec2.x86_64 include zfs_config.h.in zfs.release.in
[mpiuser@client-1 lu3497]$ ls BUILD/usr/src/zfs-0.6.1/include/
linux sys zfeature_common.h zfs_comutil.h zfs_deleg.h zfs_fletcher.h zfs_namecheck.h zfs_prop.h zpios-ctl.h zpios-internal.h
[mpiuser@client-1 lu3497]$

Comment by James A Simmons [ 25/Jun/13 ]

In the LU-1930 patch I seen similar behavior of the headers being in different locations. It was different for the tar ball versus the source rpm in the past. I was hoping that changed but guess not.

Comment by Minh Diep [ 28/Jun/13 ]

James,

I have been looking into this and have a question:

rpm2cpio /mnt/build/build/lu3497/BUILD/RPMS/x86_64/kmod-zfs-devel-0.6.1-24_gf9ca914.el6.x86_64.rpm
+ cpio -vid
./usr/src/zfs-0.6.1
./usr/src/zfs-0.6.1/include
./usr/src/zfs-0.6.1/include/linux
./usr/src/zfs-0.6.1/include/linux/blkdev_compat.h

....

+ rpm2cpio /mnt/build/build/lu3497/BUILD/RPMS/x86_64/zfs-devel-0.6.1-24_gf9ca914.el6.x86_64.rpm
+ cpio -vid
./lib64/libnvpair.so
./lib64/libuutil.so
./lib64/libzfs.so
./lib64/libzpool.so
./usr/include/libspl
./usr/include/libspl/assert.h
./usr/include/libspl/atomic.h

Could you help me understand why we need zfs-devel and kmod-zfs-devel?
why kmod-zfs-devel does not include libspl and libzfs?

should I rpm2cpio zfs-devel under /usr/src/zfs-$version so lustre build can find it?

Comment by James A Simmons [ 28/Jun/13 ]

kmod is for handling kernel modules and their internals only. The normal zfs-devel is for building the user land utilities. Lustre needs both, one for osd-zfs and the other for the mount.lustre and friends.
Its my first time playing with kmod myself. I'm getting the hang of it now.

Comment by Minh Diep [ 21/Aug/13 ]

Please review the latest update of the patch http://review.whamcloud.com/#/c/6750/4

Comment by Jodi Levi (Inactive) [ 03/Sep/13 ]

Patch landed to master. Please let me know if more work is needed in this ticket and I will reopen.

Comment by James A Simmons [ 04/Sep/13 ]

Could we land this to 2.4 as well.

Comment by Peter Jones [ 04/Sep/13 ]

We'll certainly consider this issue for 2.4.2 but it is too late to include it in 2.4.1

Comment by James A Simmons [ 15/Nov/13 ]

Oleg can you see if http://review.whamcloud.com/#/c/6750 can be cherry picked for 2.4.2.

Comment by Brian Murrell (Inactive) [ 15/May/14 ]

So presumably the libraries needed to build userspace tools linked with libzfs are in the zfs-devel package also, yes?

I don't see how this patch enables the build of userspace tools wanting to -lzfs to find the libs in the unpacked zfs-devel. Is it not part of this work or am I just missing it? Maybe linking with -lzfs has just not been necessary yet?

Comment by James A Simmons [ 22/May/14 ]

At the time of the patch creating we didn't need to link to libzfs.

Generated at Sat Feb 10 01:34:25 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.