Discussion:
[CMake] CMake Error: The source directory "./build/CMakeFiles/CMakeTmp" does not exist.
Roger Martin
2008-09-23 20:30:42 UTC
Permalink
Hi,

I'm trying to build a build with cmake-2.6.1-win32-x86 CMakeSetup for
"Visual Studio 9 2008 Win64" as the build target.

Keep getting a
---------------------------

CMake Error: The source directory "./build/CMakeFiles/CMakeTmp" does not
exist.
Specify --help for usage, or press the help button on the CMake GUI.

---------------------------

but when I look, the directory is there; it does exist. Got the nightly
build to see what could be the problem or if the issue has already been
caught and fixed. Yet get the same issue trying to setup the build for
cmake [Was also going to try to compile cmake for 64 bit machines].

The project root is ./ and the build folder is ./build.
Bill Hoffman
2008-09-23 20:34:49 UTC
Permalink
Post by Roger Martin
Hi,
I'm trying to build a build with cmake-2.6.1-win32-x86 CMakeSetup for
"Visual Studio 9 2008 Win64" as the build target.
Keep getting a
---------------------------
CMake Error: The source directory "./build/CMakeFiles/CMakeTmp" does not
exist.
Specify --help for usage, or press the help button on the CMake GUI.
---------------------------
but when I look, the directory is there; it does exist. Got the nightly
build to see what could be the problem or if the issue has already been
caught and fixed. Yet get the same issue trying to setup the build for
cmake [Was also going to try to compile cmake for 64 bit machines].
The project root is ./ and the build folder is ./build.
Could this be some sort of path length issue? What is "."?

Also, can you build a very simple project:

c:/foo/CMakeLists.txt
add_library(foo foo.c)

Run CMakeSetup and set source to c:/foo and build to c:/foo/build.

-Bill
Roger Martin
2008-09-23 20:58:52 UTC
Permalink
Setting the full path fixes it. I'm wondering, on relative paths, if the
cmake home/bin directory is the root.

Yes, ./ is the current directory of the project from where I run a cmd
script.

------------
With the paths fixed as you pointed out, I then get an error dialog with ...
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
9.0/VC/bin/amd64/cl.exe" is not able to compile a simple test program.
...
But by hand-build-environment, I can compile and link a 64 bit program with
cl.exe and the Windows SDK

I use Netbeans and Visual C++ 2008 Express IDE's.

But for some complex projects such as http://www.openscenegraph.org CMake is
the right tool.
Post by Bill Hoffman
Post by Roger Martin
Hi,
I'm trying to build a build with cmake-2.6.1-win32-x86 CMakeSetup for
"Visual Studio 9 2008 Win64" as the build target.
Keep getting a
---------------------------
CMake Error: The source directory "./build/CMakeFiles/CMakeTmp" does not
exist.
Specify --help for usage, or press the help button on the CMake GUI.
---------------------------
but when I look, the directory is there; it does exist. Got the nightly
build to see what could be the problem or if the issue has already been
caught and fixed. Yet get the same issue trying to setup the build for
cmake [Was also going to try to compile cmake for 64 bit machines].
The project root is ./ and the build folder is ./build.
Could this be some sort of path length issue? What is "."?
c:/foo/CMakeLists.txt
add_library(foo foo.c)
Run CMakeSetup and set source to c:/foo and build to c:/foo/build.
-Bill
Roger Martin
2008-09-23 21:04:34 UTC
Permalink
I also test with C:\OpenGL\cmake-2.6.1\Example\Hello which I believe foloows
the simple test case you described with c:\foo

