sourcelink: Sourcelink doesn't work on Fedora 27
Working with the dotnetsay sample on F27 and hit the following-
$dotnet pack -c release -o nupkg
Microsoft (R) Build Engine version 15.7.177.53362 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restoring packages for /media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj...
Installing Microsoft.Build.Tasks.Git 1.0.0-beta-62909-01.
Installing Microsoft.SourceLink.Common 1.0.0-beta-62909-01.
Installing Microsoft.SourceLink.GitHub 1.0.0-beta-62909-01.
Generating MSBuild file /media/psf/Home/github/core/samples/dotnetsay/obj/dotnetsay.csproj.nuget.g.props.
Generating MSBuild file /media/psf/Home/github/core/samples/dotnetsay/obj/dotnetsay.csproj.nuget.g.targets.
Restore completed in 9.12 sec for /media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj.
You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project. More at https://go.microsoft.com/fwlink/?linkid=869452
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly. [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-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 'git2-6311e88' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-6311e88: cannot open shared object file: No such file or directory [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods.git_libgit2_init() [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary() [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods..cctor() [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: --- End of inner exception stack trace --- [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods.git_buf_free(GitBuf buf) [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever) [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at LibGit2Sharp.Repository.Discover(String startingPath) [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 19 [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
/home/leecow/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-62909-01/build/Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/media/psf/Home/github/core/samples/dotnetsay/dotnetsay.csproj]
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 23 (14 by maintainers)
We are now testing SourceLink end-to-end scenarios on the following platforms:
@tmat The linux library that currently ships in the LibGit2Sharp.NativeBinaries package is built against Ubuntu, so that’s the only distro that is likely to work out of the box.
However, I’ve done work in https://github.com/libgit2/libgit2sharp.nativebinaries/pull/51 to ship binaries for every distro supported by .NET Core. I just need @ethomson to find some time to review it!
@ethomson Awesome! I’ll update SourceLink and see if we can start running tests on more distros.
@bording I figured we can avoid parsing the JSON file at runtime and instead pre-generate the RID -> directory name map for the platforms that libgit2 supports.
See https://github.com/dotnet/sourcelink/pull/98/commits/b6271acec70416cd7485874a3a3f9cc6d3e01c66
New prerelease is at : https://www.nuget.org/packages/LibGit2Sharp/0.26.0-preview-0027