Newbie question: cmake does not have nmake generator

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie question: cmake does not have nmake generator

DavidA-2
Hi
 
I am new to cmake. I have installed cmake (using cmake-2.6.4-win32-x86.exe) on my Win XP platform, on which I also have Visual Studio 2005 Prof and Visual Studio 2008 Express installed.
 
I am trying to build PLplot, whose instructions tell me to run:
 
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=install ..
 
but I get:
 
CMake Error: Could not create named generator
-- Check for working C compiler: gcc
-- Check for working C compiler: gcc -- broken
The C compiler "gcc" is not able to compile a simple test program.
 
It appears that cmake only knows about the unix generator:
 
C:\plplot-5.9.5\buildnmake>cmake --help
[snip]
The following generators are available on this platform:
  Unix Makefiles              = Generates standard UNIX makefiles.
 
I have run Visual Studio file vcvars32.bat
 
How can I install the nmake and Visual Studio 8 generators please?
Best regards
David
 

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question: cmake does not have nmake generator

Bill Hoffman
David Aldrich wrote:

> Hi
>  
> I am new to cmake. I have installed cmake (using
> cmake-2.6.4-win32-x86.exe) on my Win XP platform, on which I also have
> Visual Studio 2005 Prof and Visual Studio 2008 Express installed.
>  
> I am trying to build PLplot, whose instructions tell me to run:
>  
> cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=install ..
>  
> but I get:
>  
> CMake Error: Could not create named generator
> -- Check for working C compiler: gcc
> -- Check for working C compiler: gcc -- broken
> The C compiler "gcc" is not able to compile a simple test program.
>  
> It appears that cmake only knows about the unix generator:
>  
> C:\plplot-5.9.5\buildnmake>cmake --help
> [snip]
> The following generators are available on this platform:
>   Unix Makefiles              = Generates standard UNIX makefiles.
>  
> I have run Visual Studio file vcvars32.bat
>  
> How can I install the nmake and Visual Studio 8 generators please?
> Best regards
> David
>  
My guess is you are using the cygwin built CMake, use the windows CMake
from www.cmake.org.

-Bill


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question: cmake does not have nmake generator

DavidA-2
Hi Bill and Alan

Thank you both very much for answering my question. I did indeed have an old version of CMake, from a forgotten installation of Cygwin, and that was being invoked. I have now deleted that old CMake (and hopefully Cygwin as well) and am now truly running 2.6.4.

C:\plplot-5.9.5\buildnmake>cmake --help
cmake version 2.6-patch 4
[snip]

However, I have now hit another problem:

C:\plplot-5.9.5\buildnmake>cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=install ..
CMake Error: The source "C:/plplot-5.9.5/CMakeLists.txt" does not match the source "/cygdrive/c/plplot-5.9.5/CMakeLists.
txt" used to generate cache.  Re-run cmake with a different source directory.

Any idea why this is happening please? Is the mention of 'cygdrive' worrying?

Best regards

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question: cmake does not have nmake generator

DavidA-2
In reply to this post by Bill Hoffman
Hi

> Any idea why this is happening please?

Sorry, I should have thought a little more. I deleted the contents of buildnmake and now CMake succeeds.

I then executed:

C:\plplot-5.9.5\buildnmake>path=...\plplot-5.9.5\buildnmake\dll;%PATH%
C:\plplot-5.9.5\buildnmake>nmake

and the nmake output terminates with:

[ 87%] Building C object drivers/CMakeFiles/xfig.dir/xfig.c.obj
xfig.c
Linking C shared module ..\dll\xfig.dll
   Creating library ..\dll\xfig.lib and object ..\dll\xfig.exp
   Creating library ..\dll\xfig.lib and object ..\dll\xfig.exp
[ 87%] Built target xfig
Scanning dependencies of target test_dyndrivers
[ 87%] Generating test_dyndrivers_dir/mem.rc
NMAKE : fatal error U1077: '.\test-drv-info.exe' : return code '0xc0000135'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

Any ideas on this one please? I started from the Visual Studio 2005 command line interface, but Visual Studio 8 nmake has been invoked. I wonder if that is causing the problem?

Best regards

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question: cmake does not have nmake generator

Arjen Markus-2
In reply to this post by DavidA-2
Hi David,

you should start cmake in a clean directory - old stuff might get in the
way otherwise, as a lot of information is being cached.

Regards,

Arjen

On 2009-09-10 10:05, David Aldrich wrote:

> Hi Bill and Alan
>
> Thank you both very much for answering my question. I did indeed have an old version of CMake, from a forgotten installation of Cygwin, and that was being invoked. I have now deleted that old CMake (and hopefully Cygwin as well) and am now truly running 2.6.4.
>
> C:\plplot-5.9.5\buildnmake>cmake --help
> cmake version 2.6-patch 4
> [snip]
>
> However, I have now hit another problem:
>
> C:\plplot-5.9.5\buildnmake>cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=install ..
> CMake Error: The source "C:/plplot-5.9.5/CMakeLists.txt" does not match the source "/cygdrive/c/plplot-5.9.5/CMakeLists.
> txt" used to generate cache.  Re-run cmake with a different source directory.
>
> Any idea why this is happening please? Is the mention of 'cygdrive' worrying?
>
> Best regards
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question: cmake does not have nmake generator

DavidA-2
Hi Arjen

> you should start cmake in a clean directory - old stuff might get in the
> way otherwise, as a lot of information is being cached.

Yes, that was the problem. Thanks.

As I wrote in another mail this morning (the order seems to have got reversed) CMake now succeeds but nmake fails:

[ 87%] Generating test_dyndrivers_dir/null.rc
NMAKE : fatal error U1077: '.\test-drv-info.exe' : return code '0xc0000135'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

I am wondering whether this is to do with the dll path, but my path does start with:

PATH=..\..\plplot-5.9.5\buildnmake\dll;

Best regards

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question: cmake does not have nmake generator

Arjen Markus-2
Hi David,

this is PLplot-specific, has nothing (or at least very little) to do
with CMake. The problem is that the program that creates these driver
files needs a few DLLs and they are not yet in the DLL subdirectory.

Can you check with DependencyWalker or similar programs what DLLs
are missing? (I can not get to my notes about it from my office and
I am not sure I put the information on the Wiki yet)

Regards,

Arjen


On 2009-09-10 11:10, David Aldrich wrote:

> Hi Arjen
>
>> you should start cmake in a clean directory - old stuff might get in the
>> way otherwise, as a lot of information is being cached.
>
> Yes, that was the problem. Thanks.
>
> As I wrote in another mail this morning (the order seems to have got reversed) CMake now succeeds but nmake fails:
>
> [ 87%] Generating test_dyndrivers_dir/null.rc
> NMAKE : fatal error U1077: '.\test-drv-info.exe' : return code '0xc0000135'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
>
> I am wondering whether this is to do with the dll path, but my path does start with:
>
> PATH=..\..\plplot-5.9.5\buildnmake\dll;
>
> Best regards
>
> David
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question: cmake does not have nmake generator

DavidA-2
Hi Arjen

> this is PLplot-specific, has nothing (or at least very little) to do
> with CMake. The problem is that the program that creates these driver
> files needs a few DLLs and they are not yet in the DLL subdirectory.

Sorry, I will try your suggestion and move back to the PLplot mail list.

Best regards

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake