-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 4.08beta2 fails to link on NetBSD/arm64 #8567
Comments
This may be related to the recent alignment-fix #8557 , which was merged in trunk but not, I think, in the 4.08 release branch (and wouldn't be in beta2 anyway). Would you mind trying to build the |
Is this happening because |
I can confirm that trunk, with the same patches and configure options, builds for me.
|
@mshinwell is right, the wrong instructions are used to access I have been unable to force the Linux linker to do the 4 mod 8 placement, but apparently the NetBSD one can do it. The fix #8557 changes the placement of global data, so it can hide the problem, but is not a proper fix. |
`caml_backtrace_active` is declared with type `int32_t`, so it is incorrect to access it with a 64-bit "ldr" instruction. Either a link-time error occurs, as in issue ocaml#8567, or the wrong value may be loaded. This commit uses `ldrsh` instructions (32-bit signed loads) to access `caml_backtrace_active`. Closes: ocaml#8567
Proposed fix: #8569 |
`caml_backtrace_active` is declared with type `int32_t`, so it is incorrect to access it with a 64-bit "ldr" instruction. Either a link-time error occurs, as in issue #8567, or the wrong value may be loaded. This commit uses `ldrsw` instructions (32-bit signed loads) to access `caml_backtrace_active`. Closes: #8567
When compiling OCaml 4.08beta2 on a Pinebook running NetBSD (arm64 architecture), it fails with the following error message:
I'm using the package available at https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=tree;f=ocaml which adds a few local patches, but nothing that I can see would cause this. It does patch configure to recognise NetBSD/aarch64 as an arm64 architecture that has dynamic linking.
Ocaml 4.07 compiles fine with a similar patch.
I've seen issue #6283 - but that seems to occur in a different part in the tree, and I've checked that the changes applied in that issue are still there.
The text was updated successfully, but these errors were encountered: