[LU-10536] building with --disable-shared fails when ZFS is enabled Created: 19/Jan/18  Updated: 09/Feb/18  Resolved: 09/Feb/18

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: James A Simmons
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Building with --disable-shared fails when ZFS is enabled due to a missing dependency:

# git clean -fxd && mcs && sh autogen.sh && ./configure --disable-shared && make
...
mv -f .deps/mount_lustre-mount_utils.Tpo .deps/mount_lustre-mount_utils.Po
/bin/sh ../../libtool  --tag=CC   --mode=link gcc -fPIC -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_B\
ITS=64 -DLUSTRE_UTILS=1 -g -O2 -Wall -Werror -lzfs   -o mount.lustre mount_lustre-mount_lustre.o mount_lustre-\
mount_utils.o  ../../libcfs/libcfs/libcfs.la   libmount_utils_zfs.a libmount_utils_ldiskfs.a
libtool: link: gcc -fPIC -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 -g -O2 \
-Wall -Werror -o mount.lustre mount_lustre-mount_lustre.o mount_lustre-mount_utils.o  -lzfs ../../libcfs/libcf\
s/.libs/libcfs.a libmount_utils_zfs.a libmount_utils_ldiskfs.a
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libzfs.so: undefined reference to symbol\
 'nvpair_name'
/usr/lib64/libnvpair.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[4]: *** [mount.lustre] Error 1
make[4]: Leaving directory `/root/lustre-release/lustre/utils'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/root/lustre-release/lustre/utils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/lustre-release/lustre'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/lustre-release'
make: *** [all] Error 2


 Comments   
Comment by James A Simmons [ 19/Jan/18 ]

I can take a look. Sound like we just need to link to libnvpair.so

Comment by John Hammond [ 19/Jan/18 ]

Hi James,

I have a patch just haven't pushed it yet.

Comment by Gerrit Updater [ 19/Jan/18 ]

John L. Hammond (john.hammond@intel.com) uploaded a new patch: https://review.whamcloud.com/30947
Subject: LU-10536 build: add -lnvpair to ZFS LDFLAGS
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8685925396b1d5e79f7b61bef614839681480340

Comment by Gerrit Updater [ 31/Jan/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30947/
Subject: LU-10536 build: add -lnvpair to ZFS LDFLAGS
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: eabd5d7d7ee450698f1ff6ae20bf1072cae9c89c

Comment by Peter Jones [ 31/Jan/18 ]

Landed for 2.11

Comment by Gerrit Updater [ 01/Feb/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/31128
Subject: LU-10536 build: add path for libnvpair to zfslib
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ea7bd8cc35347787768aede9452dadcc844a6c35

Comment by Gerrit Updater [ 09/Feb/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31128/
Subject: LU-10536 build: add path for libnvpair to zfslib
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 45ad1a73829763f9a0ebe0f2c6f25d254697f0e6

Comment by Peter Jones [ 09/Feb/18 ]

Landed for 2.11

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