Discussion:
[CMake] Cygwin cmake - Could not find CMAKE_ROOT
Wheeler, Frederick W (GE, Research)
2007-10-05 17:31:21 UTC
Permalink
I'm having trouble running cygwin cmake 2.4.7-2 on two different
machines, one running XP, and one Windows 2000. Here's the error:

% /bin/cmake
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
39 [main] cmake 1196 _cygtls::handle_exceptions: Error while
dumping state (probably corrupted stack)
Segmentation fault (core dumped)

In each case I've installed cmake using the cygwin setup.exe
installer. On the XP machine I just did a reinstall of cmake using
setup.exe, but the problem persists. I'm not sure when this problem
began. It could have started months ago without me noticing.

/usr/share/cmake-2.4.7/Modules/ is full of .cmake and other files.
Looks normal to me. About 192 files dated "Jul 31 09:51".
% ls -l /usr/share/cmake-2.4.7/Modules/|wc -l
194

I thought maybe I had an environment variable problem. But if I unset
every environment variable I get the same behavior.

I get the same error in rxvt, and the usual cygwin bash shell. But
cygwin cmake does in fact work (!!!) when run from a DOS window using:

c:\cygwin\bin\cmake

I tried running bash, sh, tcsh and zsh from a DOS window and then
running /bin/cmake. In each case - same error. I never use tcsh or
zsh, so I don't have any configuration files for them.

cygcheck thinks my cmake install is OK (and cygcheck -c says every
installed package is OK)

% cygcheck -c cmake
Cygwin Package Information
Package Version Status
cmake 2.4.7-2 OK

I updated every installed cygwin package the "current" version a
couple of hours ago.
% md5sum /bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe

I don't see anything about this problem on the cmake or cygwin mailing
lists, so this must be something about my personal setup on these two
machines. Any help or ideas for solving/debugging this would be
appreciated.

Thanks,
Fred Wheeler
Wheeler, Frederick W (GE, Research)
2007-10-08 19:35:15 UTC
Permalink
CMake List:

Amitha and I figured out that I can run cygwin cmake if and only if I
use the full /usr/bin/cmake path. Neither /bin/cmake or cmake work.
This is good enough for me. I just want to report this odd behavior.

Fred


% cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /bin/cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /usr/bin/cmake --version
cmake version 2.4-patch 7

% df
Filesystem 1K-blocks Used Available Use% Mounted on
C:\cygwin\bin 27318532 22716916 4601616 84% /usr/bin
C:\cygwin\lib 27318532 22716916 4601616 84% /usr/lib
C:\cygwin 27318532 22716916 4601616 84% /
c: 27318532 22716916 4601616 84% /cygdrive/c
d: 50733268 36486396 14246872 72% /cygdrive/d
h: 3145728 1130760 2014968 36% /cygdrive/h

% mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type system (binmode,noumount)
d: on /cygdrive/d type system (binmode,noumount)
h: on /cygdrive/h type system (binmode,noumount)

% type cmake
cmake is /bin/cmake
cmake is /usr/bin/cmake
cmake is /cygdrive/c/Program Files/CMake 2.4/bin/cmake

-----Original Message-----
From: Wheeler, Frederick W (GE, Research)
Sent: Friday, October 05, 2007 1:31 PM
To: '***@cmake.org'
Subject: Cygwin cmake - Could not find CMAKE_ROOT


I'm having trouble running cygwin cmake 2.4.7-2 on two different
machines, one running XP, and one Windows 2000. Here's the error:

% /bin/cmake
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
39 [main] cmake 1196 _cygtls::handle_exceptions: Error while
dumping state (probably corrupted stack) Segmentation fault (core
dumped)

In each case I've installed cmake using the cygwin setup.exe installer.
On the XP machine I just did a reinstall of cmake using setup.exe, but
the problem persists. I'm not sure when this problem began. It could
have started months ago without me noticing.

/usr/share/cmake-2.4.7/Modules/ is full of .cmake and other files.
Looks normal to me. About 192 files dated "Jul 31 09:51".
% ls -l /usr/share/cmake-2.4.7/Modules/|wc -l
194

I thought maybe I had an environment variable problem. But if I unset
every environment variable I get the same behavior.

I get the same error in rxvt, and the usual cygwin bash shell. But
cygwin cmake does in fact work (!!!) when run from a DOS window using:

c:\cygwin\bin\cmake

I tried running bash, sh, tcsh and zsh from a DOS window and then
running /bin/cmake. In each case - same error. I never use tcsh or
zsh, so I don't have any configuration files for them.

cygcheck thinks my cmake install is OK (and cygcheck -c says every
installed package is OK)

% cygcheck -c cmake
Cygwin Package Information
Package Version Status
cmake 2.4.7-2 OK

I updated every installed cygwin package the "current" version a couple
of hours ago.
% md5sum /bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe

I don't see anything about this problem on the cmake or cygwin mailing
lists, so this must be something about my personal setup on these two
machines. Any help or ideas for solving/debugging this would be
appreciated.

Thanks,
Fred Wheeler
David Cole
2007-10-08 20:29:53 UTC
Permalink
Sounds like the cmake located at "/bin/cmake" is stale/old, but it's in your
path before the one from /usr/bin...

How did the one at "/bin/cmake" get there?

Maybe just deleting the cmake-related files under /bin and just using the
officially installed ones in /usr/bin is the solution?
Post by Wheeler, Frederick W (GE, Research)
Amitha and I figured out that I can run cygwin cmake if and only if I
use the full /usr/bin/cmake path. Neither /bin/cmake or cmake work.
This is good enough for me. I just want to report this odd behavior.
Fred
% cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /bin/cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /usr/bin/cmake --version
cmake version 2.4-patch 7
% df
Filesystem 1K-blocks Used Available Use% Mounted on
C:\cygwin\bin 27318532 22716916 4601616 84% /usr/bin
C:\cygwin\lib 27318532 22716916 4601616 84% /usr/lib
C:\cygwin 27318532 22716916 4601616 84% /
c: 27318532 22716916 4601616 84% /cygdrive/c
d: 50733268 36486396 14246872 72% /cygdrive/d
h: 3145728 1130760 2014968 36% /cygdrive/h
% mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type system (binmode,noumount)
d: on /cygdrive/d type system (binmode,noumount)
h: on /cygdrive/h type system (binmode,noumount)
% type cmake
cmake is /bin/cmake
cmake is /usr/bin/cmake
cmake is /cygdrive/c/Program Files/CMake 2.4/bin/cmake
-----Original Message-----
From: Wheeler, Frederick W (GE, Research)
Sent: Friday, October 05, 2007 1:31 PM
Subject: Cygwin cmake - Could not find CMAKE_ROOT
I'm having trouble running cygwin cmake 2.4.7-2 on two different
% /bin/cmake
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
39 [main] cmake 1196 _cygtls::handle_exceptions: Error while
dumping state (probably corrupted stack) Segmentation fault (core
dumped)
In each case I've installed cmake using the cygwin setup.exe installer.
On the XP machine I just did a reinstall of cmake using setup.exe, but
the problem persists. I'm not sure when this problem began. It could
have started months ago without me noticing.
/usr/share/cmake-2.4.7/Modules/ is full of .cmake and other files.
Looks normal to me. About 192 files dated "Jul 31 09:51".
% ls -l /usr/share/cmake-2.4.7/Modules/|wc -l
194
I thought maybe I had an environment variable problem. But if I unset
every environment variable I get the same behavior.
I get the same error in rxvt, and the usual cygwin bash shell. But
c:\cygwin\bin\cmake
I tried running bash, sh, tcsh and zsh from a DOS window and then
running /bin/cmake. In each case - same error. I never use tcsh or
zsh, so I don't have any configuration files for them.
cygcheck thinks my cmake install is OK (and cygcheck -c says every
installed package is OK)
% cygcheck -c cmake
Cygwin Package Information
Package Version Status
cmake 2.4.7-2 OK
I updated every installed cygwin package the "current" version a couple
of hours ago.
% md5sum /bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe
I don't see anything about this problem on the cmake or cygwin mailing
lists, so this must be something about my personal setup on these two
machines. Any help or ideas for solving/debugging this would be
appreciated.
Thanks,
Fred Wheeler
_______________________________________________
CMake mailing list
http://www.cmake.org/mailman/listinfo/cmake
Wheeler, Frederick W (GE, Research)
2007-10-08 20:38:00 UTC
Permalink
It looks like the exact same cmake is in both /bin and /usr/bin

% md5sum /bin/cmake.exe /usr/bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */usr/bin/cmake.exe

This would be expected given how cygwin sets up these directories:

http://cygwin.com/faq/faq.using.html#faq.using.directory-structure
( This FAQ is also titled: "Why the weird directory structure?" )

Fred



________________________________

From: David Cole [mailto:***@kitware.com]
Sent: Monday, October 08, 2007 4:30 PM
To: Wheeler, Frederick W (GE, Research)
Cc: ***@cmake.org
Subject: Re: [CMake] RE: Cygwin cmake - Could not find CMAKE_ROOT


Sounds like the cmake located at "/bin/cmake" is stale/old, but it's in
your path before the one from /usr/bin...

How did the one at "/bin/cmake" get there?

Maybe just deleting the cmake-related files under /bin and just using
the officially installed ones in /usr/bin is the solution?



On 10/8/07, Wheeler, Frederick W (GE, Research) <***@crd.ge.com>
wrote:

CMake List:

Amitha and I figured out that I can run cygwin cmake if and only
if I
use the full /usr/bin/cmake path. Neither /bin/cmake or cmake
work.
This is good enough for me. I just want to report this odd
behavior.

Fred


% cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /bin/cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /usr/bin/cmake --version
cmake version 2.4-patch 7

% df
Filesystem 1K-blocks Used Available Use% Mounted
on
C:\cygwin\bin 27318532 22716916 4601616 84% /usr/bin
C:\cygwin\lib 27318532 22716916 4601616 84% /usr/lib

C:\cygwin 27318532 22716916 4601616 84% /
c: 27318532 22716916 4601616 84%
/cygdrive/c
d: 50733268 36486396 14246872 72%
/cygdrive/d
h: 3145728 1130760 2014968 36%
/cygdrive/h

% mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type system (binmode,noumount)
d: on /cygdrive/d type system (binmode,noumount)
h: on /cygdrive/h type system (binmode,noumount)

% type cmake
cmake is /bin/cmake
cmake is /usr/bin/cmake
cmake is /cygdrive/c/Program Files/CMake 2.4/bin/cmake

-----Original Message-----
From: Wheeler, Frederick W (GE, Research)
Sent: Friday, October 05, 2007 1:31 PM
To: '***@cmake.org'
Subject: Cygwin cmake - Could not find CMAKE_ROOT


I'm having trouble running cygwin cmake 2.4.7-2 on two different
machines, one running XP, and one Windows 2000. Here's the
error:

% /bin/cmake
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
39 [main] cmake 1196 _cygtls::handle_exceptions: Error
while
dumping state (probably corrupted stack) Segmentation fault
(core
dumped)

In each case I've installed cmake using the cygwin setup.exe
installer.
On the XP machine I just did a reinstall of cmake using
setup.exe, but
the problem persists. I'm not sure when this problem began. It
could
have started months ago without me noticing.

/usr/share/cmake-2.4.7/Modules/ is full of .cmake and other
files.
Looks normal to me. About 192 files dated "Jul 31 09:51".
% ls -l /usr/share/cmake-2.4.7/Modules/|wc -l
194

I thought maybe I had an environment variable problem. But if I
unset
every environment variable I get the same behavior.

I get the same error in rxvt, and the usual cygwin bash shell.
But
cygwin cmake does in fact work (!!!) when run from a DOS window
using:

c:\cygwin\bin\cmake

I tried running bash, sh, tcsh and zsh from a DOS window and
then
running /bin/cmake. In each case - same error. I never use
tcsh or
zsh, so I don't have any configuration files for them.

cygcheck thinks my cmake install is OK (and cygcheck -c says
every
installed package is OK)

% cygcheck -c cmake
Cygwin Package Information
Package Version Status
cmake 2.4.7-2 OK

I updated every installed cygwin package the "current" version a
couple
of hours ago.
% md5sum /bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe

I don't see anything about this problem on the cmake or cygwin
mailing
lists, so this must be something about my personal setup on
these two
machines. Any help or ideas for solving/debugging this would be
appreciated.

