I have reproduced this by executing these two lines in a cygwin shell:<br>
export PATH=/bin:$PATH<br>
cmake --version<br>
<br>
with cmake 2.4.7<br>
It does not occur with cmake 2.4.3 or cmake 2.4.6<br><br>
It probably occurs because cmake expects a directory structure of:<br>
bin<br>
doc<br>
man<br>
share<br>
<br>
(There are no doc, man and share directories under &quot;/&quot; but they do exist in &quot;/usr&quot;...)<br>
<br>
Sounds like a cygwin-specific cmake bug... :-)<br>
<br>
<br><div><span class="gmail_quote">On 10/8/07, <b class="gmail_sendername">Wheeler, Frederick W (GE, Research)</b> &lt;<a href="mailto:wheeler@crd.ge.com">wheeler@crd.ge.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"><span>David,</span></font></div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div>
<div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2">/bin is before /usr/bin in my path.&nbsp; My .bashrc file 
was created so long ago, and changed so many times that it is impossible to know 
why this is so.</font></span></div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div>
<div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2">I think the bigger issue here is that it is not forbidden 
to put /bin before /usr/bin in your path.&nbsp; For whatever reason, I&#39;m sure a 
lot of people have done that.&nbsp; For them, cygwin cmake may not 
work.</font></span></div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div>
<div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2">To answer your questions ...</font></span></div>
<div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2">% which 
cmake<br>/bin/cmake</font></div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2">% type&nbsp;<span>-a </span>cmake<span class="q"><br>cmake is /bin/cmake<br>cmake is 
/usr/bin/cmake<br>cmake is /cygdrive/c/Program Files/CMake 2.4/bin/cmake<br></span>% 
echo 
$PATH<br>/cygdrive/d/home/wheeler/etc/bin:/bin:/usr/bin:/lib/lapack:/usr/X11R6/bin:/etc:/sbin:/usr/sbin:/usr/local/bin:/cygdrive/c/Program 
Files/CMake 
2.4/bin/:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/system32<br></font></div>
<div align="left" dir="ltr"><font><span><font color="#0000ff" face="Arial" size="2">I&#39;ll just re-emphasize that cygwin cmake works perfectly 
for me as long as I run it via /usr/bin/cmake.</font></span></font></div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2">&nbsp;</font></div>
<div align="left" dir="ltr"><font><span><font color="#0000ff" face="Arial" size="2">Regards,</font></span></font></div>
<div align="left" dir="ltr"><font><span><font color="#0000ff" face="Arial" size="2">Fred</font></span></font><font></font></div><br>
<div align="left" dir="ltr" lang="en-us">
<hr>
<font face="Tahoma" size="2"><span class="q"><b>From:</b> David Cole [mailto:<a href="mailto:david.cole@kitware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">david.cole@kitware.com</a>] 
<br></span><b>Sent:</b> Monday, October 08, 2007 4:46 PM</font><div><span class="e" id="q_115816736741cc64_5"><font face="Tahoma" size="2"><br><b>To:</b> Wheeler, 
Frederick W (GE, Research)<br><b>Cc:</b> <a href="mailto:cmake@cmake.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">cmake@cmake.org</a><br><b>Subject:</b> Re: 
[CMake] RE: Cygwin cmake - Could not find CMAKE_ROOT<br></font></span></div><br></div><div><span class="e" id="q_115816736741cc64_7">
<div></div>Hmmmm....<br><br>Well my cygwin PATH starts 
with:<br>/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin<br><br>Why would the cmake 
in your &quot;/bin&quot; be chosen over the one in &quot;/usr/bin&quot;...?<br><br>What happens when 
you type: <br>which cmake<br><br>What is the value of your PATH environment 
variable and how did it get that way...?<br><br><br><br>
<div><span class="gmail_quote">On 10/8/07, <b class="gmail_sendername">Wheeler, 
Frederick W (GE, Research) </b>&lt;<a href="mailto:wheeler@crd.ge.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">wheeler@crd.ge.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
  <div>
  <div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div>
  <div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2">It looks 
  like the exact same cmake is in both /bin and /usr/bin</font></span></div>
  <div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div>
  <div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2">% md5sum 
  /bin/cmake.exe /usr/bin/cmake.exe<br>af465bc5ad9e6157a4898c476bfe62a3 
  */bin/cmake.exe<br>af465bc5ad9e6157a4898c476bfe62a3 
  */usr/bin/cmake.exe<br></font></div>
  <div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2">This would 
  be expected given how cygwin sets up these directories:</font></span></div>
  <div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div>
  <div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"><a href="http://cygwin.com/faq/faq.using.html#faq.using.directory-structure" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://cygwin.com/faq/faq.using.html#faq.using.directory-structure</a></font></div>
  <div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2">( This FAQ 
  is also&nbsp;titled: &quot;<font color="#000000" face="Times New Roman" size="3">Why 
  the weird directory structure?</font>&quot; )</font></span></div>
  <div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div>
  <div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2">Fred</font></span></div>
  <div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
  <div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div><br>
  <div align="left" dir="ltr" lang="en-us">
  <hr>
  <font face="Tahoma" size="2"><b>From:</b> David Cole [mailto:<a href="mailto:david.cole@kitware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">david.cole@kitware.com</a>] 
  <br><b>Sent:</b> Monday, October 08, 2007 4:30 PM<br><b>To:</b> Wheeler, 
  Frederick W (GE, Research)<br><b>Cc:</b> <a href="mailto:cmake@cmake.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">cmake@cmake.org</a><br><b>Subject:</b> Re: [CMake] RE: Cygwin 
  cmake - Could not find CMAKE_ROOT<br></font><br></div>
  <div><span>
  <div></div>Sounds like the cmake located at &quot;/bin/cmake&quot; is stale/old, but 
  it&#39;s in your path before the one from /usr/bin...<br><br>How did the one at 
  &quot;/bin/cmake&quot; get there?<br><br>Maybe just deleting the cmake-related files 
  under /bin and just using the officially installed ones in /usr/bin is the 
  solution? <br><br><br>
  <div><span class="gmail_quote">On 10/8/07, <b class="gmail_sendername">Wheeler, 
  Frederick W (GE, Research)</b> &lt;<a href="mailto:wheeler@crd.ge.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">wheeler@crd.ge.com</a>&gt; 
  wrote:</span> 
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">CMake 
    List:<br><br>Amitha and I figured out that I can run cygwin cmake if and 
    only if I<br>use the full /usr/bin/cmake path.&nbsp;&nbsp;Neither /bin/cmake 
    or cmake work.<br>This is good enough for me.&nbsp;&nbsp;I just want to 
    report this odd behavior. <br><br>Fred<br><br><br>% cmake --version<br>CMake 
    Error: Could not find CMAKE_ROOT !!!<br>CMake has most likely not been 
    installed correctly.<br>Modules directory not found 
    in<br>/bin<br>Segmentation fault (core dumped)<br>% /bin/cmake 
    --version<br>CMake Error: Could not find CMAKE_ROOT !!!<br>CMake has most 
    likely not been installed correctly.<br>Modules directory not found 
    in<br>/bin<br>Segmentation fault (core dumped)<br>% /usr/bin/cmake --version 
    <br>cmake version 2.4-patch 7<br><br>% 
    df<br>Filesystem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    1K-blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used Available Use% Mounted 
    on<br>C:\cygwin\bin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    27318532&nbsp;&nbsp;22716916&nbsp;&nbsp; 4601616&nbsp;&nbsp;84% 
    /usr/bin<br>C:\cygwin\lib&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    27318532&nbsp;&nbsp;22716916&nbsp;&nbsp; 4601616&nbsp;&nbsp;84% /usr/lib 
    <br>C:\cygwin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    27318532&nbsp;&nbsp;22716916&nbsp;&nbsp; 4601616&nbsp;&nbsp;84% 
    /<br>c:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;27318532&nbsp;&nbsp;22716916&nbsp;&nbsp; 
    4601616&nbsp;&nbsp;84% 
    /cygdrive/c<br>d:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;50733268&nbsp;&nbsp;36486396&nbsp;&nbsp;14246872&nbsp;&nbsp;72% 
    /cygdrive/d<br>h:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    3145728&nbsp;&nbsp; 1130760&nbsp;&nbsp; 2014968&nbsp;&nbsp;36% /cygdrive/h 
    <br><br>% mount<br>C:\cygwin\bin on /usr/bin type system 
    (binmode)<br>C:\cygwin\lib on /usr/lib type system (binmode)<br>C:\cygwin on 
    / type system (binmode)<br>c: on /cygdrive/c type system 
    (binmode,noumount)<br>d: on /cygdrive/d type system (binmode,noumount) 
    <br>h: on /cygdrive/h type system (binmode,noumount)<br><br>% type 
    cmake<br>cmake is /bin/cmake<br>cmake is /usr/bin/cmake<br>cmake is 
    /cygdrive/c/Program Files/CMake 2.4/bin/cmake<br><br>-----Original 
    Message-----<br>From: Wheeler, Frederick W (GE, Research) <br>Sent: Friday, 
    October 05, 2007 1:31 PM<br>To: &#39;<a href="mailto:cmake@cmake.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">cmake@cmake.org</a>&#39;<br>Subject: 
    Cygwin cmake - Could not find CMAKE_ROOT<br><br><br>I&#39;m having trouble 
    running cygwin cmake 2.4.7-2 on two different<br>machines, one running XP, 
    and one Windows 2000.&nbsp;&nbsp;Here&#39;s the error:<br><br>% 
    /bin/cmake<br>CMake Error: Could not find CMAKE_ROOT !!!<br>CMake has most 
    likely not been installed correctly.<br>Modules directory not found 
    in<br>/bin<br>&nbsp;&nbsp;&nbsp;&nbsp; 39 [main] cmake 1196 
    _cygtls::handle_exceptions: Error while<br>dumping state (probably corrupted 
    stack) Segmentation fault (core<br>dumped)<br><br>In each case I&#39;ve 
    installed cmake using the cygwin setup.exe installer.<br>On the XP machine I 
    just did a reinstall of cmake using setup.exe, but<br>the problem 
    persists.&nbsp;&nbsp;I&#39;m not sure when this problem began.&nbsp;&nbsp;It 
    could<br>have started months ago without me 
    noticing.<br><br>/usr/share/cmake-2.4.7/Modules/ is full of .cmake and other 
    files.<br>Looks normal to me.&nbsp;&nbsp;About 192 files dated &quot;Jul 31 
    09:51&quot;.<br>% ls -l /usr/share/cmake-2.4.7/Modules/|wc -l<br>194<br><br>I 
    thought maybe I had an environment variable problem.&nbsp;&nbsp;But if I 
    unset <br>every environment variable I get the same behavior.<br><br>I get 
    the same error in rxvt, and the usual cygwin bash 
    shell.&nbsp;&nbsp;But<br>cygwin cmake does in fact work (!!!) when run from 
    a DOS window using:<br><br>&nbsp;&nbsp;c:\cygwin\bin\cmake <br><br>I tried 
    running bash, sh, tcsh and zsh from a DOS window and then<br>running 
    /bin/cmake.&nbsp;&nbsp;In each case - same error.&nbsp;&nbsp;I never use 
    tcsh or<br>zsh, so I don&#39;t have any configuration files for 
    them.<br><br>cygcheck thinks my cmake install is OK (and cygcheck -c says 
    every <br>installed package is OK)<br><br>% cygcheck -c cmake<br>Cygwin 
    Package 
    Information<br>Package&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Status<br>cmake&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.4.7-2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OK<br><br>I 
    updated every installed cygwin package the &quot;current&quot; version a couple <br>of 
    hours ago.<br>% md5sum /bin/cmake.exe<br>af465bc5ad9e6157a4898c476bfe62a3 
    */bin/cmake.exe<br><br>I don&#39;t see anything about this problem on the cmake 
    or cygwin mailing<br>lists, so this must be something about my personal 
    setup on these two <br>machines.&nbsp;&nbsp;Any help or ideas for 
    solving/debugging this would be<br>appreciated.<br><br>Thanks,<br>Fred 
    Wheeler<br><br><br>_______________________________________________<br>CMake 
    mailing list<br><a href="mailto:CMake@cmake.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">CMake@cmake.org</a><br><a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></span></div></div></blockquote></div><br></span></div></div>
</blockquote></div><br>