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
OCaml-uri doesn't compile on ARM with assembler error #7608
Comments
Comment author: @gasche There have been several fixes to ARM code generation in trunk (4.06.0+dev). Would it be reasonable to make sure that ocaml-uri and its various dependencies compile under the trunk to check if the problem goes away? I know it is work (I expect the ocaml-uri people or its users to do it), but it will have to be done before the 4.06 release anyway so it will not be lost. |
Comment author: SP Tried installing |
Comment author: @gasche We are going to make a beta release of 4.06.0 very soon. That will be a very good time to kindly ask the maintainers of uri's dependencies to test their build under 4.06 and release working versions, so that you can test yourself. If you manage to test uri before the release, and it is still broken (I believe it should now work), we can add the issue to the list of things to fix before the release. |
Comment author: @dbuenzli It seems the error persists in 4.06.0 |
Comment author: @gasche (I'm including here the information reported by github user 'alrev' in the downstream issue report.) The error was reproduced on Raspberry 2 and 3, and a Cubietruck machine. (armv7l-unknown-linux-gnueabihf). From the switch 4.06.0+beta1+default-unsafe-string, the failure can be reproduced by installing the development version of the dependencies: opam pin add ppx_core --dev-repo and then compiling the source of the project (this is the hash of the current master): https://github.com/mirage/ocaml-uri/archive/a0846a1def8abdade6578719f7236aae9445f2d4.tar.gz |
Comment author: @xavierleroy Any chance to have a self-contained repro case? Or just a copy of the problematic .s file? |
Comment author: @xavierleroy At last we got a copy of the bad .s file: https://github.com/mirage/ocaml-uri/files/1381922/camlasmbaf612.s_plus_err_and_env.zip Two overflows remain, on lines 52 and 73429, and correspond to The other "offset out of range" overflows do not occur on this version of the .s file. I think these overflows were fixed by commit 07b28ed in 4.06. The fix I'll propose soon is to stop using the Thumb-2 |
Comment author: @xavierleroy The fix I had in mind needs significant preliminary work:
I'm pushing this issue after release 4.06. In the meantime, the one package that has problems can be compiled with "ocamlopt -fno-thumb", or rewritten to avoid such huge functions. |
Comment author: @avsm
Uri 1.9.6 has now been released and rewritten to avoid such huge functions, so this isn't blocking us in opam land. https://discuss.ocaml.org/t/uri-1-9-6-available-with-improved-arm-support-and-build-times/1420 |
Comment author: @xavierleroy Great, that's a happy end for this story. In the meantime I looked into changing the ARM Thumb code generator to avoid the issue. It's less work than I thought (the "unified" syntax is already used!) but the TBH-free code is measurably slower. How much this performance degradation matters is not clear to me yet. I'll try to make better measurements and submit the whole thing as a GPR. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Original bug ID: 7608
Reporter: SP
Assigned to: @xavierleroy
Status: assigned (set by @xavierleroy on 2017-10-13T13:03:53Z)
Resolution: open
Priority: normal
Severity: minor
Platform: ARM
OS: Archlinux
Target version: 4.07.0+dev/beta2/rc1/rc2
Category: back end (clambda to assembly)
Monitored by: @gasche
Bug description
I have the following compilation error with another ARM chip.
A key part seems to be this:
Log file cropped to relevant section:
Related issue on ocaml-uri: mirage/ocaml-uri#106
Steps to reproduce
Build ocaml-uri on ARM.
The text was updated successfully, but these errors were encountered: