Whamcloud - gitweb
LU-2662 build: pthread build issue 80/5180/4
authorKeith Mannthey <keith.mannthey@intel.com>
Wed, 30 Jan 2013 00:39:21 +0000 (16:39 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 27 Jun 2013 16:04:43 +0000 (16:04 +0000)
Adding strlcpy to lustre/utils/liblustreapi.c caused
unexpected build issues.

The build would fail with undefined refrence to
'pthread_create` in user-prim.c.

Adding the pthread flags to the makefile allow the
build to past. I am not sure this is the "BEST" way.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: I62ac4d5c53a42411ef2e8ff37a455308cffed167
Reviewed-on: http://review.whamcloud.com/5180
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/Makefile.am

index 120b510..b04a7f0 100644 (file)
@@ -1,4 +1,4 @@
-LIBCFS := $(top_builddir)/libcfs/libcfs/libcfs.a
+LIBCFS = $(top_builddir)/libcfs/libcfs/libcfs.a
 
 # Lustre test Makefile
 AM_CPPFLAGS = $(LLCPPFLAGS) -I/opt/lam/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS
@@ -79,14 +79,14 @@ endif # TESTS
 
 mmap_sanity_SOURCES= mmap_sanity.c
 
-LIBLUSTREAPI := $(top_builddir)/lustre/utils/liblustreapi.a
+LIBLUSTREAPI = $(top_builddir)/lustre/utils/liblustreapi.a
 multiop_LDADD=$(LIBLUSTREAPI) -lrt $(PTHREAD_LIBS) $(LIBCFS)
-copytool_LDADD=$(LIBLUSTREAPI) $(LIBCFS)
+copytool_LDADD=$(LIBLUSTREAPI) $(PTHREAD_LIBS) $(LIBCFS)
 it_test_LDADD=$(LIBCFS)
 rwv_LDADD=$(LIBCFS)
 
 ll_dirstripe_verify_SOURCES= ll_dirstripe_verify.c
-ll_dirstripe_verify_LDADD= -L$(top_builddir)/lustre/utils -llustreapi $(LIBCFS)
+ll_dirstripe_verify_LDADD= -L$(top_builddir)/lustre/utils $(PTHREAD_LIBS) -llustreapi $(LIBCFS)
 
 flocks_test_SOURCES=flocks_test.c
 flocks_test_LDADD=-lpthread