Skip to content
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

This is to fix running on Ubuntu 22x #1250

Merged
merged 2 commits into from
May 26, 2023
Merged

This is to fix running on Ubuntu 22x #1250

merged 2 commits into from
May 26, 2023

Conversation

johnml1135
Copy link
Contributor

@johnml1135 johnml1135 commented May 24, 2023

This work is untested


This change is Reviewable

@johnml1135
Copy link
Contributor Author

I came across this when developing docker images for machine.py which uses SIL.WritingSystems. It will not initialize in Ubuntu 22 containers.

The error was:

machine-engine-cntr   |       System.DllNotFoundException: Unable to load shared library 'libdl.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl.so: cannot open shared object file: No such file or directory
machine-engine-cntr   |          at Icu.NativeMethods.dlopen(String file, Int32 mode)
machine-engine-cntr   |          at Icu.NativeMethods.GetIcuLibHandle(String basename, Int32 icuVersion)
machine-engine-cntr   |          at Icu.NativeMethods.LoadIcuLibrary(String libraryName)
machine-engine-cntr   |          at Icu.NativeMethods.get_IcuCommonLibHandle()
machine-engine-cntr   |          at Icu.NativeMethods.u_getUnicodeVersion(VersionInfo& versionArray)
machine-engine-cntr   |          at Icu.Wrapper.get_UnicodeVersion()
machine-engine-cntr   |          at SIL.WritingSystems.Sldr.InitializeGetUnicodeCategoryBasedOnIcu()
machine-engine-cntr   |          at SIL.WritingSystems.Sldr.Initialize(Boolean offlineMode, String sldrCachePath, DateTime embeddedAllTagsTime)
machine-engine-cntr   |          at SIL.WritingSystems.Sldr.Initialize(Boolean offlineMode, String sldrCachePath)
machine-engine-cntr   |          at SIL.WritingSystems.Sldr.Initialize(Boolean offlineMode)
machine-engine-cntr   |          at SIL.Machine.AspNetCore.Services.ClearMLService..ctor(HttpClient httpClient, IOptionsMonitor`1 options, ILogger`1 logger, IClearMLAuthenticationService clearMLAuthService) in /home/johnml1135/repos/machine/src/SIL.Machine.AspNetCore/Services/ClearMLService.cs:line 29

@lyonsil
Copy link

lyonsil commented May 24, 2023

In ICU.net, this was fixed between version 2.8.1 and 2.9.0 to make the icu.net.dll.config file work properly. The solution that ICU.net took will work on Macs, too, so it is something to consider if support beyond Linux is needed.

@ermshiperete
Copy link
Member

I came across this when developing docker images for machine.py which uses SIL.WritingSystems. It will not initialize in Ubuntu 22 containers.

That's a slightly different error which won't be fixed by this PR. The most likely reason is that the icu.net.dll.config file is missing which needs to exist next to icu.net.dll. And if you're running .NET Core 3.x or .NET 5+ you'll need icu.net 2.9+.

Copy link
Member

@ermshiperete ermshiperete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but can you please add a line to CHANGELOG.md? Thanks!

@johnml1135
Copy link
Contributor Author

Added comment to changelog - I believe in the right format.

@ermshiperete ermshiperete merged commit c9c5fde into sillsdev:master May 26, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants