Bug 250408

Summary: lang/ocaml - update to 4.11.1
Product: Ports & Packages Reporter: break19
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: Open ---    
Severity: Affects Only Me CC: break19, danfe, fernape, greg, lbartoletti, madpilot, michipili, mikael
Priority: --- Flags: bugzilla: maintainer-feedback? (michipili)
break19: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://reviews.freebsd.org/D19318
Description Flags
patch1/2 for asm
break19: maintainer-approval?
patch 2/2 for asm
break19: maintainer-approval?
Makefile patch
ocaml411.patch - full patch (w/o powerpc)
ocaml411-extras.patch (camlp4/5, labltk, findlib) none

Description break19 2020-10-16 21:29:40 UTC
Created attachment 218814 [details]
patch1/2 for asm

Updating to the latest ocaml release seems to be fairly straightforward.

Hacked at the Makefile a bit to remove stuff that isn't needed for compiling at least on my system, as well as references to postscript documentation that does not exist.

Also modified the asm patch for clang11 and made it reflect the new file locations.
Comment 1 break19 2020-10-16 21:30:20 UTC
Created attachment 218815 [details]
patch 2/2 for asm
Comment 2 break19 2020-10-16 21:31:57 UTC
Created attachment 218816 [details]
Makefile patch

This is simply a diff for the port Makefile, showing what was changed there to allow it to compile and install on my amd64, 13-CURRENT
Comment 3 break19 2020-10-19 00:35:43 UTC
It appears I made an error when creating the patches, one of the .rodata should be 16, not 8.

However, it appears that ocaml has adding this on their end in trunk and will be in the next release. See this now-merged Pull Request: https://github.com/ocaml/ocaml/pull/9981
Comment 4 Fernando ApesteguĂ­a freebsd_committer 2020-10-19 14:25:54 UTC
^Triage: If there is a changelog or release notes URL available for this version, please add it to the URL field.

Comment 5 Greg V 2020-11-29 18:52:41 UTC
Do we even need to pass the AS=.. stuff anymore since https://github.com/ocaml/ocaml/pull/9437 landed?
Comment 6 Greg V 2020-11-29 21:58:30 UTC
Created attachment 220083 [details]
ocaml411.patch - full patch (w/o powerpc)

> Do we even need to pass the AS=.. stuff anymore

So we don't, at least on amd64 and aarch64.


Here's a more complete version of the patch (not just makefile) with extra fixes.

- remove all BROKEN, aarch64 works with native codegen now, the others should be fine with just the interpreter
- remove X11 option, the graphics library is not bundled with OCaml anymore since 4.09!
- change '-no-pthread' to '--disable-systhreads', adjust other things for new configure
  - wait, why do we even support building without threads?
- drop spacetime profiler, it will be gone in 4.12 https://github.com/ocaml/ocaml/pull/9948 and we've had some *weird* stuff around it in the port (defined(NO_PROFILE) || ${ARCH:Mpowerpc} || ${ARCH:Mamd64} ---- what? it's actually *only* for amd64 but amd64 is excluded? also the TMPPLIST thing in post-install??)
- unfortunately I've had to drop all the powerpc64 patches as they don't apply anymore (mostly because of directory renames, also because lots of non-FreeBSD-specific powerpc64 stuff has landed upstream already)

Can the powerpc64 crowd please upstream whatever patches are still necessary?? (Probably mostly just the configure script?)
Comment 7 Greg V 2020-12-05 11:07:28 UTC
Created attachment 220275 [details]
ocaml411-extras.patch (camlp4/5, labltk, findlib)

Corresponding updates for devel/ocaml-camlp4, devel/ocaml-camlp5, devel/ocaml-findlib, x11-toolkits/ocaml-labltk
Comment 8 Mikael Urankar freebsd_committer 2020-12-06 10:13:51 UTC
@danfe: are you still working on it?
Comment 9 Alexey Dokuchaev freebsd_committer 2020-12-07 04:09:21 UTC
(In reply to Mikael Urankar from comment #8)
Yes, I am.  Regardless of the exact upgrade path (up to the latest version or via 4.07 as I've originally planned), it's not as simple as updating the port on its own, and might also require an exp-run.  Current patch also suggests --disable-force-safe-string which I'd like to avoid as well.