Thanks,
Fred Wheeler


_______________________________________________
CMake mailing list
***@cmake.org
http://www.cmake.org/mailman/listinfo/cmake
David Cole
2007-10-08 20:45:34 UTC
Permalink
Hmmmm....

Well my cygwin PATH starts with:
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin

Why would the cmake in your "/bin" be chosen over the one in "/usr/bin"...?

What happens when you type:
which cmake

What is the value of your PATH environment variable and how did it get that
way...?
Post by Wheeler, Frederick W (GE, Research)
It looks like the exact same cmake is in both /bin and /usr/bin
% md5sum /bin/cmake.exe /usr/bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */usr/bin/cmake.exe
http://cygwin.com/faq/faq.using.html#faq.using.directory-structure
( This FAQ is also titled: "Why the weird directory structure?" )
Fred
------------------------------
*Sent:* Monday, October 08, 2007 4:30 PM
*To:* Wheeler, Frederick W (GE, Research)
*Subject:* Re: [CMake] RE: Cygwin cmake - Could not find CMAKE_ROOT
Sounds like the cmake located at "/bin/cmake" is stale/old, but it's in
your path before the one from /usr/bin...
How did the one at "/bin/cmake" get there?
Maybe just deleting the cmake-related files under /bin and just using the
officially installed ones in /usr/bin is the solution?
Post by Wheeler, Frederick W (GE, Research)
Amitha and I figured out that I can run cygwin cmake if and only if I
use the full /usr/bin/cmake path. Neither /bin/cmake or cmake work.
This is good enough for me. I just want to report this odd behavior.
Fred
% cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /bin/cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /usr/bin/cmake --version
cmake version 2.4-patch 7
% df
Filesystem 1K-blocks Used Available Use% Mounted on
C:\cygwin\bin 27318532 22716916 4601616 84% /usr/bin
C:\cygwin\lib 27318532 22716916 4601616 84% /usr/lib
C:\cygwin 27318532 22716916 4601616 84% /
c: 27318532 22716916 4601616 84% /cygdrive/c
d: 50733268 36486396 14246872 72% /cygdrive/d
h: 3145728 1130760 2014968 36% /cygdrive/h
% mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type system (binmode,noumount)
d: on /cygdrive/d type system (binmode,noumount)
h: on /cygdrive/h type system (binmode,noumount)
% type cmake
cmake is /bin/cmake
cmake is /usr/bin/cmake
cmake is /cygdrive/c/Program Files/CMake 2.4/bin/cmake
-----Original Message-----
From: Wheeler, Frederick W (GE, Research)
Sent: Friday, October 05, 2007 1:31 PM
Subject: Cygwin cmake - Could not find CMAKE_ROOT
I'm having trouble running cygwin cmake 2.4.7-2 on two different
% /bin/cmake
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
39 [main] cmake 1196 _cygtls::handle_exceptions: Error while
dumping state (probably corrupted stack) Segmentation fault (core
dumped)
In each case I've installed cmake using the cygwin setup.exe installer.
On the XP machine I just did a reinstall of cmake using setup.exe, but
the problem persists. I'm not sure when this problem began. It could
have started months ago without me noticing.
/usr/share/cmake-2.4.7/Modules/ is full of .cmake and other files.
Looks normal to me. About 192 files dated "Jul 31 09:51".
% ls -l /usr/share/cmake-2.4.7/Modules/|wc -l
194
I thought maybe I had an environment variable problem. But if I unset
every environment variable I get the same behavior.
I get the same error in rxvt, and the usual cygwin bash shell. But
c:\cygwin\bin\cmake
I tried running bash, sh, tcsh and zsh from a DOS window and then
running /bin/cmake. In each case - same error. I never use tcsh or
zsh, so I don't have any configuration files for them.
cygcheck thinks my cmake install is OK (and cygcheck -c says every
installed package is OK)
% cygcheck -c cmake
Cygwin Package Information
Package Version Status
cmake 2.4.7-2 OK
I updated every installed cygwin package the "current" version a couple
of hours ago.
% md5sum /bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe
I don't see anything about this problem on the cmake or cygwin mailing
lists, so this must be something about my personal setup on these two
machines. Any help or ideas for solving/debugging this would be
appreciated.
Thanks,
Fred Wheeler
_______________________________________________
CMake mailing list
http://www.cmake.org/mailman/listinfo/cmake
Wheeler, Frederick W (GE, Research)
2007-10-08 20:56:02 UTC
Permalink
David,

