MSBuild: 'error MSB6006: "cmd.exe" exited with code 1.' - tensorflow

When attempting to build TensorFlow with CMake and MSBuild on Windows 10, I get the following error when running MSBuild:
"C:\work\tensorflow\tensorflow\contrib\cmake\build\tf_tutorials_example_trainer.vcxproj" (default target) (1) ->
"C:\work\tensorflow\tensorflow\contrib\cmake\build\tf_core_gpu_kernels.vcxproj" (default target) (90) ->
(CustomBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\work\tensorflow\tensorflow\contrib\cmake\build\tf_core_gpu_kernels.vcxproj]
351 Warning(s)
1 Error(s)
So I only get one error message, and that just tells me that cmd.exe was closed with an error code indicating that there was a problem, but not what the problem was. So how can I find out what caused this problem so I can solve it?

This error commonly happens because the default cmake install location requires admin privileges (normally C:/Program Files/).
There are two simple ways around this:
Run visual studio as Administrator
Override the CMAKE_INSTALL_PREFIX variable to point somewhere not requiring admin privileges
Personally, I'd recommend the second option (When configuring cmake, the command would be something like: cmake . -DCMAKE_INSTALL_PREFIX=D:/Some/Path)

Related

Folly compiler error making build fail. Is there a workaround?

Error message:
Building Solution: C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\XamlCompiler\Microsoft.Windows.UI.X...
× Build failed with message C:\Users\Larkuo\Documents\Work\El-Parah\Code\storeWindows\store\node_modules.folly\folly-2021.06.28.00\folly\lang\Assume.cpp(26,3):
error C2131: expression did not evaluate to a constant [C:\Users\Larkuo\Documents\Work\El-Parah\Code\storeWindows\store\node_modules\react-native-windows\Folly\Folly.vcxproj].
Check your build configuration.
react-native run-windows fails to build
Original build on windows 11 works fine but on windows 10 it returns this error
Run with visual studio code

Build failed.Step 2: Build and initialize the new recipe. Initialize the system

I'm trying to install Spartacus for SAP Commerce 2005 following the guide:
https://sap.github.io/spartacus-docs/installing-sap-commerce-cloud-2005/
At Step 2-3 (Initialize the system using the following command) I've got an error:
[testClassesScanner] Found 12 ordercalculation testclasses in 7.191 ms
[touch] Creating C:\CX2005\hybris\temp\hybris\touch\ordercalculation_testsrctouch
[copy] Copying 1 file to C:\CX2005\hybris\bin\modules\integration-apis\outboundservices
[copy] Copying 1 file to C:\CX2005\hybris\bin\modules\integration-apis\outboundservices
[mkdir] Created dir: C:\CX2005\hybris\bin\modules\integration-apis\outboundservices\classes
[copy] Copying 1 file to C:\CX2005\hybris\bin\modules\integration-apis\odata2services
[copy] Copying 1 file to C:\CX2005\hybris\bin\modules\integration-apis\odata2services
[mkdir] Created dir: C:\CX2005\hybris\bin\modules\integration-apis\odata2services\classes
[yjavac] Compiling 73 source files to C:\CX2005\hybris\bin\modules\integration-apis\outboundservices\classes
[yjavac] Compiling 396 source files to C:\CX2005\hybris\bin\modules\integration-apis\odata2services\classes
[touch] Creating C:\CX2005\hybris\temp\hybris\touch\outboundservices_srctouch
[groovyc] Compiling 26 source files to C:\CX2005\hybris\bin\modules\integration-apis\outboundservices\classes
[touch] Creating C:\CX2005\hybris\temp\hybris\touch\odata2services_srctouch
[groovyc] Compiling 150 source files to C:\CX2005\hybris\bin\modules\integration-apis\odata2services\classes
[testClassesScanner] Found 218 odata2services testclasses in 16.72 ms
[touch] Creating C:\CX2005\hybris\temp\hybris\touch\odata2services_testsrctouch
BUILD FAILED
C:\CX2005\hybris\bin\platform\build.xml:13: The following error occurred while executing this line:
C:\CX2005\hybris\bin\platform\resources\ant\compiling.xml:75: The following error occurred while executing this line:
C:\CX2005\hybris\bin\platform\resources\ant\compiling.xml:116: The following error occurred while executing this line:
C:\CX2005\hybris\bin\platform\resources\ant\util.xml:42: The following error occurred while executing this line:
C:\CX2005\hybris\bin\platform\resources\ant\util.xml:44: The following error occurred while executing this line:
C:\CX2005\hybris\bin\platform\resources\ant\compiling.xml:123: The following error occurred while executing this line:
C:\CX2005\hybris\bin\platform\resources\ant\compiling.xml:340: The following error occurred while executing this line:
C:\CX2005\hybris\bin\modules\platform\groovynature\buildcallbacks.xml:33: BUG! exception in phase 'semantic analysis' in source unit 'C:\CX2005\hybris\bin\modules\integrati
n-apis\outboundservices\testsrc\de\hybris\platform\outboundservices\client\RestTemplateFactoryIntegrationTest.groovy' null
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:980)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:651)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:600)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:583)
at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:75)
at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:243)
at org.codehaus.groovy.ant.Groovyc.runCompiler(Groovyc.java:1206)
at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:1258)
at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:853)
The last part of the log:
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:976)
... 102 more
Total time: 10 minutes 32 seconds
> Task :recipes:cx-for-spa:buildSystem FAILED
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\CX2005\installer\recipes\cx-for-spa\build.gradle' line: 594
* What went wrong:
Execution failed for task ':recipes:cx-for-spa:buildSystem'.
> external process returned non-zero exit code, command: [cmd, /c, set "ANT_OPTS=-Xmx1024m -Dfile.encoding=UTF-8" & set "PLATFORM_HOME=C:\CX2005\hybris\bin\platform" & set "ANT_HOME=C:\CX2005\hybris\bin\platform\apache-ant" & set "PATH=C:\CX2005\hybris\bin\platform\apache-ant\bin;%PATH%" & ant clean all]
Any ideas how to resolve this?
Regards,
Jegors
Commenting out below line in installer/customconfig/custom.properties resolved the issue.
#build.parallel=true
I had the same problem, maybe you should install Grunt and that is all.
I hope to be resolved your answer
Good Luck
Try after removing NodeJS path environment variable in windows.
Reffer this discussion from answers.sap.com, will help.

