2.2.10 fails on Ubuntu 16 and 18
See original GitHub issueGah! if it’s not one failure it’s another. Now 2.2.10, which fixed the dotnet build
failure (but apparently only on Windows) fails on Ubuntu 16 and 18 with this:
Repro steps
On a Linux machine (or Linux on Windows) such as Ubuntu 16, 18, or Linux Mint 19:
git clone https://github.com/aarnott/nerdbank.streams
cd nerdbank.streams/src/Nerdbank.Streams
git checkout fixLinuxBuild2
LD_DEBUG=versions dotnet build
The output is long, but includes this error:
2512: /usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.3/System.Globalization.Native.so: error: symbol lookup error: undefined symbol: GlobalizationNative_ToAsciiW (fatal)
2512: /usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.3/System.Globalization.Native.so: error: symbol lookup error: undefined symbol: GlobalizationNative_GetSortKeyW (fatal)
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: The "Nerdbank.GitVersioning.Tasks.GetBuildVersion" task failed unexpectedly. [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,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 [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods.git_libgit2_init() [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods.LoadNativeLibrary() [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods..cctor() [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: --- End of inner exception stack trace --- [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods.git_libgit2_opts(Int32 option, UInt32 level, String path) [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: at LibGit2Sharp.GlobalSettings.SetConfigSearchPaths(ConfigurationLevel level, String[] paths) [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: at Nerdbank.GitVersioning.GitExtensions.OpenGitRepo(String pathUnderGitRepo) [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: at Nerdbank.GitVersioning.VersionOracle.Create(String projectDirectory, String gitRepoDirectory, ICloudBuild cloudBuild, Nullable`1 overrideBuildNumberOffset, String projectPathRelativeToGitRepoRoot) [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
/home/andrew/.nuget/packages/nerdbank.gitversioning/2.2.10/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: at Nerdbank.GitVersioning.Tasks.GetBuildVersion.ExecuteInner() [/home/andrew/git/nerdbank.streams/src/Nerdbank.Streams/Nerdbank.Streams.csproj]
Issue Analytics
- State:
- Created 5 years ago
- Comments:35
Top Results From Across the Web
No internet after upgrade from 16.04 to 18.04
I solved a connection failure after an upgrade by using a wireless connection using a USB-attached network adapter, then changing to the ...
Read more >Installing Ruby 2.3.x on Ubuntu 18.04 is causing an error ...
Installing Ruby 2.3. x on Ubuntu 18.04 is causing an error by the end of the installation process - Stack Overflow.
Read more >Ubuntu 18.04 to 20.04 - Unresolved issue occured while ...
I'm trying to upgrade my Ubuntu distro from 18.04 LTS to 20.04 LTS and I get this error message while it's calculating data,....
Read more >14.04 to 16.04 failed upgrade stuck with massive ...
To cut a very very long arduous journey of a story short I have a failed 14.04 upgrade to 16.04 due to hardware...
Read more >How can I install Apache with a specific version?
The only version that shows for me is 2.4 on Ubuntu 16. This is a big problem because 2.4 has known issues that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Interesting. I wonder if this is a similar issue to what using
UniqueId.UniqueIdentifier
as theMarshalCookie
is intending to solve: https://github.com/libgit2/libgit2sharp/blob/master/LibGit2Sharp/Core/NativeMethods.cs#L100I’d have to track down the original issues, but IIRC that was added to work around a custom marshaling bug when two different versions of LibGit2Sharp were loaded.
In this case, you’ve still got two different copies of the assembly loaded, but they share the same
MarshalCookie
, so things are getting messed up.Yeah, I really wish it worked properly on linux as well, because then I’d be able to finish https://github.com/libgit2/libgit2sharp/pull/1571 and handle all of this internally for you.