Created attachment 255843 [details] 0001-textproc-sexp-fix-build-on-non-x86.patch Hi, The attached patch allows textproc/sexp to build and run on aarch64. With this patch, textproc/sexp will start to work on armv7 as well only once lang/ocaml is switched over to using the hard-float abi (which I intent to submit next, but since that will require rev-bumping many ports, I'm hoping to bundle that change as part of a larger ocaml update). Thanks!
The ocaml change sounds interesting. I had tried to get it working on armv7 for a while, but do not understand enough about it to make it so.
Shall I merge this one into the quarterly branch?
(In reply to Robert Clausecker from comment #2) Not needed as textproc/sexp only exists in main, as far as I can tell. For the armv7 stuff, I'll try to get it ready before Q1 is branched.
Created attachment 255881 [details] sexp-0.17.0 build log on armv7 FreeBSD 14 Build fails on armv7, see attached log file. Build succeeds on arm64 though; do you wish to proceed with the patch?
(In reply to Robert Clausecker from comment #4) Hi, yes please you can proceeed with the patch. As noted above, that armv7 failure is unfortunately still expected. I'm hoping to fix that failure by producing a fix for lang/ocaml. In short, that failure is caused by the non-functionning floating-point support of the "native-mode" compiler of OCaml on armv7 on freebsd. This can be demonstrated by the following command, which will output a non-sensical value instead of the well-known answer: echo "print_float 42.0" > pf.ml ; ocamlopt pf.ml && ./a.out The longer and probably less accurate explanation is that sexp uses a ppx transformer to serialize-deserialize json, said transformer relies on a library which must know what is the range of integers that can safely be represented in a float (or maybe the oppositite?), and since the floating point support is broken, this determination of the safe-range triggers an assertion. I'm working on a patch for lang/ocaml to fix the armv7-a/VFPv3 support instead of using the soft-float abi (which, I assume, is non-working on freebsd), but although it seems to work okayish (at least to buil sexp), there is still a correctness issue exhibed by the ocaml test suite. I need more time to investigate. If that plan doesn't work (fixing lang/ocaml), then maybe it would be possible to use the bytecode mode of ocaml to work around this issue on armv7. In any case, it would be nice to already unlock textproc/sexp for aarch64 (and possibly ppc64?).
(In reply to Benjamin Jacobs from comment #5) Thanks. I will proceed with the patch as is. I was unsure if the armv7 breakage you mentioned and this one were related, so I wanted to ask to make sure it was expected.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=16187b44a7cd7a0db611a5fccc0d4a42293e95f5 commit 16187b44a7cd7a0db611a5fccc0d4a42293e95f5 Author: Benjamin Jacobs <freebsd@dev.thsi.be> AuthorDate: 2024-12-12 19:45:51 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2024-12-17 00:57:21 +0000 textproc/sexp: fix build on non-x86 PR: 283317 ...ndor_base-0.16.3_src_discover_discover.ml (new) | 12 ++++++++ ...ntrinsics-0.16.1_src_discover_discover.ml (new) | 32 ++++++++++++++++++++++ 2 files changed, 44 insertions(+)
Thank you for your contribution.
Thanks!