omnisharp-roslyn: Can't build on Ubuntu 18.04

dotnet --info:

.NET Command Line Tools (2.1.200)

Product Information:
 Version:            2.1.200
 Commit SHA-1 hash:  2edba8d7f1

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.1.200/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.7
  Build    : 2d61d0b043915bc948ebf98836fefe9ba942be11

mono --version :

Mono JIT compiler version 5.12.0.226 (tarball Thu May  3 09:42:09 UTC 2018)
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:          supported, not enabled.
	GC:            sgen (concurrent by default)

I am using the latest master (Last commit - https://github.com/OmniSharp/omnisharp-roslyn/commit/e8507177962cda27804f930dc58bce090f910c75) . I followed the steps as listed to build omnisharp-roslyn and on running ./build.sh, I get the error:

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Error: One or more errors occurred.
	GitVersion: Process returned an error (exit code 134).

Please help.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 23 (15 by maintainers)

Most upvoted comments

I managed to get GitVersion working using techniques described here:

  1. Install libgit2, which on my system is done with
    sudo pacman -S libgit2
    
  2. Edit tools/gitversion.commandline.4.0.0-beta0012/GitVersion.CommandLine/tools/LibGit2Sharp.dll.config to point to the installed libgit2.so
    <configuration>
        <dllmap os="linux" cpu="x86-64" wordsize="64" dll="git2-baa87df" target="/usr/lib/libgit2.so" />
        <dllmap os="osx" cpu="x86,x86-64" dll="git2-baa87df" target="lib/osx/libgit2-baa87df.dylib" />
    </configuration>
    

I suspect that a build on Ubuntu would now have worked, but on Arch there is no Version, so I had to change build.cake#L51 to the following (added the ? to make Version nullable):

        var version = platform.Version?.ToString();

Following that, I can build! I need the --use-global-dotnet-sdk flag, or the .dotnet/dotnet-install.sh script errors out (again because archlinux uses rolling releases and has no version):

./build.sh --target Quick --verbosity Verbose --use-global-dotnet-sdk

Success!

I just created a VM and can reproduce the problem. It looks like this is due to https://github.com/GitTools/GitVersion/issues/1408. There are various solutions we could employ to workaround the problem, but I think we should probably just wait until GitVersion is fixed.

“There are various solutions we could employ to workaround the problem” – could you please provide one or some of them? This would get me past this issue. Thanks.

I have not investigated deeply enough to find any workarounds. @david-driscoll, do you have any ideas? It feels like GitVersion is dropping the ball on Linux.

@DustinCampbell could you provide @hifall and I some possible workarounds? I’ve updated to the most recent master branch and it seems that this issue with GitVersion has yet to be fixed because I’m getting the same error.

I could resolve DllNotFoundException by installing libcurl3 by apt-get, but another problem is occured. downloading dotnet-runtime-1.1.2 was failured because it was not supported in ubuntu-18.04. Here is error message.

dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-runtime-1.1.2-linux-x64.tar.gz
--2018-12-14 10:40:50--  https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-runtime-1.1.2-linux-x64.tar.gz
Connecting to 172.16.1.238:8080... connected.
Proxy request sent, awaiting response... 404 Not Found
2018-12-14 10:40:51 ERROR 404: Not Found.

dotnet-install: Cannot download: https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-runtime-1.1.2-linux-x64.tar.gz
dotnet-install: Downloading legacy link: https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-ubuntu.18.04-x64.1.1.2.tar.gz
--2018-12-14 10:40:51--  https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-ubuntu.18.04-x64.1.1.2.tar.gz
Connecting to 172.16.1.238:8080... connected.
Proxy request sent, awaiting response... 404 Not Found
2018-12-14 10:40:51 ERROR 404: Not Found.

dotnet-install: Cannot download: https://dotnetcli.azureedge.net/dotnet/Runtime/1.1.2/dotnet-ubuntu.18.04-x64.1.1.2.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'.