dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.02k stars 4.03k forks source link

Cannot build from an SSH clone #28782

Closed jaredpar closed 6 years ago

jaredpar commented 6 years ago

On my Linux box I use SSH to clone the repo instead of the typical HTTPS. This breaks our ability to build.

/code/nuget.packages/microsoft.build.tasks.git/1.0.0-beta-63001-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [/code/roslyn/src/Tools/ILAsm/IlAsmDeploy.csproj]
/code/nuget.packages/microsoft.build.tasks.git/1.0.0-beta-63001-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library '/code/nuget.packages/microsoft.build.tasks.git/1.0.0-beta-63001-01/build/../tools/netcoreapp2.0/runtimes/linux-x64/native/libgit2-6311e88.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libcurl-gnutls.so.4: cannot open shared object file: No such file or directory [/code/roslyn/src/Tools/ILAsm/IlAsmDeploy.csproj]
jaredpar commented 6 years ago

CC @tmat as this appears to be a source link issue

tmat commented 6 years ago

What distro of Linux is it?

jaredpar commented 6 years ago

centos-7

Hjorthen commented 6 years ago

I had the exact same issue. Not sure if it was due to cloning the project using ssl, but libgit2-6311e88.so has a dependency on openssl.1.0.0 which I did not have installed. After installation I managed to compile. Note that is has to be 1.0.0 and not 1.0.3. This was on debian stretch.