[ofa-general] ofed kernel config.mk / BACKPORT_INCLUDES

Brian J. Murrell brian at sun.com
Mon Aug 10 08:17:32 PDT 2009


[ 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
>                 else

Notice 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: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20090810/838040f7/attachment.sig>


More information about the general mailing list