From 7b7d5d33d1a83c1534e47af7b231af6413b3a646 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Thu, 23 Sep 2010 00:41:26 +0400 Subject: [PATCH] b=22589 llite_lib.c:234: undefined-reference to `__stack_chk_fail_local' If liblustre.so is linked with -nostdlib it produces errors such as: ./llite_lib.o: In function `liblustre_process_log': lustre/liblustre/llite_lib.c:234: undefined reference to `__stack_chk_fail_local' on platforms where the stack-smashing protector is used (i.e. Ubuntu). i=johann --- lustre/liblustre/genlib.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lustre/liblustre/genlib.sh b/lustre/liblustre/genlib.sh index 2c644d5..dcfb67d 100755 --- a/lustre/liblustre/genlib.sh +++ b/lustre/liblustre/genlib.sh @@ -115,7 +115,12 @@ OS=`uname` if test x$OS = xAIX; then $LD -shared -o $CWD/liblustre.so $ALL_OBJS -lpthread -Xlinker -bnoipath ../../libsyscall.so else -$LD -shared -nostdlib -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS $ZLIB +# using -nostdlib on Ubuntu causes errors such as: +#./llite_lib.o: In function `liblustre_process_log': +#/home/brian/rpm/BUILD/lustre-1.8.2.50/lustre/liblustre/llite_lib.c:234: undefined reference to `__stack_chk_fail_local' +# due to the use of SSP +#$LD -shared -nostdlib -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS $ZLIB +$LD -shared -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS $ZLIB fi rm -rf $sysio_tmp -- 1.8.3.1