-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Tests are failing on AlpineLinux #792
Comments
Again a problem linked to musl? See openzim/libzim#671 |
The test
|
@veloman-yunkan Can we make a proper/dedicated test to secure ICU data are OK? |
The setup process in the
Full ICU data can be installed with
whereupon the tests pass |
Yes though with some approximation (for example it will only check that the self-name of |
@veloman-yunkan There is no API in libicu to directly know with which dataset it is loaded? My goal to close this ticket is that we have a test which provides a clearer error message. |
@kelson42 I am not an expert in ICU but I think that the library is dataset agnostic. I think it can be configured to load multiple data files from different locations. What matters is the content of the loaded data. |
Thanks for your help, installing |
@kelson42 Can we close this issue? Or you would like to have the proposed unit test added? |
@veloman-yunkan I would indeed like to have a test clearly stating that the libicu data is missing (if this is the case). |
@kelson42 ICU documentation at the following links corroborates my earlier assessment that satisfying your requirement in a general way would be quite complex. Below information is intended to document approaches that I tried (since I feel now that I will end up with a check that focuses only on the specific manifestation of missing ICU data that caused the unit test failure in this ticket). The following simple heuristics failed: TEST(stringTools, ICU)
{
int32_t icuLocaleCount = 0;
icu::Locale::getAvailableLocales(icuLocaleCount);
// NOTE: 797 is the number of locales included in the icu-data-full (71.1-r2)
// NOTE: package under alpine
ASSERT_GE(icuLocaleCount, 797);
} Above code worked on apline (using the system provided icu package) but failed in my build environment ( TEST(stringTools, ICU)
{
int32_t icuISOLanguageCount = 0;
for (const auto* p = icu::Locale::getISOLanguages(); *p != NULL; ++p) {
++icuISOLanguageCount;
}
// NOTE: 593 is the number of languages included in icu4c v58.2 (which is
// NOTE: the current version of ICU used by kiwix-build)
ASSERT_GE(icuISOLanguageCount, 593);
} Above version passes both under alpine and my build environment. The problem was that the unit test also passed under alpine when the |
Please note that we patch ICU to remove some data we don't want kiwix/kiwix-build@fbb84e9 and associated pr kiwix/kiwix-build#44. |
Libicu data can be quite big. If you have them in a multiarch package, the problem is even worse. Consider then a low-end mobile device/bandwith... like Android... then the problem is obvious. This is why it has been requested to limit the data to the strict minimun necessary. I think, we had an empirical approach to decide what to keep. |
@veloman-yunkan OK, so you suggest we close this ticket and don't do any further improvement? |
@kelson42 Yes |
I'm trying to upgrade to 11.0.0 on AlpineLinux (Musl-libc) but there is one test failing:
Full error log : testlog.txt
This issue wasn't on last release 10.1.1
How to reproduce
Create the following Dockerfile
Run
docker build -t kiwix-lib-test . && docker run --rm -it kiwix-lib-test ninja -C build meson-test
The text was updated successfully, but these errors were encountered: