[Cmake] "make install" fails - new release of CMake?

William A. Hoffman billlist at nycap.rr.com
Fri Jul 2 15:04:06 EDT 2004


At 01:37 PM 7/2/2004, Hans Fredrik Nordhaug wrote:
>On Fri, Jul 02, 2004 at 08:58:38AM -0400, Andy Cedilnik wrote:
>> Hi Hans,
>> 
>> Looked a little more into this and the problem is the fact that you are
>> using msys as Unix environment. CMake installed files to /usr/local as
>> you asked it. That would be c:/usr/local and not what looks like
>> /usr/local from MSys, which is in reality c:/msys/1.0.
>
>I'm aware of this and maybe should have made the use of MSYS clearer.
> 
>> I would go even further to say that /usr/local is just as good place to
>> install things on windows as any. 
>> 
>> So, it is up to you to say, well, I would like this program to go to
>> c:/msys/1.0/local. 
>
>OK, but:
>
>1) In version 1.8.3 /usr/local was translated to c:/msys/1.0/local
>   by CMake. This is for some reason changed with version 2.0.2.
>2) /usr/local/bin/wx-config is still automatically translated to
>   C:/MSYS/local/bin/wx-config when executing
>   "FIND_PROGRAM( CMAKE_WX_CONFIG wx-config ../wx/bin ../../wx/bin )"
>   This doesn't seem consistent with 1)
>3) Why is
>     cmake -DCMAKE_INSTALL_PREFIX:PATH="/usr/local" -G"Unix Makefiles"
>   different from
>     cmake -G"Unix Makefiles"
>   when the default for CMAKE_INSTALL_PREFIX actually is "/usr/local"?
>   Seems very inconsistent to me...

In CMake 2.0, the install was changed from using install.sh to being implemented 
as part of cmake.  As a result, cmake install is now faster, and actually
works on systems that do not have /bin/sh like windows without cygwin or msys.
A side effect of that is that msys paths are not recognized by cmake as they
were by the /bin/sh used in 1.8.   So, to explain your 1,2, and 3:

1. install.sh used msys /bin/sh and knew about msys paths.

2. Since it is looking in ../, cmake is actually finding a path, and using a windows path,
since that is the native paths for the windows build of cmake. If you changed
it to /usr/bin/wx or some other full path with /, cmake would not find it at all.

3. Msys is actually modifying the arguments that are coming into cmake!
It took a while to track down, but I found that 
cmake -DCMAKE_INSTALL_PREFIX:PATH="/usr/local"
sets argv[1] to -DCMAKE_INSTALL_PREFIX:PATH=C:/msys/1.0/local
I would not expect that, but that is what it did.

I am not sure exactly what to do, other than say that is how it works
with MSYS.

-Bill



More information about the Cmake mailing list