Thank you for the links.
I tried the Revision 14205 <https://svn.open-mpi.org/trac/ompi/changeset/14205> of openmpi.spec and it works for me only after some changes:
- in the mpivars-1.2.csh script part,
- and related to the line 330 in the original (14205 <https://svn.open-mpi.org/trac/ompi/changeset/14205>) openmpi.spec:

eval "set %{configure_options}"

which will fail, if configure_options starts with --, in which case it will be interpreted as an option to set.
I attach the patch file.

Marcin
--- openmpi.spec	2007-04-04 09:34:12.397722000 +0200
+++ openmpi-fixed.spec	2007-04-04 10:25:26.648442000 +0200
@@ -327,7 +327,8 @@

 if test "$using_gcc" = "1"; then
     # Do wretched things to find a CC=* token
-    eval "set %{configure_options}"
+    # Remove starting --*, as it is interpreted as an option to set
+    eval "set `echo %{configure_options} | sed 's/--*//'`"
     compiler=
     while test "$1" != "" -a "$compiler" = ""; do
          case "$1" in
@@ -449,7 +450,7 @@

 # LD_LIBRARY_PATH
 if ("1" == "\$?LD_LIBRARY_PATH") then
-    if ("\$LD_LIBRARY_PATH" =~ "'*%{_libdir}*'") then
+    if ("\$LD_LIBRARY_PATH" !~ *%{_libdir}*) then
         setenv LD_LIBRARY_PATH %{_libdir}:\${LD_LIBRARY_PATH}
     endif
 else
@@ -458,11 +459,11 @@

 # MANPATH
 if ("1" == "\$?MANPATH") then
-    if ("\$MANPATH" =~ '*%{_mandir}*'") then
+    if ("\$MANPATH" !~ *%{_mandir}*) then
         setenv MANPATH %{_mandir}:\${MANPATH}
     endif
 else
-    setenv MANPATH %{_mandir}:
+    setenv MANPATH %{_mandir}
 endif
 EOF
 %endif

Reply via email to