Guy Coates
2009-Aug-10 14:30 UTC
[Lustre-discuss] ofed kernel config.mk / BACKPORT_INCLUDES
Hi all, I am trying to build lustre 1.8.1 against OFED 1.4.2 and have uncovered a couple of bugs regarding how BACKPORT_INCLUDES is handled in the ofa-kernel config.mk file. The ofed_patch.sh script in the ofa_kernel package is incorrectly escaped, and results in a mangled BACKPORT_INCLUDES path. The lustre ./configure script is also broken, and prepends and extra "-I" infront of the BACKPORT_INCLUDES path. Patches for both are attached. Cheers, Guy -- Dr. Guy Coates, Informatics System Group The Wellcome Trust Sanger Institute, Hinxton, Cambridge, CB10 1HH, UK Tel: +44 (0)1223 834244 x 6925 Fax: +44 (0)1223 496802 -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. -------------- next part -------------- A non-text attachment was scrubbed... Name: ofed_patch.diff Type: text/x-patch Size: 563 bytes Desc: not available Url : http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090810/6ad80838/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.patch Type: text/x-patch Size: 480 bytes Desc: not available Url : http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090810/6ad80838/attachment-0001.bin
Brian J. Murrell
2009-Aug-10 15:17 UTC
[Lustre-discuss] [ofa-general] ofed kernel config.mk / BACKPORT_INCLUDES
[ Any further responses to this thread should drop the general at lists.openfabrics.org list. I only kept it here so that anyone on that list that wishes to follow this thread knows that it will not be continued on the openfabrics list ] On Mon, 2009-08-10 at 15:30 +0100, Guy Coates wrote:> Hi all,Hi Guy,> The lustre ./configure script is also broken, and prepends and extra > "-I" > infront of the BACKPORT_INCLUDES path.I don''t think so, but xtrace output from configure would verify.> --- lustre-1.8.1/configure 2009-07-24 23:28:51.000000000 +0100 > +++ configure 2009-08-10 15:08:22.316488430 +0100 > @@ -5595,7 +5595,7 @@ > fi > if test -n "$BACKPORT_INCLUDES"; then > OFED_BACKPORT_PATH=`echo $BACKPORT_INCLUDES | > sed "s#.*/src/ofa_kernel/#$O2IBPATH/#"` > - EXTRA_LNET_INCLUDE="-I$OFED_BACKPORT_PATH > $EXTRA_LNET_INCLUDE" > + EXTRA_LNET_INCLUDE="$OFED_BACKPORT_PATH > $EXTRA_LNET_INCLUDE" > echo "$as_me:$LINENO: result: yes" >&5 > echo "${ECHO_T}yes" >&6 > elseNotice that it''s "-I$OFED_BACKPORT_PATH" that we are adding to $EXTRA_LNET_INCLUDE, not "-I$BACKPORT_INCLUDES". Further notice what $OFED_BACKPORT_PATH actually is: OFED_BACKPORT_PATH=`echo $BACKPORT_INCLUDES | sed "s#.*/src/ofa_kernel/#$O2IBPATH/#"` Your patch failed to include enough context, but notice that configure sources config.mk: . $O2IBPATH/config.mk and then uses the $BACKPORT_INCLUDES to derive an $OFED_BACKPORT_PATH with a sed expression: sed "s#.*/src/ofa_kernel/#$O2IBPATH/#" Which would turn an example $BACKPORT_INCLUDES of "-I/usr/src/ofa_kernel/kernel_addons/backport/2.6.18-EL5.3/include/" into "foobar/kernel_addons/backport/2.6.18-EL5.3/include/" assuming $O2IBPATH="foobar". So as you can see, when adding $OFED_BACKPORT_PATH to gcc as an include path, you need to prefix it with "-I". Please do let me know if your experience is any different from my explanation. Please include some xtrace output if so. b. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090810/838040f7/attachment.bin