/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.

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.

To answer your questions ...

% which cmake
/bin/cmake
% type -a cmake
cmake is /bin/cmake
cmake is /usr/bin/cmake
cmake is /cygdrive/c/Program Files/CMake 2.4/bin/cmake
% echo $PATH
/cygdrive/d/home/wheeler/etc/bin:/bin:/usr/bin:/lib/lapack:/usr/X11R6/bi
n:/etc:/sbin:/usr/sbin:/usr/local/bin:/cygdrive/c/Program Files/CMake
2.4/bin/:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/system32

I'll just re-emphasize that cygwin cmake works perfectly for me as long
as I run it via /usr/bin/cmake.

Regards,
Fred

________________________________

From: David Cole [mailto:***@kitware.com]
Sent: Monday, October 08, 2007 4:46 PM
To: Wheeler, Frederick W (GE, Research)
Cc: ***@cmake.org
Subject: Re: [CMake] RE: Cygwin cmake - Could not find CMAKE_ROOT


Hmmmm....

Well my cygwin PATH starts with:
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin

Why would the cmake in your "/bin" be chosen over the one in
"/usr/bin"...?

What happens when you type:
which cmake

What is the value of your PATH environment variable and how did it get
that way...?




On 10/8/07, Wheeler, Frederick W (GE, Research) <***@crd.ge.com>
wrote:


It looks like the exact same cmake is in both /bin and /usr/bin

% md5sum /bin/cmake.exe /usr/bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */usr/bin/cmake.exe

This would be expected given how cygwin sets up these
directories:


http://cygwin.com/faq/faq.using.html#faq.using.directory-structure
( This FAQ is also titled: "Why the weird directory structure?"
)

Fred



________________________________

From: David Cole [mailto:***@kitware.com]
Sent: Monday, October 08, 2007 4:30 PM
To: Wheeler, Frederick W (GE, Research)
Cc: ***@cmake.org
Subject: Re: [CMake] RE: Cygwin cmake - Could not find
CMAKE_ROOT



Sounds like the cmake located at "/bin/cmake" is stale/old, but
it's in your path before the one from /usr/bin...

How did the one at "/bin/cmake" get there?

Maybe just deleting the cmake-related files under /bin and just
using the officially installed ones in /usr/bin is the solution?



On 10/8/07, Wheeler, Frederick W (GE, Research)
<***@crd.ge.com> wrote:

CMake List:

Amitha and I figured out that I can run cygwin cmake if
and only if I
use the full /usr/bin/cmake path. Neither /bin/cmake or
cmake work.
This is good enough for me. I just want to report this
odd behavior.

Fred


% cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /bin/cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /usr/bin/cmake --version
cmake version 2.4-patch 7

% df
Filesystem 1K-blocks Used Available Use%
Mounted on
C:\cygwin\bin 27318532 22716916 4601616 84%
/usr/bin
C:\cygwin\lib 27318532 22716916 4601616 84%
/usr/lib
C:\cygwin 27318532 22716916 4601616 84%
/
c: 27318532 22716916 4601616 84%
/cygdrive/c
d: 50733268 36486396 14246872 72%
/cygdrive/d
h: 3145728 1130760 2014968 36%
/cygdrive/h

% mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type system (binmode,noumount)
d: on /cygdrive/d type system (binmode,noumount)
h: on /cygdrive/h type system (binmode,noumount)

% type cmake
cmake is /bin/cmake
cmake is /usr/bin/cmake
cmake is /cygdrive/c/Program Files/CMake 2.4/bin/cmake

-----Original Message-----
From: Wheeler, Frederick W (GE, Research)
Sent: Friday, October 05, 2007 1:31 PM
To: '***@cmake.org'
Subject: Cygwin cmake - Could not find CMAKE_ROOT


I'm having trouble running cygwin cmake 2.4.7-2 on two
different
machines, one running XP, and one Windows 2000. Here's
the error:

