Compilation error: c-interface\build-VS2012\ZERO_CHECK.vcxproj - error MSB6006: "cmd.exe" exited with code 3

Hi everybody,I installed the teamcity build agent in a remote machine  and Visual Studio 2012 (c++).I am trying to create a build from Teamcity and I did RunI get theses error messages : Compilation error: c-interface\build-VS2012\ZERO_CHECK.vcxproj - [12:51:30][CustomBuild] C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172, 5): error MSB6006: "cmd.exe" exited with code 3.I don't find a solution to solve it, any suggestion please?here a piece of the log message:[12:51:29][c-interface\build-VS2012\ZERO_CHECK.vcxproj] _PrepareForClean[12:51:29][_PrepareForClean] Delete[12:51:29][Delete] Deleting file "Win32\Release\ZERO_CHECK\ZERO_CHECK.lastbuildstate".[12:51:29][c-interface\build-VS2012\ZERO_CHECK.vcxproj] InitializeBuildStatus[12:51:29][InitializeBuildStatus] Touch[12:51:29][Touch] Touching "Win32\Release\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild".[12:51:29][c-interface\build-VS2012\ZERO_CHECK.vcxproj] CustomBuild[12:51:29][CustomBuild] CustomBuild[12:51:29][CustomBuild] Checking Build System[12:51:29][CustomBuild] The system cannot find the path specified.[12:51:30][CustomBuild] C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172, 5): error MSB6006: "cmd.exe" exited with code 3.[12:51:30][MSBuild] c-interface\build-VS2012\libs\rest\REST.vcxproj.metaproj: Build target: Rebuild PD: the path C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets iexists and is correct in the remote machine.
5 comments
Comment actions Permalink

Hi,

Can you please try to run this build on the same machine as the TeamCity agent and under the same user that the agent is running? For more details please see - http://confluence.jetbrains.com/display/TCD8/Common+Problems#CommonProblems-BuildfailsorbehavesdifferentlyinTeamCitybutnotlocally.

0
Comment actions Permalink
Hi Alina, thank you for responding me:I followed the first steps, stopping the teamcity agent service and starint it manually via the agent.bat command.I got this response:3.configure(LogInitializer.java:174)  Log4J configuration file c:\PortFolioCalculator\BuildAgent\bin\..\conf\teamcity-  agent-log4j.xml will be monitored with interval 10 seconds.  [2014-06-20 09:10:51,297]   WARN -    jetbrains.buildServer.AGENT - Calculating  CPU benchmark index...  [2014-06-20 09:10:59,456]   WARN -    jetbrains.buildServer.AGENT - CPU benchmar  k index is set to 382  [2014-06-20 09:11:17,598]   WARN -      jetbrains.buildServer.VCS - 'hg version  --quiet' command failed.  [2014-06-20 09:11:24,852]   WARN - .agent.AmazonPropertiesUpdater - Fetched Amaz  on EC2 instance metadata does not contain required values. Probably this agent w  as not started inside Amazon EC2. Is proxy server used?  [2014-06-20 09:11:24,899]   WARN -      jetbrains.buildServer.VCS - 'git.exe ver  sion' command failed.  exception: Cannot run program "git.exe" (in directory "."): CreateProcess error=  2, The system cannot find the file specified  Registering on server http://teamcity.gto.intranet.db.com:8111, AgentDetails{Nam  e='LONGMASU0041_01', AgentId=null, BuildId=null, AgentOwnAddress='null', Alterna  tiveAddresses=[10.235.175.6], Port=9091, Version='30112', PluginsVersion='30112-  md5-7186c05d2594d614844151007f6b7ec5', AvailableRunners=[Ant, dotnet-tools-dupfi  nder, dotnet-tools-inspectcode, Duplicator, FxCop, gradle-runner, Inspection, Ip  r, jb.nuget.installer, jb.nuget.pack, jb.nuget.publish, jetbrains.dotNetGenericR  unner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt  , NUnit, rake-runner, simpleRunner, sln2003, VS.Solution], AvailableVcs=[perforc  e, mercurial, jetbrains.git, tfs, svn, cvs], AuthorizationToken='137189e1244037e  9bb8bfa14ea522b04', PingCode='9oLrh1Zqa3bQfJlogBWicbbnkf4DbJ4Q'}  Registered: id:649, authorizationToken:137189e1244037e9bb8bfa14ea522b04  If this is the first time this agent registered on the server make sure it is au  thorized by administrator in the server web UI. -------------------------------------------------------------------------------------------------Do you think theses errors are related with the original one?I mean for example this one "The system cannot find the file specified Registering on server http://teamcity.gto.intranet.db.com:8111" what is it?Is there proxy problem ?Thank you very much,
0
Comment actions Permalink

Hi Jose,

No, these warnings are not related to the first ones. When you start build agent it checks whether different programs (for example VCSs) are installed on this machine. And if not it prints such messages.
In the original message the problem is with starting build from TeamCity, so please try to start the same build from command line. The steps how to do it are described here.

0
Comment actions Permalink
hi Alina,I was doing what you asked me to do: I did a build manually and I don't have the same than I had in local.Using a high verbosity a found that the error is coming from :D:\PortFolioCalculator\BuildAgent\work\7f2ffd93194f947d\c-interface\build-VS2012\Win32\Debug\ZERO_CHECK\custombuild.command.1.tlog Inside we have that:setlocal "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/tortoise6/c-interface -BC:/tortoise6/c-interface/build-VS2012 --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file "d:\PortFolioCalculator\BuildAgent\work\7f2ffd93194f947d\c-interface\build-VS2012\rain.sln" --> there is no cmake 2.8 folder and no c:\tortoise6 folder neither.My problem is in the repository from where a do a checkout of the code, there is no Win32 folder , this folder is created during the msbuild.2 questions:How can I change it in order to not having this folder which is only for Visual Studio?Do you think it's a good idea to tell Teamcity to mute this problem during the compilation?Thank you a lot
0
Comment actions Permalink
Finally I found the problem: It should be done in 2 steps because the cmake is always running and tries always to compare any project to the original one.After loosing many days I found the solution. So 2 steps are mandatory: 1- in the teamcity folder (it must exist and be already properly populated)of the project I run cmake\bin\cmake.exe -D__TEAM_CITY=1 .. the cmake.exe is a binary included inside the project (or install it in the build machine). 2- then : MSbuild TeamCity/file.sln  The build has been performed correctly in teamcity  
0

Please sign in to leave a comment.