Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local build fails when executing GitVersion #1548

Closed
wheelerlaw opened this issue Jul 9, 2019 · 12 comments · Fixed by #1611
Closed

Local build fails when executing GitVersion #1548

wheelerlaw opened this issue Jul 9, 2019 · 12 comments · Fixed by #1611
Labels

Comments

@wheelerlaw
Copy link

wheelerlaw commented Jul 9, 2019

I was going to take a stab at fixing dotnet/vscode-csharp#3160, but I ran into some issues getting omnisharp to build locally.

I installed mono from their repository. I'm running Fedora 29

$ mono -V
Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 08:39:50 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)
$ uname -a
Linux localhost.localdomain 5.1.16-200.fc29.x86_64 #1 SMP Wed Jul 3 16:03:17 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Here is the concatenated output:

...
Executing: /home/wlaw/omnisharp-roslyn/tools/GitVersion.CommandLine.5.0.0-beta2-65/tools/GitVersion.exe 
INFO [07/09/19 19:29:16:60] Working directory: /home/wlaw/omnisharp-roslyn
INFO [07/09/19 19:29:16:61] IsDynamicGitRepository: False
ERROR [07/09/19 19:29:16:62] An unexpected error occurred:
System.BadImageFormatException: Method has no body
File name: 'LibGit2Sharp'
  at LibGit2Sharp.Core.Proxy.git_buf_free (LibGit2Sharp.Core.Handles.GitBuf buf) [0x00000] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Core.Handles.GitBuf.Dispose () [0x00000] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Core.Proxy.ConvertPath (System.Func`2[T,TResult] pathRetriever) [0x0002e] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Core.Proxy.git_repository_discover (LibGit2Sharp.Core.FilePath start_path) [0x00005] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Repository.Discover (System.String startingPath) [0x00006] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at GitVersion.GitPreparer.GetDotGitDirectory () [0x0000f] in <5c5497d262c74a01a7f58cfc216074cb>:0 
  at GitVersion.GitPreparer.GetProjectRootDirectory () [0x00048] in <5c5497d262c74a01a7f58cfc216074cb>:0 
  at GitVersion.ConfigurationProvider.Verify (GitVersion.GitPreparer gitPreparer, GitVersion.Helpers.IFileSystem fileSystem) [0x00014] in <5c5497d262c74a01a7f58cfc216074cb>:0 
  at GitVersion.Program.VerifyConfiguration (GitVersion.Arguments arguments, GitVersion.Helpers.IFileSystem fileSystem) [0x00023] in <5c5497d262c74a01a7f58cfc216074cb>:0 
  at GitVersion.Program.VerifyArgumentsAndRun () [0x00118] in <5c5497d262c74a01a7f58cfc216074cb>:0 
INFO [07/09/19 19:29:16:62] 
INFO [07/09/19 19:29:16:62] Attempting to show the current git graph (please include in issue): 
INFO [07/09/19 19:29:16:62] Showing max of 100 commits
INFO [07/09/19 19:29:16:67] *   3687e7f5 4 days ago  (HEAD -> master, origin/master, origin/HEAD)
|\  
| * ea4d5cd1 6 days ago 
| * 8cf12d9f 6 days ago 
...

Full output:

$ ./build.sh --target Quick --verbosity Diagnostic
Feeds used:
  /home/wlaw/.nuget/packages/
  https://api.nuget.org/v3/index.json
  https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
  https://dotnet.myget.org/F/dotnet-cli/api/v3/index.json
  https://www.myget.org/F/omnisharp/api/v3/index.json
  https://dotnet.myget.org/F/roslyn/api/v3/index.json
  https://www.myget.org/F/vs-editor/api/v3/index.json

All packages listed in /home/wlaw/omnisharp-roslyn/tools/packages.config are already installed.
Module directory does not exist.
NuGet.config not found.
Analyzing build script...
Analyzing /home/wlaw/omnisharp-roslyn/build.cake...
Analyzing /home/wlaw/omnisharp-roslyn/scripts/common.cake...
Analyzing /home/wlaw/omnisharp-roslyn/scripts/platform.cake...
Analyzing /home/wlaw/omnisharp-roslyn/scripts/runhelpers.cake...
Script '/home/wlaw/omnisharp-roslyn/scripts/platform.cake' has already been processed.
Analyzing /home/wlaw/omnisharp-roslyn/scripts/archiving.cake...
Script '/home/wlaw/omnisharp-roslyn/scripts/common.cake' has already been processed.
Script '/home/wlaw/omnisharp-roslyn/scripts/runhelpers.cake' has already been processed.
Analyzing /home/wlaw/omnisharp-roslyn/scripts/artifacts.cake...
Script '/home/wlaw/omnisharp-roslyn/scripts/common.cake' has already been processed.
Script '/home/wlaw/omnisharp-roslyn/scripts/runhelpers.cake' has already been processed.
Script '/home/wlaw/omnisharp-roslyn/scripts/platform.cake' has already been processed.
Analyzing /home/wlaw/omnisharp-roslyn/scripts/validation.cake...
Script '/home/wlaw/omnisharp-roslyn/scripts/common.cake' has already been processed.
Script '/home/wlaw/omnisharp-roslyn/scripts/runhelpers.cake' has already been processed.
Processing build script...
Installing tools...
Found package 'GitVersion.CommandLine 5.0.0-beta2-65' in '/home/wlaw/omnisharp-roslyn/tools'.
Package GitVersion.CommandLine.5.0.0-beta2-65 has already been installed.
Successfully installed 'GitVersion.CommandLine 5.0.0-beta2-65' to /home/wlaw/omnisharp-roslyn/tools
Executing nuget actions took 21.46 ms
Installing addins...
Found package 'Newtonsoft.Json 11.0.2' in '/home/wlaw/omnisharp-roslyn/tools/Addins'.
Package Newtonsoft.Json.11.0.2 has already been installed.
Successfully installed 'Newtonsoft.Json 11.0.2' to /home/wlaw/omnisharp-roslyn/tools/Addins
Executing nuget actions took 1.04 ms
The addin Newtonsoft.Json will reference Newtonsoft.Json.dll.
Verifying assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.
Adding assembly reference to mscorlib.dll...
Adding assembly reference to System.Core.dll...
Adding assembly reference to Cake.Core.dll...
Adding assembly reference to Cake.Common.dll...
Adding assembly reference to Cake.exe...
Adding assembly reference to System.dll...
Adding assembly reference to System.Xml.dll...
Adding assembly reference to System.Xml.Linq.dll...
Adding assembly reference to System.Data.dll...
Adding assembly reference to System.Runtime.dll...
Adding assembly reference to System.Collections.dll...
Adding assembly reference to netstandard.dll...
Adding assembly reference to Newtonsoft.Json.dll...
Importing namespace Cake.Common...
Importing namespace Cake.Common.Build...
Importing namespace Cake.Common.Build.AppVeyor...
Importing namespace Cake.Common.Build.AppVeyor.Data...
Importing namespace Cake.Common.Build.Bamboo...
Importing namespace Cake.Common.Build.Bamboo.Data...
Importing namespace Cake.Common.Build.BitbucketPipelines...
Importing namespace Cake.Common.Build.BitbucketPipelines.Data...
Importing namespace Cake.Common.Build.Bitrise...
Importing namespace Cake.Common.Build.Bitrise.Data...
Importing namespace Cake.Common.Build.ContinuaCI...
Importing namespace Cake.Common.Build.ContinuaCI.Data...
Importing namespace Cake.Common.Build.GitLabCI...
Importing namespace Cake.Common.Build.GitLabCI.Data...
Importing namespace Cake.Common.Build.GoCD...
Importing namespace Cake.Common.Build.GoCD.Data...
Importing namespace Cake.Common.Build.Jenkins...
Importing namespace Cake.Common.Build.Jenkins.Data...
Importing namespace Cake.Common.Build.MyGet...
Importing namespace Cake.Common.Build.TeamCity...
Importing namespace Cake.Common.Build.TFBuild...
Importing namespace Cake.Common.Build.TFBuild.Data...
Importing namespace Cake.Common.Build.TravisCI...
Importing namespace Cake.Common.Build.TravisCI.Data...
Importing namespace Cake.Common.Diagnostics...
Importing namespace Cake.Common.IO...
Importing namespace Cake.Common.IO.Paths...
Importing namespace Cake.Common.Net...
Importing namespace Cake.Common.Security...
Importing namespace Cake.Common.Solution...
Importing namespace Cake.Common.Solution.Project...
Importing namespace Cake.Common.Solution.Project.Properties...
Importing namespace Cake.Common.Solution.Project.XmlDoc...
Importing namespace Cake.Common.Text...
Importing namespace Cake.Common.Tools...
Importing namespace Cake.Common.Tools.Cake...
Importing namespace Cake.Common.Tools.Chocolatey...
Importing namespace Cake.Common.Tools.Chocolatey.ApiKey...
Importing namespace Cake.Common.Tools.Chocolatey.Config...
Importing namespace Cake.Common.Tools.Chocolatey.Download...
Importing namespace Cake.Common.Tools.Chocolatey.Features...
Importing namespace Cake.Common.Tools.Chocolatey.Install...
Importing namespace Cake.Common.Tools.Chocolatey.New...
Importing namespace Cake.Common.Tools.Chocolatey.Pack...
Importing namespace Cake.Common.Tools.Chocolatey.Pin...
Importing namespace Cake.Common.Tools.Chocolatey.Push...
Importing namespace Cake.Common.Tools.Chocolatey.Sources...
Importing namespace Cake.Common.Tools.Chocolatey.Uninstall...
Importing namespace Cake.Common.Tools.Chocolatey.Upgrade...
Importing namespace Cake.Common.Tools.DotCover...
Importing namespace Cake.Common.Tools.DotCover.Analyse...
Importing namespace Cake.Common.Tools.DotCover.Cover...
Importing namespace Cake.Common.Tools.DotCover.Merge...
Importing namespace Cake.Common.Tools.DotCover.Report...
Importing namespace Cake.Common.Tools.DotNetCore...
Importing namespace Cake.Common.Tools.DotNetCore.Build...
Importing namespace Cake.Common.Tools.DotNetCore.BuildServer...
Importing namespace Cake.Common.Tools.DotNetCore.Clean...
Importing namespace Cake.Common.Tools.DotNetCore.Execute...
Importing namespace Cake.Common.Tools.DotNetCore.MSBuild...
Importing namespace Cake.Common.Tools.DotNetCore.NuGet.Delete...
Importing namespace Cake.Common.Tools.DotNetCore.NuGet.Push...
Importing namespace Cake.Common.Tools.DotNetCore.Pack...
Importing namespace Cake.Common.Tools.DotNetCore.Publish...
Importing namespace Cake.Common.Tools.DotNetCore.Restore...
Importing namespace Cake.Common.Tools.DotNetCore.Run...
Importing namespace Cake.Common.Tools.DotNetCore.Test...
Importing namespace Cake.Common.Tools.DotNetCore.Tool...
Importing namespace Cake.Common.Tools.DotNetCore.VSTest...
Importing namespace Cake.Common.Tools.DupFinder...
Importing namespace Cake.Common.Tools.Fixie...
Importing namespace Cake.Common.Tools.GitLink...
Importing namespace Cake.Common.Tools.GitReleaseManager...
Importing namespace Cake.Common.Tools.GitReleaseManager.AddAssets...
Importing namespace Cake.Common.Tools.GitReleaseManager.Close...
Importing namespace Cake.Common.Tools.GitReleaseManager.Create...
Importing namespace Cake.Common.Tools.GitReleaseManager.Export...
Importing namespace Cake.Common.Tools.GitReleaseManager.Label...
Importing namespace Cake.Common.Tools.GitReleaseManager.Publish...
Importing namespace Cake.Common.Tools.GitReleaseNotes...
Importing namespace Cake.Common.Tools.GitVersion...
Importing namespace Cake.Common.Tools.ILMerge...
Importing namespace Cake.Common.Tools.ILRepack...
Importing namespace Cake.Common.Tools.InnoSetup...
Importing namespace Cake.Common.Tools.InspectCode...
Importing namespace Cake.Common.Tools.MSBuild...
Importing namespace Cake.Common.Tools.MSpec...
Importing namespace Cake.Common.Tools.MSTest...
Importing namespace Cake.Common.Tools.NSIS...
Importing namespace Cake.Common.Tools.NuGet...
Importing namespace Cake.Common.Tools.NuGet.Add...
Importing namespace Cake.Common.Tools.NuGet.Init...
Importing namespace Cake.Common.Tools.NuGet.Install...
Importing namespace Cake.Common.Tools.NuGet.List...
Importing namespace Cake.Common.Tools.NuGet.Pack...
Importing namespace Cake.Common.Tools.NuGet.Push...
Importing namespace Cake.Common.Tools.NuGet.Restore...
Importing namespace Cake.Common.Tools.NuGet.SetApiKey...
Importing namespace Cake.Common.Tools.NuGet.SetProxy...
Importing namespace Cake.Common.Tools.NuGet.Sources...
Importing namespace Cake.Common.Tools.NuGet.Update...
Importing namespace Cake.Common.Tools.NUnit...
Importing namespace Cake.Common.Tools.OctopusDeploy...
Importing namespace Cake.Common.Tools.OpenCover...
Importing namespace Cake.Common.Tools.ReportGenerator...
Importing namespace Cake.Common.Tools.ReportUnit...
Importing namespace Cake.Common.Tools.Roundhouse...
Importing namespace Cake.Common.Tools.SignTool...
Importing namespace Cake.Common.Tools.SpecFlow...
Importing namespace Cake.Common.Tools.SpecFlow.StepDefinitionReport...
Importing namespace Cake.Common.Tools.SpecFlow.TestExecutionReport...
Importing namespace Cake.Common.Tools.TextTransform...
Importing namespace Cake.Common.Tools.VSTest...
Importing namespace Cake.Common.Tools.VSWhere...
Importing namespace Cake.Common.Tools.VSWhere.All...
Importing namespace Cake.Common.Tools.VSWhere.Latest...
Importing namespace Cake.Common.Tools.VSWhere.Legacy...
Importing namespace Cake.Common.Tools.VSWhere.Product...
Importing namespace Cake.Common.Tools.WiX...
Importing namespace Cake.Common.Tools.WiX.Heat...
Importing namespace Cake.Common.Tools.XBuild...
Importing namespace Cake.Common.Tools.XUnit...
Importing namespace Cake.Common.Xml...
Importing namespace Cake.Core...
Importing namespace Cake.Core.Diagnostics...
Importing namespace Cake.Core.IO...
Importing namespace Cake.Core.Scripting...
Importing namespace Newtonsoft.Json...
Importing namespace Newtonsoft.Json.Linq...
Importing namespace System...
Importing namespace System.Collections.Generic...
Importing namespace System.ComponentModel...
Importing namespace System.Diagnostics...
Importing namespace System.IO...
Importing namespace System.IO.Compression...
Importing namespace System.Linq...
Importing namespace System.Net...
Importing namespace System.Text...
Importing namespace System.Threading.Tasks...
Compiling build script...
Executing: /home/wlaw/omnisharp-roslyn/tools/GitVersion.CommandLine.5.0.0-beta2-65/tools/GitVersion.exe 
INFO [07/31/19 16:06:39:47] Working directory: /home/wlaw/omnisharp-roslyn
INFO [07/31/19 16:06:39:48] IsDynamicGitRepository: False
ERROR [07/31/19 16:06:39:49] An unexpected error occurred:
System.BadImageFormatException: Method has no body
File name: 'LibGit2Sharp'
  at LibGit2Sharp.Core.Proxy.git_buf_free (LibGit2Sharp.Core.Handles.GitBuf buf) [0x00000] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Core.Handles.GitBuf.Dispose () [0x00000] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Core.Proxy.ConvertPath (System.Func`2[T,TResult] pathRetriever) [0x0002e] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Core.Proxy.git_repository_discover (LibGit2Sharp.Core.FilePath start_path) [0x00005] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Repository.Discover (System.String startingPath) [0x00006] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at GitVersion.GitPreparer.GetDotGitDirectory () [0x0000f] in <5c5497d262c74a01a7f58cfc216074cb>:0 
  at GitVersion.GitPreparer.GetProjectRootDirectory () [0x00048] in <5c5497d262c74a01a7f58cfc216074cb>:0 
  at GitVersion.ConfigurationProvider.Verify (GitVersion.GitPreparer gitPreparer, GitVersion.Helpers.IFileSystem fileSystem) [0x00014] in <5c5497d262c74a01a7f58cfc216074cb>:0 
  at GitVersion.Program.VerifyConfiguration (GitVersion.Arguments arguments, GitVersion.Helpers.IFileSystem fileSystem) [0x00023] in <5c5497d262c74a01a7f58cfc216074cb>:0 
  at GitVersion.Program.VerifyArgumentsAndRun () [0x00118] in <5c5497d262c74a01a7f58cfc216074cb>:0 
INFO [07/31/19 16:06:39:49] 
INFO [07/31/19 16:06:39:49] Attempting to show the current git graph (please include in issue): 
INFO [07/31/19 16:06:39:49] Showing max of 100 commits
INFO [07/31/19 16:06:39:54] * ba7909c1 33 minutes ago  (HEAD -> master, upstream/master)
*   d4e1db69 12 hours ago 
|\  
| *   c5c4ae43 34 hours ago 
| |\  
| |/  
|/|   
* |   e7e15536 2 days ago 
|\ \  
| * | 068df466 5 days ago 
| | *   46cdf2a9 3 days ago 
| | |\  
| |_|/  
|/| |   
* | |   ccd2ffec 3 days ago 
|\ \ \  
| |/ /  
|/| |   
| * | 7ebc31e5 7 days ago 
| * | 2e739ea0 7 days ago 
| * | f2aad54b 7 days ago 
|/ /  
| * a90eef5c 7 days ago 
| * 9324ac32 7 days ago 
| * 7104c18a 8 days ago 
|/  
*   e869b97e 8 days ago 
|\  
| *   227b1fb2 9 days ago 
| |\  
| | *   500f8bb4 9 days ago 
| | |\  
| |_|/  
|/| |   
* | |   c88a425f 9 days ago 
|\ \ \  
| * | | 694b92c9 10 days ago 
| * | | a6f8d9d8 10 days ago 
| * | | 307148b1 10 days ago 
| * | | e3d448ea 10 days ago 
|/ / /  
| * | bc297f9c 9 days ago 
| |/  
| * ebe3e467 9 days ago 
| * 9d1baa1c 10 days ago 
|/  
*   f6b33e06 13 days ago 
|\  
| *   fa54810b 2 weeks ago 
| |\  
| |/  
|/|   
* |   79db05e5 2 weeks ago 
|\ \  
| * \   487c37fc 2 weeks ago 
| |\ \  
| |/ /  
|/| |   
* | | 5a5250b9 2 weeks ago 
| * | ec9fb0bd 2 weeks ago 
|/ /  
| * 057ccdc5 2 weeks ago 
|/  
*   50c82059 2 weeks ago  (origin/master, origin/HEAD)
|\  
| * 7954ea6e 3 weeks ago 
|/  
* 61d7b82b 3 weeks ago 
*   300eb7eb 3 weeks ago 
|\  
| * 95ade0ea 3 weeks ago 
| * 67c5d20b 3 weeks ago 
| * 4c67a7ad 3 weeks ago 
| * 7caf9816 3 weeks ago 
| * 119f4646 3 weeks ago 
| * ac9b32d7 3 weeks ago 
|/  
*   c2c6cfca 3 weeks ago 
|\  
| *   8acbd35d 3 weeks ago 
| |\  
| |/  
|/|   
* |   4de169b1 3 weeks ago 
|\ \  
| * \   2249e76a 3 weeks ago 
| |\ \  
| |/ /  
|/| |   
| * |   74d68ea4 3 weeks ago 
| |\ \  
| * | | f1bb8ef0 3 weeks ago 
| * | | 025d9769 3 weeks ago 
| * | | 04c0fb25 3 weeks ago 
| | | *   47d72f14 3 weeks ago 
| | | |\  
| |_|_|/  
|/| | |   
* | | |   89787836 3 weeks ago 
|\ \ \ \  
| |_|/ /  
|/| | |   
| * | |   01a5aca7 3 weeks ago 
| |\ \ \  
| |/ / /  
|/| | |   
| * | |   67277c18 4 weeks ago 
| |\ \ \  
| | |/ /  
| * | |   c8085c0c 4 weeks ago 
| |\ \ \  
| * \ \ \   672a0122 5 weeks ago 
| |\ \ \ \  
| * \ \ \ \   22e17892 5 weeks ago 
| |\ \ \ \ \  
| * \ \ \ \ \   281ad002 5 weeks ago 
| |\ \ \ \ \ \  
| * \ \ \ \ \ \   49c01c1b 5 weeks ago 
| |\ \ \ \ \ \ \  
| * | | | | | | | fbf7d369 5 weeks ago 
| * | | | | | | |   90c7d933 5 weeks ago 
| |\ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \   2c130684 6 weeks ago 
| |\ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \   bbc31adf 7 weeks ago 
| |\ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \   a4635729 9 weeks ago 
| |\ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \   03c31f65 10 weeks ago 
| |\ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \   dab7a8c6 2 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \   0471c2ed 2 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \   9b9ac632 2 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   26aaac9c 3 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   7099e22d 3 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   79e03908 3 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   1138ac82 3 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   9949e56c 4 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   2afb64aa 4 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * | | | | | | | | | | | | | | | | | | | | | 57543fcb 4 months ago 
| * | | | | | | | | | | | | | | | | | | | | | c6a36832 4 months ago 
| * | | | | | | | | | | | | | | | | | | | | | 515f6919 4 months ago 
| * | | | | | | | | | | | | | | | | | | | | | 963c7081 4 months ago 
| * | | | | | | | | | | | | | | | | | | | | |   1aeab24f 4 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   e60dc682 4 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   1f470713 4 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   a04812ac 4 months ago 
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * | | | | | | | | | | | | | | | | | | | | | | | | | 0332ef64 4 months ago 
| |/ / / / / / / / / / / / / / / / / / / / / / / / /  
| * | | | | | | | | | | | | | | | | | | | | | | | | f136bf1e 4 months ago 
| * | | | | | | | | | | | | | | | | | | | | | | | |   a06b47b4 4 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   9efd76d5 4 months ago 
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   4a65088a 4 months ago 
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | f1a60613 4 months ago 
| |/ / / / / / / / / / / / / / / / / / / / / / / / / / /  
| * | | | | | | | | | | | | | | | | | | | | | | | | | | 401e66e8 4 months ago 
| * | | | | | | | | | | | | | | | | | | | | | | | | | | 5690dc12 4 months ago 
| * | | | | | | | | | | | | | | | | | | | | | | | | | |   596cbe62 4 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | 4659787c 4 months ago 
| * | | | | | | | | | | | | | | | | | | | | | | | | | | |   ac931222 5 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   17eb6d93 5 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   fca2bb4f 5 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   2a199b18 5 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   9dd4cef8 5 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f17aeeb0 5 months ago 
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c773575a 5 months ago 
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8a298e56 5 months ago 
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |   a7c21ff1 5 months ago 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  

