Build problems in Win7 with VB2010

Post Reply
beatsme
Posts: 7
Joined: Wed Dec 14, 2011 6:39 pm

Build problems in Win7 with VB2010

Post by beatsme »

The problem I was having in this post was solved by using the SVN trunk... on this machine.
But I'm now having problems on another Win7 machine building either source :cry:

----

WARNING: Microsoft Visual Studio Common tools initialisation script not found.

I'm following the Build Instructions, but am receiving the above error and so it won't compile. I've installed Microsoft Visual Studio Express 2010 (specifically, the Visual C++ Express edition). I then ran win32-install_dependencies and that all checked out. But when I run win32-build this is the output I receive:

Code: Select all

--
build type is set to: Release.
Init-env Script to be called: win32-init_env_command.cmd.
--
################################################################################
######
##
    ##
##  WARNING : Microsoft Visual Studio Common tools initialisation script not found  ##
##
    ##
################################################################################
######

_______________________________________________________________________________

Configuring and building openvibe\trunc ...

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for CL compiler version
-- Check for CL compiler version - failed
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - yes
-- Using FREE VC TOOLS, NO DEBUG available
-- Check for working C compiler: cl
CMake Error: your C compiler: "cl" was not found.   Please set CMAKE_C_COMPILER
to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: cl -- broken
CMake Error at C:/OpenVibe/openvibe-0.12.0-svn3107-src/dependencies/cmake/cmake-
2.8.2-win32-x86/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "cl" is not able to compile a simple test program.

  It fails with the following output:

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

CMake Error: your C compiler: "cl" was not found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "cl" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!

An error occured during building process

Press any key to continue . . .
How do I "set CMAKR_C_COMPILER" or "CMAKE_CXX_COMPILER"? I installed the latest version of CMAKE, and instructed it to set PATH variables during install, but to no avail.

Some more details: I am building under Windows 7, and I am using the openvibe-0.12.0-svn3107-src source.
Last edited by beatsme on Sat Dec 17, 2011 9:05 pm, edited 1 time in total.

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: Microsoft Visual Studio Common tools initialisation scri

Post by lbonnet »

Hi beatsme,

Good you got it working ! I'm still curious though...
The stable source code should be compiling too with the cmake provided by win32-install_dependencies.
Did you reboot after installing VC++ express ? Some programs especially on windows won't be detected correctly if you don't reboot once.

Laurent
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

beatsme
Posts: 7
Joined: Wed Dec 14, 2011 6:39 pm

Re: Microsoft Visual Studio Common tools initialisation scri

Post by beatsme »

Hi lbonnet,

I tried rebooting just now and compiling the stable source again. I am no longer receiving the original error, so that is good, but I am getting a different error now:

Code: Select all


...

Configuring and building openvibe-modules\xml\trunc ...

--   FAILED to find expat...
-- Configuring done
-- Generating done
-- Build files have been written to: C:/OpenVibe/openvibe-0.12.0-svn3107-src/local-tmp/openvibe-modules/xml/trunc

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[ 33%] Building CXX object CMakeFiles/OpenViBE-module-XML-dynamic.dir/src/xml/IReader.obj
IReader.cpp
C:\OpenVibe\openvibe-0.12.0-svn3107-src\openvibe-modules\xml\trunc\src\xml\IReader.cpp(3) : fatal error C1083: Cannot open include file: 'expat.h': No such file or directory
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

An error occured during building process

Press any key to continue . . .
This is an untouched copy of the openvibe-0.12.0-svn3107-src source. The other source that I checked out from the SVN is still compiling.

beatsme
Posts: 7
Joined: Wed Dec 14, 2011 6:39 pm

Re: Microsoft Visual Studio Common tools initialisation scri

Post by beatsme »

Incidentally, I had access to another Win7 machine. I followed the same procedure: install Visual C++ 2010 Express, install dependencies, reboot. With the latest trunk source I receive this error when trying to build:

Code: Select all

--
build type is set to: Release.
Init-env Script to be called: win32-init_env_command.cmd.
--
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

_______________________________________________________________________________

Configuring and building openvibe\trunc ...

-- Configuring done
-- Generating done
-- Build files have been written to: C:/openvibe/local-tmp/openvibe/trunc

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Linking CXX shared library OpenViBE-dynamic.dll
LINK : fatal error LNK1146: no argument specified with option '/machine:'
LINK failed. with 1146
NMAKE : fatal error U1077: 'C:\openvibe\dependencies\cmake\cmake-2.8.2-win32-x86\bin\cmake.exe' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

An error occured during building process

Press any key to continue . . .
And with the stable source, I receive this error:

Code: Select all

Configuring and building openvibe-modules\xml\trunc ...

-- The C compiler identification is MSVC
-- The CXX compiler identification is MSVC
-- Check for CL compiler version
-- Check for CL compiler version - 1600
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio10.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio10.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
--   FAILED to find expat...
-- Configuring done
-- Generating done
-- Build files have been written to: C:/openvibe-0.12.0-svn3107-src/local-tmp/openvibe-modules/xml/trunc

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Scanning dependencies of target OpenViBE-module-XML-dynamic
[ 33%] Building CXX object CMakeFiles/OpenViBE-module-XML-dynamic.dir/src/main.obj
main.cpp
[ 66%] Building CXX object CMakeFiles/OpenViBE-module-XML-dynamic.dir/src/xml/IReader.obj
IReader.cpp
C:\openvibe-0.12.0-svn3107-src\openvibe-modules\xml\trunc\src\xml\IReader.cpp(3) : fatal error C1083: Cannot open include file: 'expat.h': No such file or directory
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

An error occured during building process

Press any key to continue . . .
The error I receive with the stable source on this machine is the error I receive on the other machine. However, I am not sure why the latest SVN source won't build in this environment but will in the other...

ddvlamin
Posts: 160
Joined: Thu Aug 13, 2009 8:39 am
Location: Ghent University
Contact:

Re: Build problems in Win7 with VB2010

Post by ddvlamin »

Hi,

I'm not sure if I can be of any help, but in the past I had similar problems on XP where it could not find certain libraries. So to track down the problem you could check the following. It does not seem to find the expat library. I'm not sure how this is possible (although I managed to do this in the past too), but let us skip the reason for now. In the cmake-modules directory there is a filed called FindThirdPartyExpat.cmake This tries to find the expat library and if you look closely in this file you can see it looks for the expat.h file on the path $ENV{OV_DEP_EXPAT}/Source/lib. Now you have to know how the variable $ENV{OV_DEP_EXPAT} is defined and this can be found in the scripts directory in a file named something with ''dependencies.cmd" (my best guess would be win32-dependencies.com, but I don't work on windows anymore) in this file there should be a definition for OV_DEP_EXPAT. Make sure this path points to the right directory (the directory that contains the expat dependencies when you have installed the dependencies). If the variable is not there, add it. Again the reason why it does not find it, is not clear to me as it should work straight out of the box, but out of experience I know that if things do not work for some reason you try to find a solution by changing things or reinstalling things... and then for some reason you solve your problem, but get another problem instead.

or you could remove just everything and start again from scratch (or in a different directory) now that you have solved your initial problem, most of the time this helps instead of looking for the problem.

Best regards,
Dieter Devlaminck

Post Reply