uxmal / reko

Reko is a binary decompiler.
https://uxmal.github.io/reko
GNU General Public License v2.0
2.16k stars 253 forks source link

msbuild: MSB1025: An internal failure occurred while running MSBuild #899

Closed rfalke closed 4 years ago

rfalke commented 4 years ago

I'm not sure if this is related to reko or my setup. "It worked in the past (TM)". But maybe I changed something.

> mono --version
Mono JIT compiler version 5.20.1.34 (tarball Tue Jul 16 19:25:32 UTC 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        Interpreter:   yes
        LLVM:          yes(600)
        Suspend:       hybrid
        GC:            sgen (concurrent by default)
> msbuild /p:Configuration=UnixRelease /p:Platform=x64 src/Reko-decompiler.sln
Microsoft (R) Build Engine version 16.5.0-ci for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
System.BadImageFormatException: Could not resolve field token 0x04000386, due to: Could not load type of field 'Microsoft.Build.Execution.BuildManager:_workQueue' (33) due to: Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:/usr/lib/mono/msbuild/Current/bin/Microsoft.Build.dll type:BuildManager member:(null)
File name: 'Microsoft.Build'
  at Microsoft.Build.CommandLine.MSBuildApp.BuildProject (System.String projectFile, System.String[] targets, System.String toolsVersion, System.Collections.Generic.Dictionary`2[TKey,TValue] globalProperties, System.Collections.Generic.Dictionary`2[TKey,TValue] restoreProperties, Microsoft.Build.Framework.ILogger[] loggers, Microsoft.Build.Framework.LoggerVerbosity verbosity, Microsoft.Build.CommandLine.DistributedLoggerRecord[] distributedLoggerRecords, System.Int32 cpuCount, System.Boolean enableNodeReuse, System.IO.TextWriter preprocessWriter, System.Boolean detailedSummary, System.Collections.Generic.ISet`1[T] warningsAsErrors, System.Collections.Generic.ISet`1[T] warningsAsMessages, System.Boolean enableRestore, Microsoft.Build.Logging.ProfilerLogger profilerLogger, System.Boolean enableProfiler, System.Boolean interactive, System.Boolean isolateProjects, System.Boolean graphBuild, System.String[] inputResultsCaches, System.String outputResultsCache) [0x005c5] in <490bc26098d94d2994c9af6416e47561>:0 
  at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x001c1] in <490bc26098d94d2994c9af6416e47561>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.BadImageFormatException: Could not resolve field token 0x04000386, due to: Could not load type of field 'Microsoft.Build.Execution.BuildManager:_workQueue' (33) due to: Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:/usr/lib/mono/msbuild/Current/bin/Microsoft.Build.dll type:BuildManager member:(null)
File name: 'Microsoft.Build'
  at Microsoft.Build.CommandLine.MSBuildApp.BuildProject (System.String projectFile, System.String[] targets, System.String toolsVersion, System.Collections.Generic.Dictionary`2[TKey,TValue] globalProperties, System.Collections.Generic.Dictionary`2[TKey,TValue] restoreProperties, Microsoft.Build.Framework.ILogger[] loggers, Microsoft.Build.Framework.LoggerVerbosity verbosity, Microsoft.Build.CommandLine.DistributedLoggerRecord[] distributedLoggerRecords, System.Int32 cpuCount, System.Boolean enableNodeReuse, System.IO.TextWriter preprocessWriter, System.Boolean detailedSummary, System.Collections.Generic.ISet`1[T] warningsAsErrors, System.Collections.Generic.ISet`1[T] warningsAsMessages, System.Boolean enableRestore, Microsoft.Build.Logging.ProfilerLogger profilerLogger, System.Boolean enableProfiler, System.Boolean interactive, System.Boolean isolateProjects, System.Boolean graphBuild, System.String[] inputResultsCaches, System.String outputResultsCache) [0x005c5] in <490bc26098d94d2994c9af6416e47561>:0 
  at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x00439] in <490bc26098d94d2994c9af6416e47561>:0 
  at Microsoft.Build.CommandLine.MSBuildApp.Main () [0x00028] in <490bc26098d94d2994c9af6416e47561>:0 
> 
uxmal commented 4 years ago

Well, it's internal compiler error in MSBuild. I'm afraid there's not much I can do except report the failure to the mono or msbuild teams. Alternatively, try using a more recent mono build?

rfalke commented 4 years ago

Yeah I expected this result. I will just use the pre-built binaries. Thanks for looking at this.