And same result: cl.exe can't build a simple project.
Post by Roger Martin
Setting the full path fixes it. I'm wondering, on relative paths, if the
cmake home/bin directory is the root.
Yes, ./ is the current directory of the project from where I run a cmd
script.
------------
With the paths fixed as you pointed out, I then get an error dialog with ...
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
9.0/VC/bin/amd64/cl.exe" is not able to compile a simple test program.
...
But by hand-build-environment, I can compile and link a 64 bit program with
cl.exe and the Windows SDK
I use Netbeans and Visual C++ 2008 Express IDE's.
But for some complex projects such as http://www.openscenegraph.org CMake
is the right tool.
Post by Bill Hoffman
Post by Roger Martin
Hi,
I'm trying to build a build with cmake-2.6.1-win32-x86 CMakeSetup for
"Visual Studio 9 2008 Win64" as the build target.
Keep getting a
---------------------------
CMake Error: The source directory "./build/CMakeFiles/CMakeTmp" does not
exist.
Specify --help for usage, or press the help button on the CMake GUI.
---------------------------
but when I look, the directory is there; it does exist. Got the nightly
build to see what could be the problem or if the issue has already been
caught and fixed. Yet get the same issue trying to setup the build for
cmake [Was also going to try to compile cmake for 64 bit machines].
The project root is ./ and the build folder is ./build.
Could this be some sort of path length issue? What is "."?
c:/foo/CMakeLists.txt
add_library(foo foo.c)
Run CMakeSetup and set source to c:/foo and build to c:/foo/build.
-Bill
Bill Hoffman
2008-09-23 21:07:31 UTC
Permalink
Post by Roger Martin
Setting the full path fixes it. I'm wondering, on relative paths, if
the cmake home/bin directory is the root.
Yes, ./ is the current directory of the project from where I run a cmd
script.
------------
With the paths fixed as you pointed out, I then get an error dialog with ...
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
9.0/VC/bin/amd64/cl.exe" is not able to compile a simple test program.
...
But by hand-build-environment, I can compile and link a 64 bit program
with cl.exe and the Windows SDK
I use Netbeans and Visual C++ 2008 Express IDE's.
But for some complex projects such as http://www.openscenegraph.org
CMake is the right tool.
I am still not quite following what works for you and what does not work
for you. Can you describe when the ./ does not work and what steps you
take?

Also, for the compiler not working, can you give the full error message?
If possible send the CMakeCache.txt and the CMakeFiles/CMakeOutput.log
and CMakeFiles/CMakeError.log files.

You do have to run CMake from an environment that works. So, running
CMakeSetup from the start menu may cause trouble if the global PATH and
env is not correct.

-Bill
Roger Martin
2008-09-23 21:31:09 UTC
Permalink
"The environment is setup with a cmd called "run CMake.cmd" and attached
with the extension 'cmd' changed to 'ceemde'

"Where is the source code" =./ is assuming the directory from where I run
CMakeSetup as the working directory. Causes the error dialog
---------------------------
Error
---------------------------
CMake Error: The source directory "./build/CMakeFiles/CMakeTmp" does not
exist.
Specify --help for usage, or press the help button on the CMake GUI.

(Press Cancel to suppress any further messages.)
---------------------------
OK Cancel
---------------------------


Does not make a "Visual Studio 9 2008 Win64". The folder does exist
relative from my working directory "C:\OpenGL\OpenSceneGraph\trunk". But
not from the cmake directory "C:\OpenGL\cmake-2.6.1-win32-x86\bin"

By putting in the full path for "Where is the source code" =
"C:\OpenGL\OpenSceneGraph\trunk" the CMakeSetup goes further. Then I run
into the issue of using "C:/Program Files (x86)/Microsoft Visual Studio
9.0/VC/bin/amd64/cl.exe" as the compiler and linker for a 64 bit machine and
the following error dialog appears:

=====Error Dialog========
---------------------------
Error
---------------------------
CMake Error at
C:/OpenGL/cmake-2.6.1-win32-x86/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32
(MESSAGE):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
9.0/VC/bin/amd64/cl.exe" is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/OpenGL/OpenSceneGraph/trunk/build/CMakeFiles/CMakeTmp



Run Build Command:C:\PROGRA~2\MICROS~1.0\Common7\IDE\VCExpress.exe
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec




Microsoft (R) Visual C++ Express Edition Version 9.0.30729.1.


Copyright (C) Microsoft Corp 2007. All rights reserved.





The project consists entirely of configurations that require support for
platforms which are not installed on this machine. The project cannot be
loaded.


The project consists entirely of configurations that require support for
platforms which are not installed on this machine. The project cannot be
loaded.


Invalid project





Use:


vcexpress [solutionfile | projectfile | anyfile.ext] [switches]





The first argument for devenv is usually a solution file or project file.


