-
Notifications
You must be signed in to change notification settings - Fork 1.1k
donnet 3.1 seems broken on last openSUSE Tumbleweed #25069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Thank you for the report. @janvorli, @tarekgh, some distros have upgraded their ICU package. Would it be feasible to backport this change dotnet/runtime@829baa4 to 3.1 (https://github.com/dotnet/coreclr/blob/master/src/corefx/System.Globalization.Native/pal_icushim.c#L60)? 3.1 is supported until December 3, 2022. |
@Gankov looking at the page https://software.opensuse.org/package/icu I am seeing openSUSE is using ICU version .NET Core |
@am11 we may consider the fix porting if the openSUSE is using ICU version |
It looks like the ICU 7.1 package is also available in their repository https://software.opensuse.org/package/libicu71. |
I use openSUSE Tumbleweed. This is rolling distro with last packages. On your link can see that Tumbleweed have 71 version.
I will can try NET6, I use Core 3.1 because i tred use NET5 year ago, but after installed NET5 broked build Net Framework projects on linux, we can't full migrate to dotnet yet, because we use some legacy code, we work it. |
Thanks for the info. Is it possible to use a different ICU version there? I mean downgrade the ICU version. This should work around the issue you are running into.
I would suggest start the migration to .NET 6.0 as we are getting closer to the retirement date of 3.1. |
For openSUSE Tumbleweed have not simple way to downgrade the ICU version. I tried it, but now there is only icu 71 in official repository. I tried install from three party repository, but some system packages have dependence on 71. :( |
@Gankov would setting the |
Yes, it works for me. Thanks. |
Closing the issue as the workaround worked fine. |
I have both 3.1 and 6.0 installed. Building and running projects that target
Using the workaround
|
@tonibgd I have installed OpenSUSE tumbleweed on WSL and installed .NET 6.0 using the instructions mentioned in https://docs.microsoft.com/en-us/dotnet/core/install/linux-opensuse. Then I created a simple console application, and it runs fine.
here is the code I used to dump these values: Console.WriteLine($"OSDescription: {RuntimeInformation.OSDescription}");
Console.WriteLine($"FrameworkDescription: {RuntimeInformation.FrameworkDescription}");
#if NET5_0_OR_GREATER
Console.WriteLine($"RuntimeIdentifier: {RuntimeInformation.RuntimeIdentifier}");
#endif // NET5_0_OR_GREATER
Console.WriteLine($"{Environment.Version}");
try
{
foreach (ProcessModule module in Process.GetCurrentProcess().Modules)
{
if (module.FileName!.IndexOf("icu", StringComparison.OrdinalIgnoreCase) >= 0)
Console.WriteLine($".... {module.FileName}: {module.FileVersionInfo.FileVersion}");
}
Type? interopGlobalization = Type.GetType("Interop+Globalization, System.Private.CoreLib");
if (interopGlobalization != null)
{
MethodInfo? methodInfo = interopGlobalization.GetMethod("GetICUVersion", BindingFlags.NonPublic | BindingFlags.Static);
if (methodInfo != null)
{
int version = (int)methodInfo.Invoke(null, null)!;
Console.WriteLine($".... ICU Version: {new Version(version >> 24, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF)}");
}
}
Console.WriteLine($".... UseNls: {typeof(object).Assembly.GetType("System.Globalization.GlobalizationMode")!.GetProperty("UseNls", BindingFlags.Static | BindingFlags.NonPublic)!.GetValue(null)} ....");
Console.WriteLine($".... Invariant: {typeof(object).Assembly.GetType("System.Globalization.GlobalizationMode")!.GetProperty("Invariant", BindingFlags.Static | BindingFlags.NonPublic)!.GetValue(null)} ....");
Console.WriteLine($".... PredefinedCulturesOnly: {typeof(object).Assembly.GetType("System.Globalization.GlobalizationMode")!.GetProperty("PredefinedCulturesOnly", BindingFlags.Static | BindingFlags.NonPublic)!.GetValue(null)} ....");
}
catch
{
Console.WriteLine($".... UseNls: Couldn't Evaluate it ....");
} The only difference I guess is I am using 6.0.6 but I don't think this can cause the loading ICU work. Looks to me there is something wrong somehow in your environment. |
@tarekgh I think I narrowed it down to
|
What do you mean by that? Do you mean referencing this package causing the problem? I don't think we officially support .NET on Manjaro. |
Yes, referencing the package causes the build to fail, here is the full stack trace:
|
I am seeing in your stack |
Thanks for looking into it, it appears I need I will be using Edit: |
Describe the bug
After last OS update dotnet broken. It always show error:
Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
Perhaps, it cause icu was update from 70 version to 71 version. Maybe this is bug in icu package of openSUSE, but i don't know why dotnet cant't find icu, and how check that icu is broken. In OS, icu packages are installed.
When i load to snapshot before update icu to 71, dotnet works.
To Reproduce
1 - install dotnet-sdk on last openSUSE Tumbleweed
2 - try use any dotnet commands
Exceptions (if any)
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
at System.Globalization.GlobalizationMode..cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.CultureInfo..cctor()
at System.String.ToUpperInvariant()
at System.Diagnostics.Tracing.EventSource.GetGuid(System.Type)
at System.Diagnostics.Tracing.EventSource..ctor(System.Diagnostics.Tracing.EventSourceSettings, System.String[])
at System.Diagnostics.Tracing.EventSource..ctor()
at Microsoft.Build.Eventing.MSBuildEventSource..cctor()
at Microsoft.Build.CommandLine.MSBuildApp.Execute(System.String[])
at Microsoft.Build.CommandLine.MSBuildApp.Main(System.String[])
Further technical details
dotnet --info
~> dotnet --info
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
at System.Globalization.GlobalizationMode..cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.CultureInfo..cctor()
at System.String.ToLowerInvariant()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetArch()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment..cctor()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath()
at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization()
at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit()
at Microsoft.DotNet.Cli.Program.Main(System.String[])
fish: Job 1, 'dotnet --info' terminated by signal SIGABRT (Abort)
The text was updated successfully, but these errors were encountered: