[LU-9612] Unable to create rpm-dkms for zfs Created: 06/Jun/17  Updated: 16/Oct/21  Resolved: 16/Oct/21

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Abe Assignee: Malcolm Cowe (Inactive)
Resolution: Done Votes: 0
Labels: None
Environment:

OS SLES12 SP2
kernel-default-4.4.21-69.1.x86_64
nfs-kernel-server-1.3.0-26.3.x86_64
kernel-macros-4.4.21-69.1.noarch
kernel-default-devel-4.4.21-69.1.x86_64
kernel-devel-4.4.21-69.1.noarch
kernel-firmware-20160516git-17.6.noarch
kernel-source-4.4.21-69.1.noarch


Issue Links:
Related
is related to LU-9675 SLES 12 SP2 server build fails when Z... Open
Epic/Theme: zfs
Severity: 2
Rank (Obsolete): 9223372036854775807

 Description   

Going through the instructions on http://wiki.lustre.org/Compiling_Lustre zfs build section:

Prepare the build
Run the configure script:
cd $HOME/zfs

  1. For RHEL and CentOS only, set the --spec=redhat flag.
    ./configure [--with-spec=redhat] \
    [--with-spl=<path to spl-devel> \
    [--with-linux=<path to kernel-devel>] \
    [--with-linux-obj=<path to kernel obj>]

I issued the following configure command script for suse linux os after build the spl package:

./configure --with-spec=suse --with-spl=/usr/src/spl-0.7.0 --with-linux=/usr/src/linux-4.4.21-69/kernel

It does not create zfs spec under suse folder as it only create these under redhat and generic folders:
config.status: creating rpm/Makefile
config.status: creating rpm/redhat/Makefile
config.status: creating rpm/redhat/zfs.spec
config.status: creating rpm/redhat/zfs-kmod.spec
config.status: creating rpm/redhat/zfs-dkms.spec
config.status: creating rpm/generic/Makefile
config.status: creating rpm/generic/zfs.spec
config.status: creating rpm/generic/zfs-kmod.spec
config.status: creating rpm/generic/zfs-dkms.spec
config.status: creating zfs-script-config.sh
config.status: creating zfs.release
config.status: creating zfs_config.h
config.status: executing depfiles commands
config.status: executing libtool commands

This causes the make rpm-dkms to fail as there are no spec files configured under rpm/suse folder:

make rpm-dkms errors snapshot:cp: cannot stat 'rpm/suse/zfs-dkms.spec': No such file or directory
Makefile:1149: recipe for target 'rpm-local' failed
make[2]: *** [rpm-local] Error 1
make[2]: Leaving directory '/root/zfs'
Makefile:1167: recipe for target 'srpm-common' failed
make[1]: *** [srpm-common] Error 1
make[1]: Leaving directory '/root/zfs'
Makefile:1123: recipe for target 'srpm-dkms' failed
make: *** [srpm-dkms] Error 2

This works for spl packages and not zfs



 Comments   
Comment by Abe [ 06/Jun/17 ]

zfs rpms created without the rpm-dkms:
zfs-0.7.0-rc4.src.rpm zfs-dkms-0.7.0-rc4.noarch.rpm zfs-dkms-0.7.0-rc4.src.rpm

Comment by Peter Jones [ 07/Jun/17 ]

Malc

Could you please advise here?

Peter

Comment by Malcolm Cowe (Inactive) [ 07/Jun/17 ]

To create the SPL and ZFS packages for SUSE, the ./configure command for each project should be run without any additional arguments (or at least, do not use the --with-spec=rpm option). The build script will then use the RPM spec files in the spl/rpm/generic/ and zfs/rpm/generic directories. There's some additional information on the ZFS custom build process here:

https://github.com/zfsonlinux/zfs/wiki/Custom-Packages

 

Comment by Malcolm Cowe (Inactive) [ 07/Jun/17 ]

Also, please note that I haven't evaluated DKMS on SLES 12 yet – the documentation covers kmod-based builds only.

Comment by Abe [ 09/Jun/17 ]

Hello Malcolm,
Thanks for looking into this, this got resolved as the dkms-rpm are created now bu running
./configure without the additional arguments..
kmod-zfs-4.4.21-69-default-0.7.0-rc4.x86_64.rpm
kmod-zfs-devel-0.7.0-rc4.x86_64.rpm
kmod-zfs-devel-4.4.21-69-default-0.7.0-rc4.x86_64.rpm
zfs-0.7.0-rc4.src.rpm
zfs-dkms-0.7.0-rc4.noarch.rpm
zfs-dkms-0.7.0-rc4.src.rpm
zfs-kmod-0.7.0-rc4.src.rpm

However, when we try to build the rpm for lustre the compile is failing due to missing zfs development headers:
full log:

./configure --enable-server --disable-ldiskfs --with-linux=/usr/src/linux-4.4.21-69 --with-linux-obj=/usr/src/linux-4.4.21-69-obj/x86_64/default --with-zfs=/usr/src/zfs-0.7.0 --with-spl=/usr/src/spl-0.7.0

SBB-02:~/lustre-release # ./configure --enable-server --disable-ldiskfs --with-linux=/usr/src/linux-4.4.21-69 --with-linux-obj=/usr/src/linux-4.4.21-69-obj/x86_64/default --with-zfs=/usr/src/zfs-0.7.0 --with-spl=/usr/src/spl-0.7.0
checking build system type... x86_64-suse-linux-gnu
checking host system type... x86_64-suse-linux-gnu
checking target system type... x86_64-suse-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
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-suse-linux-gnu file names to x86_64-suse-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-suse-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking dependency style of gcc... gcc3
checking for rpmbuild... /usr/bin/rpmbuild
configure: Lustre base checks
==============================================================================
checking whether to configure just enough for make dist... no
checking if this distro uses dpkg... no
checking for ranlib... (cached) ranlib
checking for ld... /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
checking for objdump... (cached) objdump
checking for strip... (cached) strip
checking size of unsigned long long... 8
checking whether to use OSD addon... no
checking whether to build Lustre docs... no
checking whether to build Lustre manpages... yes
checking whether to build Lustre utilities... yes
checking whether to build Lustre tests... yes
checking whether to build Lustre client support... yes
checking whether mpitests can be built... no
checking whether to build Linux kernel modules... yes (linux-gnu)
checking for Linux sources... /usr/src/linux-4.4.21-69
checking for /usr/src/linux-4.4.21-69... yes
checking for Linux objects... /usr/src/linux-4.4.21-69-obj/x86_64/default
checking for /usr/src/linux-4.4.21-69-obj/x86_64/default/.config... yes
checking for /boot/kernel.h... no
checking for /var/adm/running-kernel.h... no
checking for /usr/src/linux-4.4.21-69-obj/x86_64/default/include/generated/autoconf.h... yes
checking for /usr/src/linux-4.4.21-69-obj/x86_64/default/include/linux/version.h... no
checking for /usr/src/linux-4.4.21-69-obj/x86_64/default/include/generated/uapi/linux/version.h... yes
checking for /usr/src/linux-4.4.21-69/include/linux/kconfig.h... yes
checking for external module build target... M
checking that modules can be built at all... yes
checking for Linux kernel utsrelease... 4.4.21-69-default
checking for RedHat kernel release number...
checking if Linux kernel was built with CONFIG_SUSE_KERNEL... yes
checking for Linux kernel module package directory... updates/kernel
checking for the name of module symbol version file... Module.symvers
checking if Linux kernel was built with CONFIG_MODULES... yes
checking if Linux kernel was built with CONFIG_MODVERSIONS... yes
checking if Linux kernel was built with CONFIG_KALLSYMS... yes
checking if Linux kernel module loading is possible... yes
configure: LibCFS kernel checks
==============================================================================
checking whether to use tunable 'panic_dumplog' support... no
checking if 'struct stacktrace_ops' has 'walk_stack' field... yes
checking if 'shrinker' want self pointer in handler... no
checking if 'ctl_table' has a 'ctl_name' field... no
checking if Linux kernel has 'kstrtoul'... yes
checking if 'dump_trace' want address... yes
checking if 'shrink_control' is present... yes
checking if 'stacktrace_ops.warning' is exist... yes
checking for linux/uidgid.h... yes
checking if 'i_uid_read' is present... yes
checking if Linux kernel exports 'sock_alloc_file'... yes
checking if 'sock_alloc_file' takes 3 arguments... yes
checking if Linux kernel was built with CONFIG_CRC32 in or as module... yes
checking if Linux kernel was built with CONFIG_CRYPTO_CRC32_PCLMUL in or as module... yes
checking if Linux kernel was built with CONFIG_CRYPTO_CRC32C_INTEL in or as module... yes
checking shrinker has 'count_objects'... yes
checking does function 'hlist_add_after' exist... no
checking does 'struct timespec64' exist... yes
checking does function 'ktime_get_real_ts64' exist... yes
checking does function 'topology_sibling_cpumask' exist... yes
checking for asm/fpu/api.h... yes
checking does crypto hash helper functions exist... no
checking if 'struct stacktrace_ops' address function returns an int... no
checking if 'get_user_pages()' takes 6 arguments... no
configure: LNet kernel checks
==============================================================================
checking whether to enable CPU affinity support... yes
checking if Linux kernel has cpu affinity support... yes
checking whether to enable tunable backoff TCP support... yes
checking if Linux kernel has tunable backoff TCP support... no
checking whether to use Compat RDMA... no
checking whether to use any OFED backport headers... no
checking whether to enable OpenIB gen2 support... yes
checking if Linux kernel has kthread_worker... yes
checking if 'rdma_create_id' wants four args... no
checking if 'rdma_create_id' wants five args... yes
checking if 'struct ib_cq_init_attr' is used... yes
checking if 'ib_alloc_fast_reg_mr' exists... no
checking if 'struct ib_rdma_wr' is defined... yes
checking if 4arg 'ib_map_mr_sg' exists... yes
checking if 5arg 'ib_map_mr_sg' exists... no
checking if 'struct ib_device' has member 'attrs'... yes
checking if function 'ib_inc_rkey' is defined... yes
checking whether to enable GNI lnd... no
checking if Linux kernel has 'sk_sleep'... yes
checking if 'tcp_sendpage' first parameter is socket... no
checking if 'sk_data_ready' takes only one argument... yes
checking ext4 source directory... /usr/src/linux-4.4.21-69/fs/ext4
checking for /usr/src/linux-4.4.21-69/fs/ext4/dir.c... yes
checking for /usr/src/linux-4.4.21-69/fs/ext4/file.c... yes
checking for /usr/src/linux-4.4.21-69/fs/ext4/inode.c... yes
checking for /usr/src/linux-4.4.21-69/fs/ext4/super.c... yes
configure: Lustre kernel checks
==============================================================================
checking whether to enable Lustre pinger support... yes
checking whether to enable data checksum support... yes
checking whether to enable a write with the health check... no
checking whether to enable lru self-adjusting... yes
checking whether to enable 'llite_lloop' module... yes
checking for name_to_handle_at... yes
checking whether to enable gss support... auto
checking whether to enable gss keyring backend... auto
checking if Linux kernel was built with CONFIG_KEYS in or as module... yes
checking for keyctl_search in -lkeyutils... no
configure: WARNING: GSS keyring backend requires libkeyutils
checking if 'struct cred' has member 'tgcred'... no
checking if 'key_type->instantiate' has two args... yes
checking if Linux kernel was built with CONFIG_SUNRPC in or as module... yes
checking if Linux kernel was built with CONFIG_CRYPTO_MD5 in or as module... yes
checking if Linux kernel was built with CONFIG_CRYPTO_SHA1 in or as module... yes
checking if Linux kernel was built with CONFIG_CRYPTO_SHA256 in or as module... yes
checking if Linux kernel was built with CONFIG_CRYPTO_SHA512 in or as module... yes
checking for Kerberos v5... not found!
checking whether OpenSSL has functions needed for SSK... no
checking if 'blk_queue_max_segments' is defined... yes
checking if 'quotactl_ops.set_dqblk' takes struct fs_disk_quota... no
checking if 'quotactl_ops.set_dqblk' takes struct kqid & fs_disk_quota... no
checking if 'dquot_suspend' is defined... yes
checking if '__add_wait_queue_exclusive' exists... yes
checking if 'file_operations.fsync' takes 4 arguments... yes
checking if Linux kernel exports 'simple_setattr'... yes
checking if Linux kernel exports 'truncate_complete_page'... no
checking if Linux kernel exports 'remove_from_page_cache'... no
checking if Linux kernel exports 'delete_from_page_cache'... yes
checking if 'fs_struct.lock' use rwlock... no
checking if 'super_operations.evict_inode' exist... yes
checking if 'kernel_locked' is defined... no
checking if Linux kernel exports 'blkdev_get_by_dev'... yes
checking if 'generic_permission' take 2 arguments... yes
checking if 'dcache_lock' is exist... no
checking if 'inode.i_rcu' exists... yes
checking if 'dentry_operations.d_compare()' taken 7 arguments... no
checking if 'dentry_operations.d_delete()' has const declare on first parameter... yes
checking if 'request_queue' has 'unplug_fn' field... no
checking if Linux kernel was built with CONFIG_FHANDLE in or as module... yes
checking if 'file_system_type' has 'mount' field... yes
checking if 'inode_operations' has '.truncate' member function... no
checking if 'inode_owner_or_capable' exist... yes
checking if security_inode_init_security takes a callback... yes
checking if 'dirty_inode' super_operation takes flag... yes
checking if 'lock-manager' ops renamed to 'lm_xxx'... yes
checking if 'inode->i_alloc_sem' is killed and use inode_dio_wait... yes
checking if 'inode_operations' has '.get_acl' member function... yes
checking if Linux kernel exports 'generic_file_llseek_size'... yes
checking if 'inode_operations->permission' has two args... yes
checking radix_tree_exceptional_entry exist... yes
checking for /usr/src/linux-4.4.21-69/include/linux/loop.h... no
checking if 'request_queue.make_request_fn' returns void but not int... yes
checking if 'inode->i_nlink' is protected from direct modification... yes
checking for /usr/src/linux-4.4.21-69/include/linux/migrate.h... yes
checking if 'address_space_operations.migratepage' has 4 args... yes
checking if 'super_operations' use 'dentry' as parameter... yes
checking if 'inode_operations' use 'umode_t' as parameter... yes
checking if have 'cache_register'... no
checking if have 'd_make_root'... yes
checking if 'kmap_atomic' has only 1 argument... yes
checking if have 'clear_inode'... yes
checking if 'encode_fh' have parent inode as parameter... yes
checking if Linux kernel has 'generic_file_llseek_size' with 5 args... yes
checking if 'i_dentry/d_alias' uses 'list'... no
checking if 'dentry_open' uses 'struct path' as first argument... yes
checking if 'iop' has 'atomic_open'... yes
checking if kernel supports wrapped FS freeze functions... yes
checking if 'posix_acl_to_xattr' takes 'struct user_namespace'... yes
checking if 'struct file' has member 'f_inode'... yes
checking if file_inode() exists... yes
checking if 'sunrpc_cache_pipe_upcall' takes 3 args... no
checking if 'hlist_for_each_entry' has 3 args... yes
checking if 'bio_end_sector' is defined... yes
checking if 'is_sxid' is defined... yes
checking if 'block_device_operations' release returns 'int'... no
checking if 'remove_proc_subtree' is defined... yes
checking if 'proc_remove' is defined... yes
checking if 'security_dentry_init_security' is defined... yes
checking if 'address_space_operations.invalidatepage' requires 3 arguments... yes
checking if 'dir_context' exist... yes
checking if 'd_compare' taken 5 arguments... yes
checking if 'd_count' exist... yes
checking if hlist 'dentry.d_u.d_alias' exist... yes
checking if 'dentry.d_child' exist... yes
checking if 'truncate_pagecache' with 'old_size' parameter... no
checking if 'struct kiocb' with 'ki_left' member... no
checking if Linux kernel has 'vfs_rename' with 5 args... no
checking if Linux kernel has 'vfs_unlink' with 3 args... yes
checking if Linux kernel has struct bvec_iter... yes
checking if Linux kernel has truncate_inode_pages_final... yes
checking if Linux kernel has 'vfs_rename' with 6 args... yes
checking if direct IO uses iov_iter... no
checking if 'iov_iter_init' takes a tag... yes
checking if 'iov_iter_truncate' exists ... yes
checking if 'file_operations.read|write_iter' exist... yes
checking if struct key_match field exist... yes
checking if percpu_counter_init uses GFP_* flag as argument... yes
checking if filldir_t uses struct dir_context... yes
checking if struct kiocb has ki_nbytes field... no
checking if 'quotactl_ops.set_dqblk' takes struct qc_dqblk... yes
checking if struct address_space has backing_dev_info... no
checking if have 'BDI_CAP_MAP_COPY'... no
checking if cancel_dirty_page still exist... no
checking if iov_iter_rw exist... yes
checking if Linux kernel exports 'new_sync_read'... no
checking if cancel_dirty_page with one argument exist... yes
checking if 'bio_endio' with one argument exist... yes
checking if symlink inode operations have struct nameidata argument... no
checking if 'struct cache_head' has 'cache_list' field... yes
checking if 'locks_lock_file_wait' exists... yes
checking if 'request_queue.make_request_fn' returns blk_qc_t... yes
checking if 'struct key' has 'payload.data' as an array... yes
checking if Linux kernel has 'file_dentry'... yes
checking if 'inode_lock' is defined... yes
checking if 'iop' has 'get_link'... no
checking if 'in_compat_syscall' is defined... no
checking if Linux kernel exports 'dev_set_rdonly'... no
configure: WARNING: kernel missing dev_set_rdonly patch for testing
checking if stack size is at least 8k... yes
checking if kernel has 64-bit quota limits support... yes
checking if Linux kernel was built with CONFIG_QUOTA in or as module... yes
checking whether to build ldiskfs... no
checking whether to enable zfs... yes
checking spl source directory... /usr/src/spl-0.7.0
checking spl build directory... /usr/src/spl-0.7.0/4.4.21-69-default
checking spl source version... 0.7.0-rc4
checking spl file name for module symbols... Module.symvers
checking zfs source directory... /usr/src/zfs-0.7.0
checking zfs build directory... /usr/src/zfs-0.7.0/4.4.21-69-default
checking zfs source version... 0.7.0-rc4
checking zfs file name for module symbols... Module.symvers
checking user provided zfs devel headers...
checking zfs devel headers... Not Found
configure: error:

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

Support for zfs can be enabled by downloading the required packages for your
distribution. See http://zfsonlinux.org/ to determine is zfs is supported by
your distribution.

SBB-02:~/lustre-release #

Thanks,
Abe

Comment by Abe [ 09/Jun/17 ]

Also, is there a way to pull a lustre 2.10 revision pre-release code ?

thanks,
Abe

Comment by Peter Jones [ 09/Jun/17 ]

Abe

Yes, the master branch will become 2.10

Peter

Comment by Abe [ 11/Jun/17 ]

Is this a know problem with lustre 2.9 since it does not support zfs ?
should we wait till lustre 2.10 release is available 6/30/177
pls advice..
SBB-02:~/lustre-release # ./configure --enable-server --disable-ldiskfs --with-linux=/usr/src/linux-4.4.21-69 --with-linux-obj=/usr/src/linux-4.4.21-69-obj/x86_64/default --with-zfs=/usr/src/zfs-0.7.0 --with-spl=/usr/src/spl-0.7.0

checking zfs source directory... /usr/src/zfs-0.7.0
checking zfs build directory... /usr/src/zfs-0.7.0/4.4.21-69-default
checking zfs source version... 0.7.0-rc4
checking zfs file name for module symbols... Module.symvers
checking user provided zfs devel headers...
checking zfs devel headers... Not Found
configure: error:

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

thanks,
Abe

Comment by Peter Jones [ 11/Jun/17 ]

Abe

There is no need to wait for 2.10 - use the master branch

Peter

Comment by Abe [ 12/Jun/17 ]

Is there a label for 2.10 that i need to use to check it out:
for example:
git checkout 2.10.0

I don't see a 2.10.0 label

thanks,
Abe

Comment by Peter Jones [ 12/Jun/17 ]

Abe

A 2.10.0 tag will be created when the release is finalized. In the meantime, you can just use the tip of master

Peter

Comment by Abe [ 12/Jun/17 ]

that is fine, we are stuck with servers and client rpm build error: Required zfs osd cannot be built due to missing zfs development headers.

Any ideas:

SBB-02:~/lustre-release # ./configure --enable-server --disable-ldiskfs --with-linux=/usr/src/linux-4.4.21-69 --with-linux-obj=/usr/src/linux-4.4.21-69-obj/x86_64/default --with-zfs=/usr/src/zfs-0.7.0 --with-spl=/usr/src/spl-0.7.0

checking zfs source directory... /usr/src/zfs-0.7.0
checking zfs build directory... /usr/src/zfs-0.7.0/4.4.21-69-default
checking zfs source version... 0.7.0-rc4
checking zfs file name for module symbols... Module.symvers
checking user provided zfs devel headers...
checking zfs devel headers... Not Found
configure: error:

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

thanks,
Abe

Comment by Malcolm Cowe (Inactive) [ 12/Jun/17 ]

Abe,

Can you list the SPL and ZFS packages that were installed and the commands used to install them? It looks like the SPL development libraries might not have been installed. The configure script looks for the SPL and ZFS include files, which are in the libzfs2-devel RPM. For example:

vagrant@sl12sp2-b:~rpm -qf /usr/include/libspl
libzfs2-devel-0.7.0-rc4_56_g419c80e6d.x86_64
vagrant@sl12sp2-b:~> rpm -qf /usr/include/libzfs
libzfs2-devel-0.7.0-rc4_56_g419c80e6d.x86_64

The configure script will fail when it cannot find the include files.

Comment by Abe [ 13/Jun/17 ]

Hi Malcom,

your are right, the zfs rpm install is failing, but the spl packages are all installed:

for spl commands used:

sudo zypper install kmod-spl-4.4.21-69-default-0.7.0-rc4.x86_64.rpm kmod-spl-devel-0.7.0-rc4.x86_64.rpm spl-0.7.0-rc4.x86_64.rpm

sudo zypper install kmod-spl-devel-4.4.21-69-default-0.7.0-rc4.x86_64.rpm

SBB-02:~/releases/zfs-spl # rpm -qa | grep spl
kmod-spl-4.4.21-69-default-0.7.0-rc4.x86_64
kmod-spl-devel-0.7.0-rc4.x86_64
libply-splash-core4-0.9.2-29.5.x86_64
libply-splash-graphics4-0.9.2-29.5.x86_64
spl-0.7.0-rc4.x86_64
kmod-spl-devel-4.4.21-69-default-0.7.0-rc4.x86_64

for zfs:

SBB-02:~/releases/zfs-spl # sudo zypper install kmod-zfs-4.4.21-69-default-0.7.0-rc4.x86_64 kmod-zfs-devel-0.7.0-rc4.x86_64 zfs-0.7.0-rc4.src.rpm
Loading repository data...
Reading installed packages...
'kmod-zfs-4.4.21-69-default.x86_64 = 0.7.0-rc4' is already installed.
No update candidate for 'kmod-zfs-4.4.21-69-default-0.7.0-rc4.x86_64'. The highest available version is already installed.
'kmod-zfs-devel.x86_64 = 0.7.0-rc4' is already installed.
No update candidate for 'kmod-zfs-devel-0.7.0-rc4.x86_64'. The highest available version is already installed.
'tmpRPMcache:zfs=0:0.7.0-rc4' not found in package names. Trying capabilities.
No provider of 'tmpRPMcache:zfs=0:0.7.0-rc4' found.
Resolving package dependencies...

Nothing to do.

SBB-02:~/releases/zfs-spl # rpm -qa | grep zfs
kmod-zfs-4.4.21-69-default-0.7.0-rc4.x86_64
kmod-zfs-devel-0.7.0-rc4.x86_64
kmod-zfs-devel-4.4.21-69-default-0.7.0-rc4.x86_64

SBB-02:~/releases/zfs-spl # sudo zypper install zfs-0.7.0-rc4.src.rpm
Loading repository data...
Reading installed packages...
'tmpRPMcache:zfs=0:0.7.0-rc4' not found in package names. Trying capabilities.
No provider of 'tmpRPMcache:zfs=0:0.7.0-rc4' found.
Resolving package dependencies...

SBB-02:~/releases/zfs-spl # ls zfs*
zfs-0.7.0-rc4.src.rpm zfs-dkms-0.7.0-rc4.noarch.rpm zfs-dkms-0.7.0-rc4.src.rpm zfs-kmod-0.7.0-rc4.src.rpm
SBB-02:~/releases/zfs-spl # ls spl*rpm
spl-0.7.0-rc4.src.rpm spl-0.7.0-rc4.x86_64.rpm spl-dkms-0.7.0-rc4.noarch.rpm spl-dkms-0.7.0-rc4.src.rpm spl-kmod-0.7.0-rc4.src.rpm

thanks,
Abe

Comment by Malcolm Cowe (Inactive) [ 13/Jun/17 ]

run the following command:

rpm -qi libzfs2-devel

If the package is not installed then run, from the directory containing the ZFS RPMs you created:

sudo rpm -ivh libzfs2-devel-*.rpm

If that fails, then likely, you need to install all the library packages in the release directory. The simplest way to do that is:

sudo rpm -ivh lib*.rpm

From the output of your commands, the user-space tools might not be installed, either.  

The lustre.org documentation uses the following command to install all the pre-requisite ZFS packages:

cd $HOME/releases/zfs-spl
sudo rpm -ivh kmod-spl-* spl-*.x86_64.rpm \
kmod-zfs-[0-9].*-default-*.x86_64.rpm \
kmod-zfs-devel-[0-9].*.x86_64.rpm \
lib*.x86_64.rpm \
zfs-[0-9].*.x86_64.rpm \
zfs-dracut-[0-9].*.x86_64.rpm

 

Comment by Abe [ 13/Jun/17 ]

The lib,zfs,zfs-dracut rpm are missing, the configure script should have generated these right ?

SBB-02:~/releases/zfs-spl # sudo rpm ivh kmod-spl* spl-.x86_64.rpm kmod-zfs-[0-9].default.x86_64.rpm kmod-zfs-devel-[0-9]..x86_64.rpm lib*.x86_64.rpm zfs-[0-9]..x86_64.rpm zfs-dracut-[0-9]..x86_64.rpm
error: File not found by glob: lib*.x86_64.rpm
error: File not found by glob: zfs-[0-9].*.x86_64.rpm
error: File not found by glob: zfs-dracut-[0-9].*.x86_64.rpm

Comment by Malcolm Cowe (Inactive) [ 13/Jun/17 ]

Yes, I would have expected these to have been created as part of the build process, but it depends on the options supplied to the make command for the SPL and ZFS code. 

To create the user space packages, you run this command in both of the SPL and the ZFS directories:

make pkg-utils

This is my build process for SPL and ZFS on SLES 12 SP2:

# SPL
cd $HOME/spl
sh autogen.sh # only needed the first time the code is checked out
./configure --with-linux=/usr/src/linux-4.4.59-92.17
make pkg-utils pkg-kmod
mkdir -p $HOME/releases/zfs-spl
mv $HOME/spl/*.rpm $HOME/releases/zfs-spl
cd $HOME/releases/zfs-spl
sudo rpm -ivh kmod-spl-* spl-0.7.0*.x86_64.rpm

# ZFS
cd $HOME/zfs
./configure --with-linux=/usr/src/linux-4.4.59-92.17
make pkg-utils pkg-kmod
mv $HOME/zfs/*.rpm $HOME/releases/zfs-spl
cd $HOME/releases/zfs-spl
sudo rpm -ivh kmod-zfs-[0-9].*-default-*.x86_64.rpm \
kmod-zfs-devel-[0-9].*.x86_64.rpm \
lib*.x86_64.rpm \
zfs-[0-9].*.x86_64.rpm \
zfs-dracut-[0-9].*.x86_64.rpm

 

Comment by Abe [ 13/Jun/17 ]

cd $HOME/zfs
make pkg-utils pkg-mod ---> returns libzfs compile errors, missing ludev lib
snapshot below:

make[5]: Entering directory '/tmp/zfs-build-root-0K0ri1dq/BUILD/zfs-0.7.0/lib/libzfs'
CC libzfs_changelist.lo
CC libzfs_config.lo
CC libzfs_dataset.lo
CC libzfs_diff.lo
CC libzfs_fru.lo
CC libzfs_import.lo
CC libzfs_iter.lo
CC libzfs_mount.lo
CC libzfs_pool.lo
CC libzfs_sendrecv.lo
CC libzfs_status.lo
CC libzfs_util.lo
CCLD libzfs.la
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -ludev
collect2: error: ld returned 1 exit status
Makefile:631: recipe for target 'libzfs.la' failed
make[5]: *** [libzfs.la] Error 1
make[5]: Leaving directory '/tmp/zfs-build-root-0K0ri1dq/BUILD/zfs-0.7.0/lib/libzfs'
Makefile:534: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/tmp/zfs-build-root-0K0ri1dq/BUILD/zfs-0.7.0/lib'
Makefile:707: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/tmp/zfs-build-root-0K0ri1dq/BUILD/zfs-0.7.0'
Makefile:575: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/tmp/zfs-build-root-0K0ri1dq/BUILD/zfs-0.7.0'
error: Bad exit status from /tmp/zfs-build-root-0K0ri1dq/TMP/rpm-tmp.NljItE (%build)

RPM build errors:
Bad exit status from /tmp/zfs-build-root-0K0ri1dq/TMP/rpm-tmp.NljItE (%build)
Makefile:1183: recipe for target 'rpm-common' failed
make[1]: *** [rpm-common] Error 1
make[1]: Leaving directory '/root/zfs'
Makefile:1142: recipe for target 'rpm-utils' failed
make: *** [rpm-utils] Error 2

Comment by Malcolm Cowe (Inactive) [ 13/Jun/17 ]

The following link has the package pre-requisites for compiling ZFS and Lustre:

http://wiki.lustre.org/Compiling_Lustre#SLES_12:_Install_the_Software_Development_Tools

The following command will install the pre-reqs:

sudo zypper install asciidoc automake bc binutils-devel bison bison \
  device-mapper-devel elfutils libelf-devel flex gcc gcc-c++ git \
  glib2-tools glib2-devel hmaccalc libattr-devel libblkid-devel \
  libselinux-devel libtool libuuid-devel lsscsi make mksh ncurses-devel \
  net-tools numactl parted patchutils pciutils-devel perl pesign \
  python-devel rpm-build sysstat systemd-devel tcl tcl-devel tk tk-devel wget \
  xmlto zlib-devel libyaml-devel krb5-devel keyutils-devel net-snmp-devel

You will need to have the SLE-SDK12 add-on enabled. Additional dependencies will be resolved automatically.

Comment by Abe [ 13/Jun/17 ]

how do you enable the SLE-SDK12 add-on ?

thanks

Comment by Malcolm Cowe (Inactive) [ 14/Jun/17 ]

SUSE provides the SDK add-on – I thought it was one of the standard add-ons for SLES. There might be an ISO download, but I am not sure.

I forget which packages come from the SDK versus the core OS – if you run the above command, it will tell you which packages it couldn't find, if any.

Comment by Abe [ 15/Jun/17 ]

Hi Malcom,
i figured out how to add the packages on the server, basically user needs to subscribe and register the node with suse server with NFR license..
BB-02:~ # SUSEConnect -r 1FAC34FBD7DDAA
Registered SLES 12.2 x86_64
To server: https://scc.suse.com
SBB-02:~ # SUSEConnect -p
Please provide a product identifier
SBB-02:~ # SUSEConnect -p sle-sdk/12.2/x86_64
Registered sle-sdk 12.2 x86_64
To server: https://scc.suse.com

so spl and zfs components are installed ..

SBB-02:~ # rpm -qf /usr/include/libspl
libzfs2-devel-0.7.0-rc4.x86_64
SBB-02:~ # rpm -qf /usr/include/libzfs
libzfs2-devel-0.7.0-rc4.x86_64

Now we are hitting a problem with lustre compilation, these are the steps have used:
1. make distclean
2. ./configure --enable-server --with-linux=/usr/src/linux-4.4.21-69 --with-linux-obj=/usr/src/linux-4.4.21-69-obj/x86_64/default
3. make rpms

SBB-02:~/lustre-release # make rpms
make dist-gzip am__post_remove_distdir='@:'
make[1]: Entering directory '/root/lustre-release'
if test -d "lustre-2.9.58_22_gdb59ecb"; then find "lustre-2.9.58_22_gdb59ecb" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "lustre-2.9.58_22_gdb59ecb" ||

{ sleep 5 && rm -rf "lustre-2.9.58_22_gdb59ecb"; }

; else :; fi
test -d "lustre-2.9.58_22_gdb59ecb" || mkdir "lustre-2.9.58_22_gdb59ecb"
(cd ldiskfs && make top_distdir=../lustre-2.9.58_22_gdb59ecb distdir=../lustre-2.9.58_22_gdb59ecb/ldiskfs \
am_remove_distdir=: amskip_length_check=: am_skip_mode_fix=: distdir)

snapshot:
rm -rf $rpmbuilddir
make[1]: Entering directory '/root/lustre-release'
make[1]: Leaving directory '/root/lustre-release'
Wrote: /tmp/rpmbuild-lustre-root-DfOI5x2b/SRPMS/lustre-2.9.58_22_gdb59ecb-1.src.rpm
rpmbuilddir=`mktemp t -d rpmbuild-lustre$USER-XXXXXXXX`; \
make \
rpmbuilddir="$rpmbuilddir" rpm-local || exit 1; \
/usr/bin/rpmbuild \
--define "_tmppath $rpmbuilddir/TMP" \
--define "_topdir $rpmbuilddir" \
--define "kdir /usr/src/linux-4.4.21-69" --define "kobjdir /usr/src/linux-4.4.21-69-obj/x86_64/default" --with zfs --with lnet_dlc \
-rebuild lustre-2.9.58_22_gdb59ecb*.src.rpm || exit 1; \
cp $rpmbuilddir/RPMS//.rpm . || exit 1; \
rm -rf $rpmbuilddir
make[1]: Entering directory '/root/lustre-release'
make[1]: Leaving directory '/root/lustre-release'
Installing lustre-2.9.58_22_gdb59ecb-1.src.rpm
sh: -c: line 15: unexpected EOF while looking for matching `"'
sh: -c: line 17: syntax error: unexpected end of file
error: Summary field must be present in package: lustre-osd-zfs-kmp-default
autoMakefile:1091: recipe for target 'rpms' failed
make: *** [rpms] Error 1
SBB-02:~/lustre-release #

thanks,
Abe

Comment by Malcolm Cowe (Inactive) [ 15/Jun/17 ]

There's a bug somewhere in the "make rpms" process that prevents creating LDISKFS and ZFS packages at the same time. The workaround is to disable the LDISKFS support explicitly:

./configure --enable-server \
--disable-ldiskfs \
--with-linux=/usr/src/linux-4.4.21-69 \
--with-linux-obj=/usr/src/linux-4.4.21-69-obj/x86_64/default

Note the second line in the above command.

Comment by Abe [ 16/Jun/17 ]

This is awesome, i was able to build the rpms for the servers and the clients:
./configure --disable-server --enable-client --disable-ldiskfs --with-linux=/usr/src/linux-4.4.21-69 --with-linux-obj=/usr/src/linux-4.4.21-69-obj/x86_64/default
At this point, have installed the rpms on the servers and applied zfs configurations without any issues and started benchmarking our platform..

One more thing, if you have any documentation on how to use dkms for installs on sles12 sp2 that would be great..
I assume that the clients needs to be running sles12 sp2 os as well correct ?

thank you so much for your support here,

Regards,
Abe

Comment by Malcolm Cowe (Inactive) [ 16/Jun/17 ]

There is no documentation that I am aware of to build ZFS on SLES 12 SP2 with DKMS support, and my own initial attempts have not been successful. The ZFS on Linux project's documentation doesn't have much information about SUSE.

Clients can run any supported OS, but should ideally be running the same version of Lustre. Normally, users will use a common platform across both servers and clients.

Comment by Malcolm Cowe (Inactive) [ 21/Nov/17 ]

Is there any further work required on this ticket? Since there has been no activity since June 2017, I propose to close.

Generated at Sat Feb 10 02:27:43 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.