svg-net / SVG

Fork of the ms svg library
http://svg-net.github.io/SVG/
Microsoft Public License
1.17k stars 474 forks source link

install on Fedora 33 #838

Open JoKalliauer opened 3 years ago

JoKalliauer commented 3 years ago

bash-file

sudo dnf install libgit2 libgit2-devel compat-openssl10 openssl-devel
git clone https://github.com/svg-net/SVG.git
cd SVG/Samples/SvgConsole/
sudo dnf dotnet dotnet-sdk-5.0
dotnet publish -f netcoreapp3.1 -c Release -r linux-x64 -o SvgConsole-linux-x64-netcoreapp3.1

Output of last line

Microsoft (R)-Build-Engine, Version 16.8.3+39993bd9d für .NET
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

  Determining projects to restore...
  All projects are up-to-date for restore.
  Svg.Generators -> /home/jokalliau/Dokumente/GitDesktop/SVG/Generators/bin/Release/netstandard2.0/Svg.Generators.dll
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018: Unerwarteter Fehler bei der Nerdbank.GitVersioning.Tasks.GetBuildVersion-Aufgabe.
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:  ---> System.DllNotFoundException: Unable to load shared library '/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/MSBuildCore/../runtimes/linux-x64/native/libgit2-106a5f2.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libssl.so.1.0.0: cannot open shared object file: No such file or directory
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Runtime.InteropServices.NativeLibrary.LoadFromPath(String libraryName, Boolean throwOnError)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Runtime.InteropServices.NativeLibrary.Load(String libraryPath) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.cs:line 44
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs:line 401
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.GitLoaderContext.LoadUnmanagedDll(String unmanagedDllName)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext) in /_/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs:line 117
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.NativeMethods..cctor()
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    --- End of inner exception stack trace ---
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.NativeMethods.git_libgit2_opts(Int32 option, UInt32 level, String path)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.Proxy.git_libgit2_opts_set_search_path(ConfigurationLevel level, String path)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.GlobalSettings.SetConfigSearchPaths(ConfigurationLevel level, String[] paths)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.GitExtensions.OpenGitRepo(String pathUnderGitRepo, Boolean useDefaultConfigSearchPaths)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.VersionOracle.Create(String projectDirectory, String gitRepoDirectory, ICloudBuild cloudBuild, Nullable`1 overrideBuildNumberOffset, String projectPathRelativeToGitRepoRoot)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.Tasks.GetBuildVersion.ExecuteInner()

Used Versions

dotnet-5.0.103-1.fc33.x86_64

dotnet --info
.NET SDK (gemäß "global.json"):
 Version:   5.0.103
 Commit:    72dec52dbd

Laufzeitumgebung:
 OS Name:     fedora
 OS Version:  33
 OS Platform: Linux
 RID:         fedora.33-x64
 Base Path:   /usr/lib64/dotnet/sdk/5.0.103/

Host (useful for support):
  Version: 5.0.3
  Commit:  c636bbdc8a

.NET SDKs installed:
  5.0.103 [/usr/lib64/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.3 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.3 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
mrbean-bremen commented 3 years ago

Looks like the needed libgit2 is not installed on that Fedora version. I have no experience with Fedora, and currently we only have CI tests on Windows. so I'm not sure how to proceed with this one.

mrbean-bremen commented 3 years ago

There's also an issue that may be related, which is fixed in the (yet unrleased) version 3.4 of Nerdbank.GitVersioning.

JoKalliauer commented 3 years ago

Looks like the needed libgit2 is not installed on that Fedora version. I have no experience with Fedora, and currently we only have CI tests on Windows. so I'm not sure how to proceed with this one.

As expained in the first line of my origial post I had installed libgit2 libgit2-devel.

I now also installed libgit2-glib golang-github-libgit2* sudo dnf install libgit2 libgit2-devel libgit2-glib golang-github-libgit2* compat-openssl10 openssl-devel dotnet dotnet-sdk-5.0 returns:

Letzte Prüfung auf abgelaufene Metadaten: vor 0:02:21 am Sa 27 Mär 2021 07:31:12.
Das Paket libgit2-1.0.1-3.fc33.x86_64 ist bereits installiert.
Das Paket libgit2-devel-1.0.1-3.fc33.x86_64 ist bereits installiert.
Das Paket libgit2-glib-0.99.0.1-5.fc33.x86_64 ist bereits installiert.
Das Paket golang-github-libgit2-git2go-devel-30.0.5-1.fc33.noarch ist bereits installiert.
Das Paket compat-openssl10-1:1.0.2o-11.fc33.x86_64 ist bereits installiert.
Das Paket openssl-devel-1:1.1.1j-1.fc33.x86_64 ist bereits installiert.
Das Paket dotnet-5.0.104-1.fc33.x86_64 ist bereits installiert.
Das Paket dotnet-sdk-5.0-5.0.104-1.fc33.x86_64 ist bereits installiert.
Abhängigkeiten sind aufgelöst.
Nichts zu tun.
Fertig.
sudo dnf install libgit2 libgit2-devel libgit2-glib golang-github-libgit2* compat-openssl10 openssl-devel dotnet dotnet-sdk-5.0
cd /home/jokalliau/Dokumente/GitDesktop

git clone https://github.com/svg-net/SVG.git
cd SVG/
git config pull.ff only
git pull
cd Samples/SvgConsole/
dotnet publish -f netcoreapp3.1 -c Release -r linux-x64 -o SvgConsole-linux-x64-netcoreapp3.1
The output of the last line returns
Willkommen bei .NET 5.0!
---------------------
SDK-Version: 5.0.104

----------------
Ein ASP.NET Core-HTTPS-Entwicklungszertifikat wurde installiert.
Um das Zertifikat als vertrauenswürdig einzustufen, führen Sie "dotnet dev-certs https --trust" aus (nur Windows und macOS).
Weitere Informationen zu HTTPS: https://aka.ms/dotnet-HTTPS
----------------
Schreiben Sie Ihre erste App: https://aka.ms/dotnet-hello-world
Neuigkeiten: https://aka.ms/dotnet-whats-new
Dokumentation: https://aka.ms/dotnet-docs
Probleme melden und Quelle in GitHub suchen: https://github.com/dotnet/core
Verwenden Sie "dotnet --help", um verfügbare Befehle anzuzeigen, oder besuchen Sie https://aka.ms/dotnet-cli.
--------------------------------------------------------------------------------------
Microsoft (R)-Build-Engine, Version 16.8.3+39993bd9d für .NET
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

  Determining projects to restore...
  Restored /home/jokalliau/Dokumente/GitDesktop/SVG/Generators/Svg.Generators.csproj (in 788 ms).
  Restored /home/jokalliau/Dokumente/GitDesktop/SVG/Source/Svg.csproj (in 1,26 sec).
  Restored /home/jokalliau/Dokumente/GitDesktop/SVG/Samples/SvgConsole/SvgConsole.csproj (in 20,12 sec).
  Svg.Generators -> /home/jokalliau/Dokumente/GitDesktop/SVG/Generators/bin/Release/netstandard2.0/Svg.Generators.dll
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018: Unerwarteter Fehler bei der Nerdbank.GitVersioning.Tasks.GetBuildVersion-Aufgabe.
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:  ---> System.DllNotFoundException: Unable to load shared library '/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/MSBuildCore/../runtimes/linux-x64/native/libgit2-106a5f2.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libssl.so.1.0.0: cannot open shared object file: No such file or directory
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Runtime.InteropServices.NativeLibrary.LoadFromPath(String libraryName, Boolean throwOnError)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Runtime.InteropServices.NativeLibrary.Load(String libraryPath) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.cs:line 44
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs:line 401
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.GitLoaderContext.LoadUnmanagedDll(String unmanagedDllName)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext) in /_/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs:line 117
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.NativeMethods..cctor()
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    --- End of inner exception stack trace ---
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.NativeMethods.git_libgit2_opts(Int32 option, UInt32 level, String path)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.Core.Proxy.git_libgit2_opts_set_search_path(ConfigurationLevel level, String path)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at LibGit2Sharp.GlobalSettings.SetConfigSearchPaths(ConfigurationLevel level, String[] paths)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.GitExtensions.OpenGitRepo(String pathUnderGitRepo, Boolean useDefaultConfigSearchPaths)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.VersionOracle.Create(String projectDirectory, String gitRepoDirectory, ICloudBuild cloudBuild, Nullable`1 overrideBuildNumberOffset, String projectPathRelativeToGitRepoRoot)
/home/jokalliau/.nuget/packages/nerdbank.gitversioning/3.3.37/build/Nerdbank.GitVersioning.Inner.targets(17,5): error MSB4018:    at Nerdbank.GitVersioning.Tasks.GetBuildVersion.ExecuteInner()

There's also an issue that may be related, which is fixed in the (yet unrleased) version 3.4 of Nerdbank.GitVersioning.

I don't know how to install 3.4, see https://github.com/dotnet/Nerdbank.GitVersioning/issues/571 .

mrbean-bremen commented 3 years ago

Sorry, completely missed that you installed libgit2 - reading helps... As I said, I don't know Fedora and don't have an opportunity to test it, was just hoping someone else steps up. About GitVersioning - I'm not sure if the new version would help. The issue may or may not be related (the error looks a bit different), but as soon as they release 3.4, we can try to switch to it.