Support Ubuntu 20.04 (Focal)
gitfool opened this issue · 4 comments
Not sure if this is related to #1585, so creating a separate issue.
See Cake.Dungeon Docker build where I'm doing a Cake build in a Docker container based on Ubuntu 20.04 (Focal) using the .NET Core 3.1 SDK nightly preview (Dockerfile). The build fails with error:
System.DllNotFoundException: Unable to load shared library 'git2-106a5f2' or one of its dependencies...
I'm using GitVersion 5.1.3, which is already using the latest LibGit2Sharp libraries AFAICT.
I can see that this is related to OpenSSL version.
Since Ubuntu Eoan the OpenSSL 1.0 was taken out from the repository in favour of OpenSSL 1.1.
$ ldd bin/Debug/netcoreapp3.1/runtimes/linux-x64/native/libgit2-106a5f2.so
linux-vdso.so.1 (0x00007ffdcbfc0000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5937950000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f593792d000)
libssl.so.1.0.0 => not found
libcrypto.so.1.0.0 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f593773c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5937ca2000)
@gitfool It looks like #1714 solves this issue. It is included in 0.27-preview
releases in NuGet.
Nope. It is not. Publishing packages still bundles wrong library - linked against OpenSSL 1.0 instead of 1.1 if target is linux-x64
.
The solution is to target Ubuntu bionic runtime: dotnet publish -r ubuntu.18.04-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true
Any change that this bug will be fixed soon? Github will move their default linux agents to Ubuntu 20.04 which means that a lot of people will get breaking builds soon.
libssl is no longer a dependency for the LibGit2Sharp builds, thanks to #1618. Upgrading to the latest nuget package will fix this. https://www.nuget.org/packages/LibGit2Sharp/0.27.0-preview-0096