% /bin/cmake
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
39 [main] cmake 1196 _cygtls::handle_exceptions:
Error while
dumping state (probably corrupted stack) Segmentation
fault (core
dumped)

In each case I've installed cmake using the cygwin
setup.exe installer.
On the XP machine I just did a reinstall of cmake using
setup.exe, but
the problem persists. I'm not sure when this problem
began. It could
have started months ago without me noticing.

/usr/share/cmake-2.4.7/Modules/ is full of .cmake and
other files.
Looks normal to me. About 192 files dated "Jul 31
09:51".
% ls -l /usr/share/cmake-2.4.7/Modules/|wc -l
194

I thought maybe I had an environment variable problem.
But if I unset
every environment variable I get the same behavior.

I get the same error in rxvt, and the usual cygwin bash
shell. But
cygwin cmake does in fact work (!!!) when run from a DOS
window using:

c:\cygwin\bin\cmake

I tried running bash, sh, tcsh and zsh from a DOS window
and then
running /bin/cmake. In each case - same error. I never
use tcsh or
zsh, so I don't have any configuration files for them.

cygcheck thinks my cmake install is OK (and cygcheck -c
says every
installed package is OK)

% cygcheck -c cmake
Cygwin Package Information
Package Version Status
cmake 2.4.7-2 OK

I updated every installed cygwin package the "current"
version a couple
of hours ago.
% md5sum /bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe

I don't see anything about this problem on the cmake or
cygwin mailing
lists, so this must be something about my personal setup
on these two
machines. Any help or ideas for solving/debugging this
would be
appreciated.

Thanks,
Fred Wheeler


_______________________________________________
CMake mailing list
***@cmake.org
http://www.cmake.org/mailman/listinfo/cmake
Bill Hoffman
2007-10-08 21:27:41 UTC
Permalink
Post by Wheeler, Frederick W (GE, Research)
David,
/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.
I think there is something to all of this.....

The other day on a Mac, with a PATH issue, I got the same error with an
installed 2.4.7.
Looks like there is something wrong with the code that finds the cmake
executable.

I will look at it when I get a chance. Unless, someone can figure out what
is wrong before I get a chance. :-)

-Bill
David Cole
2007-10-08 21:29:58 UTC
Permalink
I have reproduced this by executing these two lines in a cygwin shell:
export PATH=/bin:$PATH
cmake --version

with cmake 2.4.7
It does not occur with cmake 2.4.3 or cmake 2.4.6

It probably occurs because cmake expects a directory structure of:
bin
doc
man
share

(There are no doc, man and share directories under "/" but they do exist in
"/usr"...)