Visual Studio Team Services sends "build failed" email when build succeeds

We're using Visual Studio Team Services for a project, and because we want to use continuous integration I set it up to build on each check-in, and to notify me when a build fails. Now, every time someone checks in code, I get an email that tells me the build failed:
Summary
Debug | Any CPU
3 error(s), 0 warning(s)
$/Foo/Bar.Foo/Bar.Foo.sln - 3 error(s), 0
warning(s)
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets
(126): The Dnx Runtime package needs to be installed. See output
window for more details.
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets
(126): The Dnx Runtime package needs to be installed. See output
window for more details.
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets
(126): The Dnx Runtime package needs to be installed. See output
window for more details.
Other Errors
1 error(s)
Exception Message:
MSBuild error 1 has ended this build. You can find more specific
information about the cause of this error in above messages. (type
BuildProcessTerminateException) Exception Stack Trace: at
System.Activities.Statements.Throw.Execute(CodeActivityContext
context) at
System.Activities.CodeActivity.InternalExecute(ActivityInstance
instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at
System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor
executor, BookmarkManager bookmarkManager, Location resultLocation)
When I go to visualstudio.com to check out the completed builds, the build in question is listed as "Succeeded". When I check the logs, everything is fine, and when I get a latest version and build locally, it also builds.
If I go to the "alerts" tab on the administration panel, I have one alert specified, with the following filters:
Team Project = [Current project]
AND Status = Failed
What's going on here?
I cannot say if it is safe to delete it since you don't know where it came from. And if you want to edit a XAML build definition, you need to do it from "Visual Studio\Team Explorer\Builds\XAML Build Definitions":
However, before you figure out if the XAML definition can be deleted, you can add one more filter in alert to set the alert to only track the build definition you want:

Why does including the msbuild OutputPath option cause MetadataWorkspace error when building Silverlight/WCF RIA sln?

[specific version numbers of items related to this issue are included at the end of the text]
When building the Foo.sln (SL4 with WCF/RIA services) with the following msbuild command:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild SNSC.sln /nologo /p:configuration=release /p:OutputPath=..\..\output\Foo /t:Rebuild
... I receive the following error:
"C:\SourceCode2\prod\current\Silverlight\Foo.sln" (Rebuild target) (1)
-> "C:\SourceCode2\prod\current\Silverlight\Foo.Web.Data\Foo.Web.Data.csproj"
(Rebuild target) (2) ->
"C:\SourceCode2\prod\current\Silverlight\Foo.Fha\Foo.Fha.csproj"
(default target) (3:2) -> (CreateRiaClientFiles target) ->
C:\Program Files
(x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Ria.Client.targets(303,5):
error : Failed to get the MetadataWorkspace for the DbContext type
'Foo.Web.Data.Fha.CoreDbContext'.
[C:\SourceCode2\prod\current\Silverligh t\Foo.Fha\Foo.Fha.csproj]
C:\Program Files
(x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Ria.Client.targets(303,5):
error : Failed to get the MetadataWorkspace for the DbContext type
'Foo.Web.Data.LoanCorrespondence.CoreDbContext'.
[C:\SourceCode2\prod\cur rent\Silverlight\Foo.Fha\Foo.Fha.csproj]
However, when I remove the OutputPath option (keeping the rest of the command the same):
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild SNSC.sln /nologo /p:configuration=release /t:Rebuild
...the build succeeds (albeit with 77 warnings). And of course it compiles with no issue in VS2010.
Why does the inclusion of the OutputPath option cause this exception?
Specifics:
* attempted on 2 different 64bit machines with same result
* win7 OS
* msbuild: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild
* Silverlight 4 with WCF RIA

Building libopenmetaverse on CentOS 5

I'm trying to build libopenmetaverse on CentOS however I get the following error. I'm not this kind of developer and am installing this for someone else to use. This is just the part of the build that fails. Any ideas?
[nant] /opt/libomv/Programs/WinGridProxy/WinGridProxy.exe.build build
Buildfile: file:///opt/libomv/Programs/WinGridProxy/WinGridProxy.exe.build
Target framework: Mono 2.0 Profile
Target(s) specified: build
build:
[echo] Build Directory is /opt/libomv/bin
[csc] Compiling 15 files to '/opt/libomv/bin/WinGridProxy.exe'.
[resgen] Error: Invalid ResX input.
[resgen] Position: Line 2700, Column 5.
[resgen] Inner exception: An exception was thrown by the type initializer for System.Drawing.GDIPlus
BUILD FAILED
External Program Failed: /tmp/tmp5a71a509.tmp/resgen.exe (return code was 1)
Total time: 0.4 seconds.
BUILD FAILED
Nested build failed. Refer to build log for exact reason.
Total time: 47 seconds.
Build Exit Code: 1
You might need to install libgdiplus, or ensure that your system can find it.
Ok, dont know why, but installing libgdiplus-devel seemed to fix it.