Error: System.AggregateException: One or more errors occurred. (GitVersion: Process returned an error (exit code 1).) ---> Cake.Core.CakeException: GitVersion: Process returned an error (exit code 1).
  at Cake.Core.Tooling.Tool`1[TSettings].ProcessExitCode (System.Int32 exitCode) [0x00023] in <a00b8015945847b1831aadd6a5bf19c1>:0 
  at Cake.Core.Tooling.Tool`1[TSettings].Run (TSettings settings, Cake.Core.IO.ProcessArgumentBuilder arguments, Cake.Core.IO.ProcessSettings processSettings, System.Action`1[T] postAction) [0x000a0] in <a00b8015945847b1831aadd6a5bf19c1>:0 
  at Cake.Common.Tools.GitVersion.GitVersionRunner.Run (Cake.Common.Tools.GitVersion.GitVersionSettings settings) [0x00054] in <f424898eadba42d68062fc2b0403c4b1>:0 
  at Cake.Common.Tools.GitVersion.GitVersionAliases.GitVersion (Cake.Core.ICakeContext context, Cake.Common.Tools.GitVersion.GitVersionSettings settings) [0x00031] in <f424898eadba42d68062fc2b0403c4b1>:0 
  at Cake.Common.Tools.GitVersion.GitVersionAliases.GitVersion (Cake.Core.ICakeContext context) [0x00014] in <f424898eadba42d68062fc2b0403c4b1>:0 
  at Submission#0+BuildEnvironment.GetGitVersionFromEnvironment (Cake.Core.ICakeContext context) [0x001d1] in <86d8693d5a584979a34c088f99103e10>:0 
  at Submission#0+BuildEnvironment..ctor (System.Boolean useGlobalDotNetSdk, Cake.Core.ICakeContext context) [0x001dd] in <86d8693d5a584979a34c088f99103e10>:0 
  at Submission#0+<<Initialize>>d__0.MoveNext () [0x00108] in <86d8693d5a584979a34c088f99103e10>:0 
  at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult] (System.Collections.Immutable.ImmutableArray`1[T] precedingExecutors, System.Func`2[T,TResult] currentExecutor, System.Runtime.CompilerServices.StrongBox`1[T] exceptionHolderOpt, System.Func`2[T,TResult] catchExceptionOpt, System.Threading.CancellationToken cancellationToken) [0x00186] in <3bfae55b53254752b1c3dc824b21dbe3>:0 
  at Microsoft.CodeAnalysis.Scripting.Script`1[T].RunSubmissionsAsync (Microsoft.CodeAnalysis.Scripting.ScriptExecutionState executionState, System.Collections.Immutable.ImmutableArray`1[T] precedingExecutors, System.Func`2[T,TResult] currentExecutor, System.Func`2[T,TResult] catchExceptionOpt, System.Threading.CancellationToken cancellationToken) [0x000a8] in <3bfae55b53254752b1c3dc824b21dbe3>:0 
   --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <6b8bdf3aa3e64e7f91da81ece11b0637>:0 
  at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <6b8bdf3aa3e64e7f91da81ece11b0637>:0 
  at System.Threading.Tasks.Task.Wait () [0x00000] in <6b8bdf3aa3e64e7f91da81ece11b0637>:0 
  at Cake.Scripting.Roslyn.RoslynScriptSession.Execute (Cake.Core.Scripting.Script script) [0x001a7] in <bb10a231e96a427e9067be4d3990f5d4>:0 
  at Cake.Core.Scripting.ScriptRunner.Run (Cake.Core.Scripting.IScriptHost host, Cake.Core.IO.FilePath scriptPath, System.Collections.Generic.IDictionary`2[TKey,TValue] arguments) [0x00358] in <a00b8015945847b1831aadd6a5bf19c1>:0 
  at Cake.Commands.BuildCommand.Execute (Cake.CakeOptions options) [0x0003f] in <bb10a231e96a427e9067be4d3990f5d4>:0 
  at Cake.CakeApplication.Run (Cake.CakeOptions options) [0x00015] in <bb10a231e96a427e9067be4d3990f5d4>:0 
  at Cake.Program.Main () [0x000d1] in <bb10a231e96a427e9067be4d3990f5d4>:0 
---> (Inner Exception #0) Cake.Core.CakeException: GitVersion: Process returned an error (exit code 1).
  at Cake.Core.Tooling.Tool`1[TSettings].ProcessExitCode (System.Int32 exitCode) [0x00023] in <a00b8015945847b1831aadd6a5bf19c1>:0 
  at Cake.Core.Tooling.Tool`1[TSettings].Run (TSettings settings, Cake.Core.IO.ProcessArgumentBuilder arguments, Cake.Core.IO.ProcessSettings processSettings, System.Action`1[T] postAction) [0x000a0] in <a00b8015945847b1831aadd6a5bf19c1>:0 
  at Cake.Common.Tools.GitVersion.GitVersionRunner.Run (Cake.Common.Tools.GitVersion.GitVersionSettings settings) [0x00054] in <f424898eadba42d68062fc2b0403c4b1>:0 
  at Cake.Common.Tools.GitVersion.GitVersionAliases.GitVersion (Cake.Core.ICakeContext context, Cake.Common.Tools.GitVersion.GitVersionSettings settings) [0x00031] in <f424898eadba42d68062fc2b0403c4b1>:0 
  at Cake.Common.Tools.GitVersion.GitVersionAliases.GitVersion (Cake.Core.ICakeContext context) [0x00014] in <f424898eadba42d68062fc2b0403c4b1>:0 
  at Submission#0+BuildEnvironment.GetGitVersionFromEnvironment (Cake.Core.ICakeContext context) [0x001d1] in <86d8693d5a584979a34c088f99103e10>:0 
  at Submission#0+BuildEnvironment..ctor (System.Boolean useGlobalDotNetSdk, Cake.Core.ICakeContext context) [0x001dd] in <86d8693d5a584979a34c088f99103e10>:0 
  at Submission#0+<<Initialize>>d__0.MoveNext () [0x00108] in <86d8693d5a584979a34c088f99103e10>:0 
  at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult] (System.Collections.Immutable.ImmutableArray`1[T] precedingExecutors, System.Func`2[T,TResult] currentExecutor, System.Runtime.CompilerServices.StrongBox`1[T] exceptionHolderOpt, System.Func`2[T,TResult] catchExceptionOpt, System.Threading.CancellationToken cancellationToken) [0x00186] in <3bfae55b53254752b1c3dc824b21dbe3>:0 
  at Microsoft.CodeAnalysis.Scripting.Script`1[T].RunSubmissionsAsync (Microsoft.CodeAnalysis.Scripting.ScriptExecutionState executionState, System.Collections.Immutable.ImmutableArray`1[T] precedingExecutors, System.Func`2[T,TResult] currentExecutor, System.Func`2[T,TResult] catchExceptionOpt, System.Threading.CancellationToken cancellationToken) [0x000a8] in <3bfae55b53254752b1c3dc824b21dbe3>:0 <---

I am going to try to downgrade the GitVersion package to see if that will fix it, otherwise I'm pretty new with C#/mono build fundamentals so I'm at a loss at where to go from here.

@filipw
Copy link
Member

filipw commented Jul 11, 2019

cc gitversion experts @gep13 @david-driscoll @mholo65

@filipw filipw added the build label Jul 11, 2019
@bjorkstromm
Copy link
Member

The GitVersion task should not run locally, see:
https://github.com/OmniSharp/omnisharp-roslyn/blob/master/build.cake#L91

How are you executing the build?

@wheelerlaw
Copy link
Author

build.sh --target Quick

@rcjsuen
Copy link

rcjsuen commented Jul 23, 2019

@wheelerlaw You seem to have gotten a little further than the rest of us in #1150

What version of msbuild do you have?

@wheelerlaw
Copy link
Author

I’m not sure what you mean, that PR is from over a year ago.

And whatever version is included with .NET Core 3.whatever. I’ll find the exact version number when I’m next to my computer.

@rcjsuen
Copy link

rcjsuen commented Jul 23, 2019

@wheelerlaw Haha! Sorry, I made a typo, I meant to say #1500.

@apzloy
Copy link

apzloy commented Jul 27, 2019

The same situation on Windows 10: "GitVersion: Process returned an error (exit code 1)."

@wheelerlaw
Copy link
Author

wheelerlaw commented Jul 31, 2019

@mholo65 Any ideas based on my last comment? I updated my original post to reflect the complete log.

Just tried specifying the configuration as --configuration Debug but no dice.

@wheelerlaw
Copy link
Author

wheelerlaw commented Jul 31, 2019

Okay, this appears to be an error within libgit2/libgit2sharp.nativebinaries

Steps I took to workaround this bug:

  1. Clone libgit2/libgit2sharp.nativebinaries
    and build it:

    $ git clone --recursive https://github.com/libgit2/libgit2sharp.nativebinaries
    
  2. Build libgit2sharp:

    ./build.libgit2.sh
    

    Note: Make sure you have cmake installed. Also, I ran into issues with OpenSSL libraries not being installed, so you might need to do this. For me I did this by running sudo dnf install openssl-devel cmake since I'm on Fedora; your installation instructions might be different depending on your distro.

  3. Copy the built libraries over to GitVersion (note the hash: 572e4d8. It might be different for you depending on when you build it):

    cp -av ~/libgit2sharp.nativebinaries/libgit2/build/libgit2-572e4d8.so* ~/omnisharp-roslyn/tools/GitVersion.CommandLine.5.0.0-beta2-65/tools/lib/linux/x86_64/
    
  4. Modify the LibGit2Sharp.dll.config file by pointing it to the newly build libraries (make sure the hash immediately after libgit2 matches the above step. Do not change the hash in the dll attribute, just target):

    <configuration>
        <!-- <dllmap os="linux" cpu="x86-64" wordsize="64" dll="git2-15e1193" target="lib/linux/x86_64/libgit2-15e1193.so" /> -->
        <dllmap os="linux" cpu="x86-64" wordsize="64" dll="git2-15e1193" target="lib/linux/x86_64/libgit2-572e4d8.so" />
        <dllmap os="osx" cpu="x86,x86-64" dll="git2-15e1193" target="lib/osx/libgit2-15e1193.dylib" />
    </configuration>
  5. Now run $ ./build.sh --target Quick --verbosity Diagnostic within omnisharp-roslyn. I got a different error, but I'm getting farther:

     ========================================
     InstallDotNetCoreSdk
     ========================================
     Executing task: InstallDotNetCoreSdk
     Create directory: /home/wlaw/omnisharp-roslyn/.dotnet.
     Run:
       Command: chmod
       Arguments: +x '/home/wlaw/omnisharp-roslyn/.dotnet/dotnet-install.sh'
       CWD: /home/wlaw/omnisharp-roslyn
     Run:
       Command: bash
       Arguments: -C /home/wlaw/omnisharp-roslyn/.dotnet/dotnet-install.sh -Channel preview -Version 2.1.505 -InstallDir /home/wlaw/omnisharp-roslyn/.dotnet
       CWD: /home/wlaw/omnisharp-roslyn
     dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.505/dotnet-sdk-2.1.505-linux-x64.tar.gz
     dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.505/dotnet-sdk-2.1.505-linux-x64.tar.gz
     dotnet-install: Adding to current process PATH: `/home/wlaw/omnisharp-roslyn/.dotnet`. Note: This change will be visible only when sourcing script.
     dotnet-install: Installation finished successfully.
     Run:
       Command: chmod
       Arguments: +x '/home/wlaw/omnisharp-roslyn/.dotnet/dotnet-install.sh'
       CWD: /home/wlaw/omnisharp-roslyn
     Run:
       Command: bash
       Arguments: -C /home/wlaw/omnisharp-roslyn/.dotnet/dotnet-install.sh -Channel preview -Version 1.1.2 -InstallDir /home/wlaw/omnisharp-roslyn/.dotnet -SharedRuntime
       CWD: /home/wlaw/omnisharp-roslyn
     dotnet_install: Warning: The --shared-runtime flag is obsolete and may be removed in a future version of this script. The recommended usage is to specify '--runtime dotnet'.
     dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-runtime-1.1.2-linux-x64.tar.gz
     curl: (22) The requested URL returned error: 404 
     dotnet-install: Cannot download: https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-runtime-1.1.2-linux-x64.tar.gz
     dotnet_install: Error: Could not find/download: `.NET Core Runtime` with version = 1.1.2
     dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
     An error occurred when executing task 'InstallDotNetCoreSdk'.
    

So could this (the original issue, not the above download error) perhaps indicate that GitVersion is not using a new enough version of libgit2sharp.nativebinaries, and that the fix is simply updating it? (@asbjornu)

@wheelerlaw
Copy link
Author

wheelerlaw commented Aug 1, 2019

jfc, so https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-runtime-1.1.2-linux-x64.tar.gz isn't even a valid link lol, awesome.

It appears that line 734 in dotnet-installer is not creating the correct legacy link for Fedora:

    legacy_download_link="$(construct_legacy_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false

But that link gets created correctly in the Azure builds because the the Azure builds report being able to download the legacy version:

dotnet-install: Downloading legacy link: https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-ubuntu.16.04-x64.1.1.2.tar.gz

And the rabbit hole gets deeper...

@wheelerlaw
Copy link
Author

Okay, so it looks like it's because there's no explicit support for fedora.29 for the versions of the DotNetSharedRuntimeVersions in the build.json which is causing that error. So I bumped them up to the most recent versions (2.2.401 for the SDK, and 2.2.6 for the Runtime) and it appears the build worked!!

@netogallo
Copy link

I had this problem when running ".\build.ps1" from a "detached head state". Just make sure you are in a proper branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants