mono / mono

Mono open source ECMA CLI, C# and .NET implementation.
https://www.mono-project.com
Other
11.13k stars 3.82k forks source link

[XI/XM] msbuild tests are failing to build for iOS #7518

Closed lewurm closed 6 years ago

lewurm commented 6 years ago

error message:

Build FAILED.

"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.sln" (default target) (1) ->
"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj" (default target) (5) ->
"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj" (default target) (6:2) ->
(ILRepack target) -> 
  EXEC : warning : Duplicate type Xamarin.iOS.Tasks.ACToolTaskBase [/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj]
  /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj(128,5): warning MSB3073: The command "mono "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/packages/ILRepack.2.0.13/build/../tools/ILRepack.exe" /lib:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Core/bin/Debug/." /lib:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/." /lib:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/." /lib:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/."  /out:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/obj/Debug/Xamarin.iOS.Tasks.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/obj/Debug/Xamarin.iOS.Tasks.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Core/bin/Debug/Xamarin.iOS.Tasks.Core.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/Xamarin.MacDev.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/Xamarin.MacDev.Tasks.Core.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Xamarin.MacDev.Tasks.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Mono.Cecil.dll"" exited with code 1.

"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.sln" (default target) (1) ->
"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj" (default target) (8) ->
  EXEC : warning : Duplicate type Xamarin.Mac.Tasks.MacOSXSdks [/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj]
  /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj(138,5): warning MSB3073: The command "mono "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/packages/ILRepack.2.0.13/build/../tools/ILRepack.exe" /lib:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks.Core/bin/Debug/." /lib:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/." /lib:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/." /lib:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/."  /out:"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/obj/Debug/Xamarin.Mac.Tasks.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/obj/Debug/Xamarin.Mac.Tasks.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks.Core/bin/Debug/Xamarin.Mac.Tasks.Core.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/Xamarin.MacDev.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/Xamarin.MacDev.Tasks.Core.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Xamarin.MacDev.Tasks.dll" "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Mono.Cecil.dll"" exited with code 1.

"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.sln" (default target) (1) ->
"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/tests/Xamarin.iOS.Tasks.Tests/Xamarin.iOS.Tasks.Tests.csproj" (default target) (5) ->
"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj" (default target) (6:2) ->
(ILRepack target) -> 
  /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj(135,5): error : INFO: IL Repack - Version 2.0.13;INFO: ------------- IL Repack Arguments -------------;/out:/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/obj/Debug/Xamarin.iOS.Tasks.dll  /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/obj/Debug/Xamarin.iOS.Tasks.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Core/bin/Debug/Xamarin.iOS.Tasks.Core.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/Xamarin.MacDev.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/Xamarin.MacDev.Tasks.Core.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Xamarin.MacDev.Tasks.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Mono.Cecil.dll;-----------------------------------------------;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/obj/Debug/Xamarin.iOS.Tasks.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/obj/Debug/Xamarin.iOS.Tasks.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Core/bin/Debug/Xamarin.iOS.Tasks.Core.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Core/bin/Debug/Xamarin.iOS.Tasks.Core.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/Xamarin.MacDev.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/Xamarin.MacDev.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/Xamarin.MacDev.Tasks.Core.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/Xamarin.MacDev.Tasks.Core.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Xamarin.MacDev.Tasks.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Xamarin.MacDev.Tasks.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Mono.Cecil.dll;INFO: Processing references;INFO: Processing types;INFO: Merging <Module>;INFO: Merging <Module>;ERROR: Duplicate type Xamarin.iOS.Tasks.ACToolTaskBase;System.InvalidOperationException: Duplicate type Xamarin.iOS.Tasks.ACToolTaskBase from Xamarin.iOS.Tasks.Core.dll, was also present in Xamarin.iOS.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;at ILRepacking.RepackImporter.Import (Mono.Cecil.TypeDefinition type, Mono.Collections.Generic.Collection`1[T] col, System.Boolean internalize) [0x00165] in <64e369dd574e4d42a56b1689deff9155>:0;at ILRepacking.Steps.TypesRepackStep.RepackTypes () [0x00142] in <64e369dd574e4d42a56b1689deff9155>:0;at ILRepacking.Steps.TypesRepackStep.Perform () [0x00000] in <64e369dd574e4d42a56b1689deff9155>:0;at ILRepacking.ILRepack.Repack () [0x00305] in <64e369dd574e4d42a56b1689deff9155>:0;at ILRepacking.Application.Main (System.String[] args) [0x0004a] in <64e369dd574e4d42a56b1689deff9155>:0

"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.sln" (default target) (1) ->
"/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj" (default target) (8) ->
  /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj(145,5): error : INFO: IL Repack - Version 2.0.13;INFO: ------------- IL Repack Arguments -------------;/out:/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/obj/Debug/Xamarin.Mac.Tasks.dll  /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/obj/Debug/Xamarin.Mac.Tasks.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks.Core/bin/Debug/Xamarin.Mac.Tasks.Core.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/Xamarin.MacDev.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/Xamarin.MacDev.Tasks.Core.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Xamarin.MacDev.Tasks.dll /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Mono.Cecil.dll;-----------------------------------------------;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/obj/Debug/Xamarin.Mac.Tasks.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks/obj/Debug/Xamarin.Mac.Tasks.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks.Core/bin/Debug/Xamarin.Mac.Tasks.Core.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.Mac.Tasks.Core/bin/Debug/Xamarin.Mac.Tasks.Core.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/Xamarin.MacDev.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/bin/Debug/Xamarin.MacDev.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/Xamarin.MacDev.Tasks.Core.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks.Core/bin/Debug/Xamarin.MacDev.Tasks.Core.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Xamarin.MacDev.Tasks.dll;INFO: Failed to load debug information for /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Xamarin.MacDev.Tasks.dll;INFO: Adding assembly for merge: /Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/bin/Debug/Mono.Cecil.dll;INFO: Processing references;INFO: Processing types;INFO: Merging <Module>;INFO: Merging <Module>;ERROR: Duplicate type Xamarin.Mac.Tasks.MacOSXSdks;System.InvalidOperationException: Duplicate type Xamarin.Mac.Tasks.MacOSXSdks from Xamarin.Mac.Tasks.Core.dll, was also present in Xamarin.Mac.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;at ILRepacking.RepackImporter.Import (Mono.Cecil.TypeDefinition type, Mono.Collections.Generic.Collection`1[T] col, System.Boolean internalize) [0x00165] in <64e369dd574e4d42a56b1689deff9155>:0;at ILRepacking.Steps.TypesRepackStep.RepackTypes () [0x00142] in <64e369dd574e4d42a56b1689deff9155>:0;at ILRepacking.Steps.TypesRepackStep.Perform () [0x00000] in <64e369dd574e4d42a56b1689deff9155>:0;at ILRepacking.ILRepack.Repack () [0x00305] in <64e369dd574e4d42a56b1689deff9155>:0;at ILRepacking.Application.Main (System.String[] args) [0x0004a] in <64e369dd574e4d42a56b1689deff9155>:0

