[LU-10611] utils: missing zlib.h to compile lfs.c Created: 06/Feb/18  Updated: 05/Aug/20  Resolved: 14/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: CEA Assignee: Jian Yu
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

This commit modified lfs.c so that it now requires the zlib.h header file but this dependency is not checked by the configure script.

On Centos7 compiling without first installing zlib-devel fails with:

make[4]: Entering directory `/home/guest/lustre-release/lustre/utils'
gcc  -rdynamic -ldl -shared -export-dynamic \
		  -o mount_osd_ldiskfs.so \
		 `ar -t libmount_utils_ldiskfs.a`
depbase=`echo lfs.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I../..   -include /home/guest/lustre-release/undef.h -include /home/guest/lustre-release/config.h -I/home/guest/lustre-release/libcfs/include -I/home/guest/lustre-release/lnet/include -I/home/guest/lustre-release/lnet/include/uapi -I/home/guest/lustre-release/lustre/include -I/home/guest/lustre-release/lustre/include/uapi  -fPIC -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 -g -O2 -Wall -Werror -MT lfs.o -MD -MP -MF $depbase.Tpo -c -o lfs.o lfs.c &&\
mv -f $depbase.Tpo $depbase.Po
lfs.c:65:18: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
                  ^
compilation terminated.
make[4]: *** [lfs.o] Error 1




 Comments   
Comment by Peter Jones [ 06/Feb/18 ]

Jian

Could you please investigate

Peter

Comment by Gerrit Updater [ 06/Feb/18 ]

Jian Yu (jian.yu@intel.com) uploaded a new patch: https://review.whamcloud.com/31186
Subject: LU-10611 autoconf: check zlib library and zlib.h header file
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: fe805d42e2264d87d9c40c977eb7278904e35d68

Comment by Gerrit Updater [ 14/Feb/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31186/
Subject: LU-10611 autoconf: check zlib library and zlib.h header file
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3a76ece5ad644b21ad2307051b8f5b47cdf0e3f6

Comment by Peter Jones [ 14/Feb/18 ]

Landed for 2.11

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