Closed karuboniru closed 4 years ago
So one of the issue here is that libime-data should not be noarch, it generates different binary data on big endian and little endian arch. kenlm data will be loaded via mmap so we can't simply generate same binary data on different be and le platform.
Still yet to confirm if other part (e.g. datrie) data has the same endianess problem.
Yes, those data files have different checksums, by merging libime-data into libime, the failure goes away!
Thanks for your help!
Leave it open until all the endian and arch issue is fully investigated.
Right now we have following observations:
Right now we have following observations:
- different data being generated on different arch, possibly related to loss of precision in float arithmetic.
Didn't notice that problem, take /usr/share/libime/zh_CN.lm
for example, build on
generates exact checksum, and different than that of s390x. Those are all fedora koji supported arches. Seems that is only endian related.
- big endian's data may have more problem (invalid when load) as shown by build log.
So, those data that is loaded by mmap should be considered as arch (or endian) specific? Use big endian's data to build on s390x reported no problem. (see build log)
While it will be hard to debug arch specific things, since it not easy to get a, for example, s390x machine to see if this is really working.
- arch dependent data should be moved to /usr/lib instead of /use/share.
Yes, this is trivial to fix and it is good to compliance to FHS. 👍
The fix to kenlm upstream: https://github.com/kpu/kenlm/pull/293 Other than that data seems to be ok now.
Work items remaining: Move lm data to usr/lib, but datrie part can be remain same . Though due to the float computation, the data generated might be different due to the float point calculation or hash difference on different platform, but the data itself remain valid and can be used on different endian platform.
fixed by af7337c
fcitx5-chinese-addons build fails on fedora koji due to a test error, the build log can be found here.
This seems to be happening also on Debian build.