I tested it as Todd described on intrepid at Argonne, works.<br><br>Pat<br><br><div class="gmail_quote">On Sat, Jul 3, 2010 at 12:18 AM, Todd Gamblin <span dir="ltr">&lt;<a href="mailto:tgamblin@llnl.gov">tgamblin@llnl.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Brad,<br>
<br>
Sorry for the slow response. This patch works on dawndev (BG/P FEN) at LLNL.  I tested it with cmake 2.8.2, and just did bootstrap --prefix=/path/to/install.    Everything went fine.<br>
<font color="#888888"><br>
-Todd<br>
</font><div><div></div><div class="h5"><br>
<br>
On Jun 30, 2010, at 7:58 AM, Brad King wrote:<br>
<br>
&gt; Look for a C/C++ compiler pair from known toolchains on some platforms.<br>
&gt; This makes it less likely that mismatched compilers will be found.<br>
&gt; Check only if the environment variables CC and CXX are both empty.<br>
&gt; ---<br>
&gt;<br>
&gt; Todd Gamblin wrote:<br>
&gt;&gt; 1. Bootstrap script doesn&#39;t seem to work quite right on the frontend.<br>
&gt;&gt;<br>
&gt;&gt; Building CMake was a bit hairy on the Power6 front end node on our<br>
&gt;&gt; BlueGene systems.  The machine runs Linux and has both GNU and IBM XL<br>
&gt;&gt; toolchains for the frontend itself.  The CMake bootstrap script detected<br>
&gt;&gt; cc for the C compiler and xlC for the C++ compiler, and linking failed<br>
&gt;&gt; on something 50% through the build because it was passing -dynamic to<br>
&gt;&gt; xlC, which is the wrong flag.  It would be nice if CMake would prefer<br>
&gt;&gt; one or the other tool chain.<br>
&gt;<br>
&gt; Please try this patch on the Power6 front-end to your BlueGene.<br>
&gt; It should prefer matching compiler pairs first.<br>
&gt;<br>
&gt; -Brad<br>
&gt;<br>
&gt; bootstrap |   71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-<br>
&gt; 1 files changed, 69 insertions(+), 2 deletions(-)<br>
&gt;<br>
&gt; diff --git a/bootstrap b/bootstrap<br>
&gt; index 1687776..01d9e15 100755<br>
&gt; --- a/bootstrap<br>
&gt; +++ b/bootstrap<br>
&gt; @@ -650,11 +650,74 @@ if ${cmake_system_haiku}; then<br>
&gt;   cmake_ld_flags=&quot;${LDFLAGS} -lroot -lbe&quot;<br>
&gt; fi<br>
&gt;<br>
&gt; +#-----------------------------------------------------------------------------<br>
&gt; +# Detect known toolchains on some platforms.<br>
&gt; +cmake_toolchains=&#39;&#39;<br>
&gt; +case &quot;${cmake_system}&quot; in<br>
&gt; +  *AIX*)   cmake_toolchains=&#39;XL GNU&#39; ;;<br>
&gt; +  *CYGWIN*) cmake_toolchains=&#39;GNU&#39; ;;<br>
&gt; +  *Darwin*) cmake_toolchains=&#39;GNU Clang&#39; ;;<br>
&gt; +  *Linux*) cmake_toolchains=&#39;GNU Clang XL PGI PathScale&#39; ;;<br>
&gt; +  *MINGW*) cmake_toolchains=&#39;GNU&#39; ;;<br>
&gt; +esac<br>
&gt; +<br>
&gt; +# Toolchain compiler name table.<br>
&gt; +cmake_toolchain_Clang_CC=&#39;clang&#39;<br>
&gt; +cmake_toolchain_Clang_CXX=&#39;clang++&#39;<br>
&gt; +cmake_toolchain_GNU_CC=&#39;gcc&#39;<br>
&gt; +cmake_toolchain_GNU_CXX=&#39;g++&#39;<br>
&gt; +cmake_toolchain_PGI_CC=&#39;pgcc&#39;<br>
&gt; +cmake_toolchain_PGI_CXX=&#39;pgCC&#39;<br>
&gt; +cmake_toolchain_PathScale_CC=&#39;pathcc&#39;<br>
&gt; +cmake_toolchain_PathScale_CXX=&#39;pathCC&#39;<br>
&gt; +cmake_toolchain_XL_CC=&#39;xlc&#39;<br>
&gt; +cmake_toolchain_XL_CXX=&#39;xlC&#39;<br>
&gt; +<br>
&gt; +cmake_toolchain_try()<br>
&gt; +{<br>
&gt; +  tc=&quot;$1&quot;<br>
&gt; +  TMPFILE=`cmake_tmp_file`<br>
&gt; +<br>
&gt; +  eval &quot;tc_CC=\${cmake_toolchain_${tc}_CC}&quot;<br>
&gt; +  echo &#39;int main() { return 0; }&#39; &gt; &quot;${TMPFILE}.c&quot;<br>
&gt; +  cmake_try_run &quot;$tc_CC&quot; &quot;&quot; &quot;${TMPFILE}.c&quot; &gt;&gt; cmake_bootstrap.log 2&gt;&amp;1<br>
&gt; +  tc_result_CC=&quot;$?&quot;<br>
&gt; +  rm -f &quot;${TMPFILE}.c&quot;<br>
&gt; +  test &quot;${tc_result_CC}&quot; = &quot;0&quot; || return 1<br>
&gt; +<br>
&gt; +  eval &quot;tc_CXX=\${cmake_toolchain_${tc}_CXX}&quot;<br>
&gt; +  echo &#39;int main() { return 0; }&#39; &gt; &quot;${TMPFILE}.cpp&quot;<br>
&gt; +  cmake_try_run &quot;$tc_CXX&quot; &quot;&quot; &quot;${TMPFILE}.cpp&quot; &gt;&gt; cmake_bootstrap.log 2&gt;&amp;1<br>
&gt; +  tc_result_CXX=&quot;$?&quot;<br>
&gt; +  rm -f &quot;${TMPFILE}.cpp&quot;<br>
&gt; +  test &quot;${tc_result_CXX}&quot; = &quot;0&quot; || return 1<br>
&gt; +<br>
&gt; +  cmake_toolchain=&quot;$tc&quot;<br>
&gt; +}<br>
&gt; +<br>
&gt; +cmake_toolchain_detect()<br>
&gt; +{<br>
&gt; +  cmake_toolchain=<br>
&gt; +  for tc in ${cmake_toolchains}; do<br>
&gt; +    echo &quot;Checking for $tc toolchain&quot; &gt;&gt; cmake_bootstrap.log 2&gt;&amp;1<br>
&gt; +    cmake_toolchain_try &quot;$tc&quot; &amp;&amp;<br>
&gt; +    echo &quot;Found $tc toolchain&quot; &amp;&amp;<br>
&gt; +    break<br>
&gt; +  done<br>
&gt; +}<br>
&gt; +<br>
&gt; +if [ -z &quot;${CC}&quot; -a -z &quot;${CXX}&quot; ]; then<br>
&gt; +  cmake_toolchain_detect<br>
&gt; +fi<br>
&gt; +<br>
&gt; +#-----------------------------------------------------------------------------<br>
&gt; # Test C compiler<br>
&gt; cmake_c_compiler=<br>
&gt;<br>
&gt; # If CC is set, use that for compiler, otherwise use list of known compilers<br>
&gt; -if [ -n &quot;${CC}&quot; ]; then<br>
&gt; +if [ -n &quot;${cmake_toolchain}&quot; ]; then<br>
&gt; +  eval cmake_c_compilers=&quot;\${cmake_toolchain_${cmake_toolchain}_CC}&quot;<br>
&gt; +elif [ -n &quot;${CC}&quot; ]; then<br>
&gt;   cmake_c_compilers=&quot;${CC}&quot;<br>
&gt; else<br>
&gt;   cmake_c_compilers=&quot;${CMAKE_KNOWN_C_COMPILERS}&quot;<br>
&gt; @@ -697,13 +760,16 @@ See cmake_bootstrap.log for compilers attempted.<br>
&gt; fi<br>
&gt; echo &quot;C compiler on this system is: ${cmake_c_compiler} ${cmake_c_flags}&quot;<br>
&gt;<br>
&gt; +#-----------------------------------------------------------------------------<br>
&gt; # Test CXX compiler<br>
&gt; cmake_cxx_compiler=<br>
&gt;<br>
&gt; # On Mac OSX, CC is the same as cc, so make sure not to try CC as c++ compiler.<br>
&gt;<br>
&gt; # If CC is set, use that for compiler, otherwise use list of known compilers<br>
&gt; -if [ -n &quot;${CXX}&quot; ]; then<br>
&gt; +if [ -n &quot;${cmake_toolchain}&quot; ]; then<br>
&gt; +  eval cmake_cxx_compilers=&quot;\${cmake_toolchain_${cmake_toolchain}_CXX}&quot;<br>
&gt; +elif [ -n &quot;${CXX}&quot; ]; then<br>
&gt;   cmake_cxx_compilers=&quot;${CXX}&quot;<br>
&gt; else<br>
&gt;   cmake_cxx_compilers=&quot;${CMAKE_KNOWN_CXX_COMPILERS}&quot;<br>
&gt; @@ -754,6 +820,7 @@ See cmake_bootstrap.log for compilers attempted.&quot;<br>
&gt; fi<br>
&gt; echo &quot;C++ compiler on this system is: ${cmake_cxx_compiler} ${cmake_cxx_flags}&quot;<br>
&gt;<br>
&gt; +#-----------------------------------------------------------------------------<br>
&gt; # Test Make<br>
&gt;<br>
&gt; cmake_make_processor=<br>
&gt; --<br>
&gt; 1.7.0<br>
&gt;<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>