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 "/" but they do exist in "/usr"...)<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> <<a href="mailto:wheeler@crd.ge.com">wheeler@crd.ge.com</a>> 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> </div>
<div align="left" dir="ltr"><span><font color="#0000ff" face="Arial" size="2">/bin is before /usr/bin in my path. 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> </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. For whatever reason, I'm sure a
lot of people have done that. For them, cygwin cmake may not
work.</font></span></div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font> </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> </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 <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'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"> </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 "/bin" be chosen over the one in "/usr/bin"...?<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><<a href="mailto:wheeler@crd.ge.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">wheeler@crd.ge.com</a>> 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> </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> </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> </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 titled: "<font color="#000000" face="Times New Roman" size="3">Why
the weird directory structure?</font>" )</font></span></div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font> </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> </div>
<div align="left" dir="ltr"><font color="#0000ff" face="Arial" size="2"></font> </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 "/bin/cmake" is stale/old, but
it's in your path before the one from /usr/bin...<br><br>How did the one at
"/bin/cmake" 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> <<a href="mailto:wheeler@crd.ge.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">wheeler@crd.ge.com</a>>
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. Neither /bin/cmake
or cmake work.<br>This is good enough for me. 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
1K-blocks Used Available Use% Mounted
on<br>C:\cygwin\bin
27318532 22716916 4601616 84%
/usr/bin<br>C:\cygwin\lib
27318532 22716916 4601616 84% /usr/lib
<br>C:\cygwin
27318532 22716916 4601616 84%
/<br>c: 27318532 22716916
4601616 84%
/cygdrive/c<br>d: 50733268 36486396 14246872 72%
/cygdrive/d<br>h:
3145728 1130760 2014968 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: '<a href="mailto:cmake@cmake.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">cmake@cmake.org</a>'<br>Subject:
Cygwin cmake - Could not find CMAKE_ROOT<br><br><br>I'm having trouble
running cygwin cmake 2.4.7-2 on two different<br>machines, one running XP,
and one Windows 2000. Here'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> 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'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. I'm not sure when this problem began. 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. About 192 files dated "Jul 31
09:51".<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. 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. But<br>cygwin cmake does in fact work (!!!) when run from
a DOS window using:<br><br> c:\cygwin\bin\cmake <br><br>I tried
running bash, sh, tcsh and zsh from a DOS window and then<br>running
/bin/cmake. In each case - same error. I never use
tcsh or<br>zsh, so I don'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 Version Status<br>cmake 2.4.7-2 OK<br><br>I
updated every installed cygwin package the "current" version a couple <br>of
hours ago.<br>% md5sum /bin/cmake.exe<br>af465bc5ad9e6157a4898c476bfe62a3
*/bin/cmake.exe<br><br>I don'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. 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>