main take away:

ERROR: Duplicate type Xamarin.iOS.Tasks.ACToolTaskBase;System.InvalidOperationException: Duplicate type Xamarin.iOS.Tasks.ACToolTaskBase from Xamarin.iOS.Tasks.Core.dll, was also present in Xamarin.iOS.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

ERROR: Duplicate type Xamarin.Mac.Tasks.MacOSXSdks;System.InvalidOperationException: Duplicate type Xamarin.Mac.Tasks.MacOSXSdks from Xamarin.Mac.Tasks.Core.dll, was also present in Xamarin.Mac.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

Logs on wrench: http://xamarin-storage/macios-mac-mono-2018-02/a7/a7abab1cc67eddf87c80c8b1a7d1d39a7ced5316/Itchy-HighSierra/1f82a27daa28/jenkins-results/tests/index.html http://xamarin-storage/macios-mac-mono-2018-02/a7/a7abab1cc67eddf87c80c8b1a7d1d39a7ced5316/Itchy-HighSierra/1f82a27daa28/jenkins-results/tests/Xamarin.MacDev.Tasks_267/build-iOS-20180308_114857.txt

/cc @rolfbjarne @spouliot

https://github.com/mono/mono/issues/6842 https://github.com/xamarin/xamarin-macios/pull/3402

rolfbjarne commented 6 years ago

CC @jstedfast, who implemented the IL repacking.

marek-safar commented 6 years ago

@radical does this ring any bell?

jstedfast commented 6 years ago

Clean the msbuild outputs and try again. For some reason, the msbuild logic to detect if the assemblies have already been merged isn't working.

This used to happen in some commits from several months ago, but has long been fixed afaik.

lewurm commented 6 years ago

@jstedfast this is a problem on the wrench/jenkins bots.

Here is an instance where it happens on jenkins: https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/6662/Test_Report/

jstedfast commented 6 years ago

This is the problem:

Target "ILRepack: (TargetId:294)" in project "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj" (target "Compile" depends on it):
Building target "ILRepack" completely.
Input file "/Users/builder/data/lanes/5929/a7abab1c/source/xamarin-macios/msbuild/Xamarin.iOS.Tasks/obj/Debug/Xamarin.iOS.Tasks.dll" is newer than output file "obj/Debug/ilrepack.txt".

Now all someone needs to do is figure out why that file exists in the build in the first place before ilrepacking has been done.

lewurm commented 6 years ago

fixed by https://github.com/xamarin/xamarin-macios/pull/3747