I engaged with this error while building the MySQL instance from source. The reason of this problem is that your installed version of cmake don't have the Visual Studio 8 2005 generator. You can simply check the available generator my typing the cmake command.
Following was the output for my system:
cmake version 2.6-patch 4
The following generators are available on this platform:
Unix Makefiles = Generates standard UNIX makefiles.
Eclipse CDT4 - Unix Makefiles
= Generates Eclipse CDT 4.0 project files.
KDevelop3 = Generates KDevelop 3 project files.
KDevelop3 - Unix Makefiles = Generates KDevelop 3 project files.
Now how to get the generator? Well i must say you have to dig this out your way. I found solution because i already knew with my trail and error that Visual Studio 8 2005 generator is available in cmake version 2.4. So i installed the cmake version 2.4 and then output of my cmake command shows that Visual Studio 8 2005 generator in the list.
cmake version 2.4-patch 8
The following generators are available on this platform:
Borland Makefiles = Generates Borland makefiles.
MSYS Makefiles = Generates MSYS makefiles.
MinGW Makefiles = Generates a make file for use with
mingw32-make.
NMake Makefiles = Generates NMake makefiles.
Unix Makefiles = Generates standard UNIX makefiles.
Visual Studio 6 = Generates Visual Studio 6 project files.
Visual Studio 7 = Generates Visual Studio .NET 2002 project
files.
Visual Studio 7 .NET 2003 = Generates Visual Studio .NET 2003 project
files.
Visual Studio 8 2005 = Generates Visual Studio .NET 2005 project
files.
Visual Studio 8 2005 Win64 = Generates Visual Studio .NET 2005 Win64
project files.
Visual Studio 9 2008 = Generates Visual Studio 9 2008 project files.
Visual Studio 9 2008 Win64 = Generates Visual Studio 9 2008 Win64 project
files.
Watcom WMake = Generates Watcom WMake makefiles.
Few important corrections:
In this blog post i suggested installing CMake version 2.4.8 for correcting "CMake Error: Could not create named generator Visual Studio 9 2008" error. It was a work around and because of lack of information.
Originally on my system, Cygwin was also installed. My Cygwin installation also contained CMake version 2.6 with limited generators. Now both Cygwin and CMake 2.6 were in the class path but Cygwin path was searched earlier then CMake 2.6 class path resulting in the use of Cygwin CMake instead of windows native installation of CMake 2.6.
This means the problem can easily be solved by ensuring that class paths are properly set so that windows native installation of CMake 2.6 is used.
This correction was informed to me by Bill Hoffman. Thanks Bill.
CMake 2.6 for windows show the following generators:
Generators
The following generators are available on this platform:
Borland Makefiles = Generates Borland makefiles.
MSYS Makefiles = Generates MSYS makefiles.
MinGW Makefiles = Generates a make file for use with
mingw32-make.
NMake Makefiles = Generates NMake makefiles.
Unix Makefiles = Generates standard UNIX makefiles.
Visual Studio 6 = Generates Visual Studio 6 project files.
Visual Studio 7 = Generates Visual Studio .NET 2002 project
files.
Visual Studio 7 .NET 2003 = Generates Visual Studio .NET 2003 project
files.
Visual Studio 8 2005 = Generates Visual Studio .NET 2005 project
files.
Visual Studio 8 2005 Win64 = Generates Visual Studio .NET 2005 Win64
project files.
Visual Studio 9 2008 = Generates Visual Studio 9 2008 project files.
Visual Studio 9 2008 Win64 = Generates Visual Studio 9 2008 Win64 project
files.
Watcom WMake = Generates Watcom WMake makefiles.
CodeBlocks - MinGW Makefiles= Generates CodeBlocks project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
Eclipse CDT4 - MinGW Makefiles
= Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - NMake Makefiles
= Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Unix Makefiles
= Generates Eclipse CDT 4.0 project files.
As a researcher in the field of computer science, I want to share my experiences with other new researchers.
Friday, August 28, 2009
Thursday, August 20, 2009
Installing MySQL from Source on Windows
For my research project, i just started working on MySQL. One task was to build MySQL successfully using source code. Few things that took my time, i want to list them.
I was building the source using visual studio with build-vs8.bat file. The first error that i got was regarding vs8cache.txt file. The .bat file need this file but it is missing in the source. To solve this problem just make an empty vs8cache.txt file in the same folder where you have .bat file.
Second problem that i face was related to CMake. CMake issued me the error
CMake Error: Could not create named generator Visual Studio 9 2008
This error is because of the CMake version. On my system version 2.6.4 was installed. To solve this problem install the CMake version 2.4.8. This will solve this problem.
If you have different versions of visual studio installed on your system, then you might also need to edit the .bat file to change the line
cmake -G "Visual Studio 8 2005"
For example, visual studio 9 was intalled on my system but build-vs9.bat file was not working, might be because in source this .bat file is missing the usage of vs8cache.txt.
Any ways i was able to execute the .bat file successfully by changing cmake -G "Visual Studio 8 2005" to cmake -G "Visual Studio 9 2008".
Rest of the build process was wonderful for me.
Few important corrections:
In this blog post i suggested installing CMake version 2.4.8 for correcting "CMake Error: Could not create named generator Visual Studio 9 2008" error. It was a work around and because of lack of information.
Originally on my system, Cygwin was also installed. My Cygwin installation also contained CMake version 2.6 with limited generators. Now both Cygwin and CMake 2.6 were in the class path but Cygwin path was searched earlier then CMake 2.6 class path resulting in the use of Cygwin CMake instead of windows native installation of CMake 2.6.
This means the problem can easily be solved by ensuring that class paths are properly set so that windows native installation of CMake 2.6 is used.
This correction was informed to me by Bill Hoffman. Thanks Bill.
I was building the source using visual studio with build-vs8.bat file. The first error that i got was regarding vs8cache.txt file. The .bat file need this file but it is missing in the source. To solve this problem just make an empty vs8cache.txt file in the same folder where you have .bat file.
Second problem that i face was related to CMake. CMake issued me the error
CMake Error: Could not create named generator Visual Studio 9 2008
This error is because of the CMake version. On my system version 2.6.4 was installed. To solve this problem install the CMake version 2.4.8. This will solve this problem.
If you have different versions of visual studio installed on your system, then you might also need to edit the .bat file to change the line
cmake -G "Visual Studio 8 2005"
For example, visual studio 9 was intalled on my system but build-vs9.bat file was not working, might be because in source this .bat file is missing the usage of vs8cache.txt.
Any ways i was able to execute the .bat file successfully by changing cmake -G "Visual Studio 8 2005" to cmake -G "Visual Studio 9 2008".
Rest of the build process was wonderful for me.
Few important corrections:
In this blog post i suggested installing CMake version 2.4.8 for correcting "CMake Error: Could not create named generator Visual Studio 9 2008" error. It was a work around and because of lack of information.
Originally on my system, Cygwin was also installed. My Cygwin installation also contained CMake version 2.6 with limited generators. Now both Cygwin and CMake 2.6 were in the class path but Cygwin path was searched earlier then CMake 2.6 class path resulting in the use of Cygwin CMake instead of windows native installation of CMake 2.6.
This means the problem can easily be solved by ensuring that class paths are properly set so that windows native installation of CMake 2.6 is used.
This correction was informed to me by Bill Hoffman. Thanks Bill.
Subscribe to:
Posts (Atom)