You can also use any other file as the first argument if you want to have
the


file open automatically in an editor. When you enter a project file, the
IDE


looks for an .sln file with the same base name as the project file in the


parent directory for the project file. If no such .sln file exists, then
the


IDE looks for a single .sln file that references the project. If no such
single


.sln file exists, then the IDE creates an unsaved solution with a default
.sln


file name that has the same base name as the project file.





Command line builds:


devenv solutionfile.sln /build [ solutionconfig ] [ /project
projectnameorfile [ /projectconfig name ] ]


Available command line switches:





/Log Logs IDE activity to the specified file for troubleshooting.


/ResetSettings Restores the IDE's default settings, optionally resets
to


the specified VSSettings file.


/SafeMode Launches the IDE in safe mode loading minimal windows.





Product-specific switches:





/debugexe Open the specified executable to be debugged. The


remainder of the command line is passed to this


executable as its arguments.


/useenv Use PATH, INCLUDE, LIBPATH, and LIB environment variables


instead of IDE paths for VC++ builds.





To attach the debugger from the command line, use:


VsJITDebugger.exe -p <pid>






CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:30 (PROJECT)



(Press Cancel to suppress any further messages.)
---------------------------
OK Cancel
---------------------------
===========
Post by Bill Hoffman
Post by Roger Martin
Setting the full path fixes it. I'm wondering, on relative paths, if the
cmake home/bin directory is the root.
Yes, ./ is the current directory of the project from where I run a cmd
script.
------------
With the paths fixed as you pointed out, I then get an error dialog with ...
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
9.0/VC/bin/amd64/cl.exe" is not able to compile a simple test program.
...
But by hand-build-environment, I can compile and link a 64 bit program
with cl.exe and the Windows SDK
I use Netbeans and Visual C++ 2008 Express IDE's.
But for some complex projects such as http://www.openscenegraph.org CMake
is the right tool.
I am still not quite following what works for you and what does not work
for you. Can you describe when the ./ does not work and what steps you
take?
Also, for the compiler not working, can you give the full error message?
If possible send the CMakeCache.txt and the CMakeFiles/CMakeOutput.log and
CMakeFiles/CMakeError.log files.
You do have to run CMake from an environment that works. So, running
CMakeSetup from the start menu may cause trouble if the global PATH and env
is not correct.
-Bill
Bill Hoffman
2008-09-24 01:42:14 UTC
Permalink
Post by Roger Martin
The project consists entirely of configurations that require support for
platforms which are not installed on this machine. The project cannot be
loaded.
The project consists entirely of configurations that require support for
platforms which are not installed on this machine. The project cannot be
loaded.
This sounds like the problem. What if you do not build for 64 bits. It
sounds like your compiler is not setup to build 64 bit apps. Does it
work if you pick the other visual studio generator that is not 64 bits?

-Bill
Roger Martin
2008-09-24 03:49:32 UTC
Permalink
That's it! Thank you for pin pointing the problem.

I then tried running CMakeSetup from the
C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd (Windows Server
2008 x64 DEBUG Build Environment) which outputs
------------
Setting SDK environment relative to C:\Program Files\Microsoft
SDKs\Windows\v6.1
.
Targeting Windows Server 2008 x64 DEBUG

.............
Ran CMakeSetup from this cmd prompt
C:\OpenGL\cmake-2.6.1-win32-x86\bin>CMakeSetup

results were the same; 32 bit ok; 64 bit not ok.

Not sure what env var's CMakeSetup goes by...

Fairly certain C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\bin\amd64\cl.exe is 64 bit compiler. The OS is 64 bit.
The Microsoft SDKs\Windows\v6.1 installed under C:\Program Files instead of
C:\Program Files(86) because it was the 64 bit sdk.
Post by Roger Martin
The project consists entirely of configurations that require support for
Post by Roger Martin
platforms which are not installed on this machine. The project cannot be
loaded.
The project consists entirely of configurations that require support for
platforms which are not installed on this machine. The project cannot be
loaded.
This sounds like the problem. What if you do not build for 64 bits. It
sounds like your compiler is not setup to build 64 bit apps. Does it work
if you pick the other visual studio generator that is not 64 bits?
-Bill
Loading...