Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] PATCH: remove trailing colon at the end of thegenerated LD_LIBRARY_PATH
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-02-17 17:14:37


Looks good to me!

Please commit and file CMRs for v1.4 and v1.5 (assuming this patch applies cleanly to both branches).

On Feb 16, 2010, at 6:46 AM, Nadia Derbey wrote:

> Hi,
>
> The mpivars.sh genereted in openmpi.spec might in some cases lead to a
> LD_LIBRARY_PATH that contains a trailing ":". This happens if the
> LD_LIBRARY_PATH is originally unset.
> This means that current directory is included in the search path for the
> loader, which might not be the desired result.
>
> The following patch proposal fixes this potential issue by adding the
> ":" only if LD_LIBRARY_PATH is already set.
>
> Regards,
> Nadia
>
>
> diff -r 6609b6ba7637 contrib/dist/linux/openmpi.spec
> --- a/contrib/dist/linux/openmpi.spec Mon Feb 15 22:14:59 2010 +0000
> +++ b/contrib/dist/linux/openmpi.spec Tue Feb 16 12:44:41 2010 +0100
> @@ -505,7 +505,7 @@ fi
>
> # LD_LIBRARY_PATH
> if test -z "\`echo \$LD_LIBRARY_PATH | grep %{_libdir}\`"; then
> - LD_LIBRARY_PATH=%{_libdir}:\${LD_LIBRARY_PATH}
> + LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}
> export LD_LIBRARY_PATH
> fi
>
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/