Sounds like a cygwin-specific cmake bug... :-)
Post by Wheeler, Frederick W (GE, Research)
David,
/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.
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.
To answer your questions ...
% which cmake
/bin/cmake
% type -a cmake
cmake is /bin/cmake
cmake is /usr/bin/cmake
cmake is /cygdrive/c/Program Files/CMake 2.4/bin/cmake
% echo $PATH
/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
I'll just re-emphasize that cygwin cmake works perfectly for me as long as
I run it via /usr/bin/cmake.
Regards,
Fred
------------------------------
*Sent:* Monday, October 08, 2007 4:46 PM
*To:* Wheeler, Frederick W (GE, Research)
*Subject:* Re: [CMake] RE: Cygwin cmake - Could not find CMAKE_ROOT
Hmmmm....
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
Why would the cmake in your "/bin" be chosen over the one in
"/usr/bin"...?
which cmake
What is the value of your PATH environment variable and how did it get
that way...?
Post by Wheeler, Frederick W (GE, Research)
It looks like the exact same cmake is in both /bin and /usr/bin
% md5sum /bin/cmake.exe /usr/bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */usr/bin/cmake.exe
http://cygwin.com/faq/faq.using.html#faq.using.directory-structure
( This FAQ is also titled: "Why the weird directory structure?" )
Fred
------------------------------
*Sent:* Monday, October 08, 2007 4:30 PM
*To:* Wheeler, Frederick W (GE, Research)
*Subject:* Re: [CMake] RE: Cygwin cmake - Could not find CMAKE_ROOT
Sounds like the cmake located at "/bin/cmake" is stale/old, but it's in
your path before the one from /usr/bin...
How did the one at "/bin/cmake" get there?
Maybe just deleting the cmake-related files under /bin and just using
the officially installed ones in /usr/bin is the solution?
Post by Wheeler, Frederick W (GE, Research)
Amitha and I figured out that I can run cygwin cmake if and only if I
use the full /usr/bin/cmake path. Neither /bin/cmake or cmake work.
This is good enough for me. I just want to report this odd behavior.
Fred
% cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /bin/cmake --version
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
Segmentation fault (core dumped)
% /usr/bin/cmake --version
cmake version 2.4-patch 7
% df
Filesystem 1K-blocks Used Available Use% Mounted on
C:\cygwin\bin 27318532 22716916 4601616 84% /usr/bin
C:\cygwin\lib 27318532 22716916 4601616 84% /usr/lib
C:\cygwin 27318532 22716916 4601616 84% /
c: 27318532 22716916 4601616 84% /cygdrive/c
d: 50733268 36486396 14246872 72% /cygdrive/d
h: 3145728 1130760 2014968 36% /cygdrive/h
% mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type system (binmode,noumount)
d: on /cygdrive/d type system (binmode,noumount)
h: on /cygdrive/h type system (binmode,noumount)
% type cmake
cmake is /bin/cmake
cmake is /usr/bin/cmake
cmake is /cygdrive/c/Program Files/CMake 2.4/bin/cmake
-----Original Message-----
From: Wheeler, Frederick W (GE, Research)
Sent: Friday, October 05, 2007 1:31 PM
Subject: Cygwin cmake - Could not find CMAKE_ROOT
I'm having trouble running cygwin cmake 2.4.7-2 on two different
% /bin/cmake
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/bin
39 [main] cmake 1196 _cygtls::handle_exceptions: Error while
dumping state (probably corrupted stack) Segmentation fault (core
dumped)
In each case I've installed cmake using the cygwin setup.exeinstaller.
On the XP machine I just did a reinstall of cmake using setup.exe, but
the problem persists. I'm not sure when this problem began. It could
have started months ago without me noticing.
/usr/share/cmake-2.4.7/Modules/ is full of .cmake and other files.
Looks normal to me. About 192 files dated "Jul 31 09:51".
% ls -l /usr/share/cmake-2.4.7/Modules/|wc -l
194
I thought maybe I had an environment variable problem. But if I unset
every environment variable I get the same behavior.
I get the same error in rxvt, and the usual cygwin bash shell. But
c:\cygwin\bin\cmake
I tried running bash, sh, tcsh and zsh from a DOS window and then
running /bin/cmake. In each case - same error. I never use tcsh or
zsh, so I don't have any configuration files for them.
cygcheck thinks my cmake install is OK (and cygcheck -c says every
installed package is OK)
% cygcheck -c cmake
Cygwin Package Information
Package Version Status
cmake 2.4.7-2 OK
I updated every installed cygwin package the "current" version a couple
of hours ago.
% md5sum /bin/cmake.exe
af465bc5ad9e6157a4898c476bfe62a3 */bin/cmake.exe
I don't see anything about this problem on the cmake or cygwin mailing
lists, so this must be something about my personal setup on these two
machines. Any help or ideas for solving/debugging this would be
appreciated.
Thanks,
Fred Wheeler
_______________________________________________
CMake mailing list
http://www.cmake.org/mailman/listinfo/cmake
Miguel A. Figueroa-Villanueva
2007-10-08 20:49:52 UTC
Permalink
Post by Wheeler, Frederick W (GE, Research)
Amitha and I figured out that I can run cygwin cmake if and only if I
use the full /usr/bin/cmake path. Neither /bin/cmake or cmake work.
This is good enough for me. I just want to report this odd behavior.
Hello Fred,

I have no clue why would this happen, but I just wanted to mention
that I do use cmake 2.4.7 in cygwin without a problem.

I can also call the windows version directly without problems... That is,

// the windows version
$ PATH=/c/Program\ Files/CMake\ 2.4/bin:${PATH} cmake --version
cmake version 2.4-patch 6

// and the cygwin version
$ cmake --version
cmake version 2.4-patch 7

--Miguel
Loading...