-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Cross-compile kiwix-tools on MIPS #48
Comments
I invested some time into this, but its far from finished (read: compilation results untested)
Current overall state of cross_compiling to mips using the patch below is of limited use for production routers:
(Alternatively use buildroot.org and compile kiwixbuild with target native_* within a mips chroot; the compiler is then a mips-native one and thus has nothing to do with the cross-compilation approach followed below. After all, this ticket is about getting cross-compilation to work.) EDIT 2018-06-17:
EDIT 2018-06-19:
|
@cm8 Thank you very much. I hope we will be able to merge this first steps to allow further ones to finally have a fully support in our toolchain. Please join #kiwix on Freenode if you want to chat about that. |
I reworked my first comment on this issue with (hopefully) less ambiguous doc and an updated patch version (that is now also linked in case someone prefers that over copy+pasting the syntax highlighted version). Personally I dislike nagging anyone for help. If this sparks some interest to further work and improve the mips target flavor, then that's what this issue is for. Share freely, not as a burden. @kelson42 Have you tried the patch? Have you read the comment? Is there room for misinterpretation (if yes where and how could it be improved)? Where you able to reproduce the compilation with the sketched outline? Answers to these questions help to advance on the issue, imho. |
There is another, minor issue in that the libdir name is wrong, i.e. |
Wow, this is a long comment and a lot of thing in it. It is nice to see it. I haven't tested the patch but here some first comments :
It seems that it could even be an issue for meson. The solution proposed in SO is general enough to be integrated in the build system itself instead of in each meson.build project. Especially when meson claims to handle everything about thread libraries (http://mesonbuild.com/Threads.html, http://mesonbuild.com/FAQ.html#what-is-the-correct-way-to-use-threads-such-as-pthreads)
Yes, since now we always have little endian arch so the problem doesn't occur and I avoid it :)
Yes, the
Nice catch. You are right, the detected lib dir is the one of the build platform, not the host one. As you said, it is not related to mips. However it would not be so easy to fix. Even for native compilation (and so same arch), the libdir may change depending of the distribution ( Hope it helps. |
The icu4c patch bits were altered.
It should be in good enough shape to be added to the repo, but some of the bespoken problems remain:
It would be nice if someone actually tested/checked that other platforms still compile ident, before commiting. While I'd think it should be ok, I've not tested this assumption. |
I'd like to push this to master in a couple of weeks if noone has objections or finds side effects affecting other platforms, unless you absolutely want this in an extra branch first, that is. Pushing it to master may lead to other people creating issues about its unfinished state, but that way we will find out for sure, whats still needed to support mips, I guess. Again, peer tests, improvements and comments here are welcome. |
@cm8 It's of course up to you to decide how you want to proceed, but in general I push for the step-by-step approach - so it is not a problem to merge piece by piece what is necessary to get MIPS working properly - to the contrary. The continuous integration should catch any problem with other architectures anyway before merging. |
The target mips32r2_dyn is tested to fully compile, but untested to run. Target mips32r2_static reaches kiwix-lib and fails linking pthread. For further details see the comments in #48. Some known problems: * hardcoded values of icudt58l in some dependent packages unnoticable during compile, but will affect runtimes * the libdir name problem x86_64-linux-gnu <> mips-linux-gnu * pthread linking problem when compiling kiwix-lib statically may be a meson issue, since it somewhat claims to properly handle pthread linking in cross-compile situations; there are some url links in #48 laying out a proper workaround.
@cm8 thx for your commit/branch, feel free to make a PR and assign it to @mgautierfr whenever you think this is the right moment. |
@cm8 @mgautierfr is currently extremely busy with other stuff. Thank your patience. |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
This is to get kiwix-serve working on most OpenWRT devices
The text was updated successfully, but these errors were encountered: