Page MenuHomeFreeBSD

lang/ocaml: Update to 4.07.1.
Needs ReviewPublic

Authored by rigoletto on Feb 24 2019, 6:58 AM.

Details

Reviewers
mat
tcberner
linimon
antoine
hrs
tobik
Group Reviewers
portmgr
Summary

PR 218333

  • update to 4.07.1[WIP]
  • return to the pool; the port is clearly abandoned

TODO:

  • update 35+ ocaml-* ports - HERE
  • test against an unkown number of ports; probably 100+

CONTRIBUTORS:

  • Mikaël Urankar <mikael.urankar@gmail.com>
Test Plan

The port build fine; however there are a bunch of errors and tons of warnings during the building process.

Upstream recomends GCC (not tested yet):

The GNU C Compiler (gcc) is recommended, as the bytecode interpreter takes advantage of GCC-specific features to enhance performance. gcc is the standard compiler under Linux, OS X, and many other systems.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23133
Build 22186: arc lint + arc unit

Event Timeline

rigoletto created this revision.Feb 24 2019, 6:58 AM
rigoletto edited the test plan for this revision. (Show Details)Feb 24 2019, 6:59 AM
rigoletto edited the summary of this revision. (Show Details)
rigoletto edited the test plan for this revision. (Show Details)Feb 24 2019, 7:08 AM
rigoletto added a reviewer: linimon.
tobik added a comment.Feb 24 2019, 3:43 PM

Thanks for trying to update lang/ocaml. Have you seen https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218333 ?

rigoletto added a comment.EditedFeb 24 2019, 4:19 PM

Thanks for trying to update lang/ocaml. Have you seen https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218333 ?

I had not but I saw that needs some update, inclusive to add a CAMLP5 variable (it is in the newest patch). But that is something I will probably need some help. ^^

[EDIT]
Oh, portmgr is already on it.

Thank you for pointing to it.

rigoletto edited the summary of this revision. (Show Details)Feb 24 2019, 4:20 PM
rigoletto updated this revision to Diff 54310.Feb 24 2019, 8:17 PM

Remove STRIP, OPTIONS_SUB - they aren't doing anything. Add OPTIONS subs to pkg-plist.

Building with GCC8 doesn't change the warnings and errors.

rigoletto updated this revision to Diff 54313.Feb 24 2019, 8:57 PM

Bring STRIP back. This is actually needed. ^^

pi added a subscriber: pi.Feb 24 2019, 9:08 PM
antoine requested changes to this revision.Feb 24 2019, 9:52 PM
antoine added a subscriber: antoine.

There is a PKGNAME collision between lang/ocaml and lang/ocaml-nox11

This revision now requires changes to proceed.Feb 24 2019, 9:52 PM
rigoletto updated this revision to Diff 54324.Feb 25 2019, 12:54 AM
  • fix ocaml-nox11 conflict - add CONFLICT_INSTALL
  • remove MAKE_JOBS_UNSAFE - this apparently is safe to do.
rigoletto updated this revision to Diff 54326.Feb 25 2019, 3:16 AM

Quick update of devel/ocaml-camlp4 to 4.07+1.

Harbormaster completed remote builds in B22705: Diff 54326.
rigoletto updated this revision to Diff 54434.EditedFeb 26 2019, 8:54 PM

Add patch brought by @mikael.urankar_gmail.com :

tested on armv6, armv7, aarch64, ppc64 (I put the glue code for powerpc but I can't test it).

As ARMv7 needs binutils I start wondering again if that would not be better to switch to GCC (as advised by upstream).

@linimon would you mind to test it on ARMs and POWERs with USE_GCC=yes?

Thank you. :-)

rigoletto edited the summary of this revision. (Show Details)Feb 26 2019, 8:58 PM
rigoletto updated this revision to Diff 54438.Feb 26 2019, 9:37 PM

Add the forgotten patch-configure patch. ^^

rigoletto updated this revision to Diff 54444.Feb 27 2019, 2:12 AM

Pet portlint.

rigoletto updated this revision to Diff 54508.Feb 27 2019, 11:33 PM

Add devel/ocaml-dune. This is the former jbuilder which will now be required by some ports needing update.

hrs added a comment.Feb 28 2019, 12:23 AM

-nox11 should be removed and converted by using FLAVOR.

I hate to say this but I highly recommend you to work on this using github or similar because the final version of the patchset will be too long to review. My last attempt to update OCaml and related software in PR 182918 involved 100 ports and >12000 lines in the diff delta. It is old but not completely obsolete. Especially please consider to adopt migration from Mk/bsd.ocaml.mk to Mk/Uses/ocaml.mk in the patchset or update bsd.ocaml.mk to include OCaml toolchains from the first place. Uses/ocaml.mk is to maintain consistency of build/runtime dependencies and to avoid manual addition of something like "BUILD_DEPENDS=ocamlbuild:devel/ocaml-ocamlbuild" into Makefile, which makes difficult to maintain the port.

In D19318#415205, @hrs wrote:

-nox11 should be removed and converted by using FLAVOR.
I hate to say this but I highly recommend you to work on this using github or similar because the final version of the patchset will be too long to review. My last attempt to update OCaml and related software in PR 182918 involved 100 ports and >12000 lines in the diff delta. It is old but not completely obsolete. Especially please consider to adopt migration from Mk/bsd.ocaml.mk to Mk/Uses/ocaml.mk in the patchset or update bsd.ocaml.mk to include OCaml toolchains from the first place. Uses/ocaml.mk is to maintain consistency of build/runtime dependencies and to avoid manual addition of something like "BUILD_DEPENDS=ocamlbuild:devel/ocaml-ocamlbuild" into Makefile, which makes difficult to maintain the port.

I was willing to do that using the new ocaml.mk but I wasn't sure how compatible the final version would be with the actual prototype, and so I decided to work using the old (to get the things working), and later move to the new Mk when thta was done. About moving to somewhere I was indeed thinking about the same.

Thank you.

rigoletto added a comment.EditedFeb 28 2019, 2:49 AM

I just have noticed it would possible to aquire OCaml with a BSD Style LICENSE paying a reasonable small fee (3.500€) to become part of the Caml Consortium.

rigoletto edited the summary of this revision. (Show Details)Feb 28 2019, 3:20 AM
rigoletto edited the summary of this revision. (Show Details)
rigoletto updated this revision to Diff 54515.Feb 28 2019, 3:26 AM

I've updated the revision summary to include the GitHub address I will be working with the OCaml ports[1].

I will keep updating OCaml itself in here from time-to-time since this is the main thing, and for better internal visibility.

Thank you.

[1] currently it was no changes over the FreeBSD official ports tree but I will move the present changes to there ASAP.

hrs added a comment.Feb 28 2019, 3:53 AM

I've updated the revision summary to include the GitHub address I will be working with the OCaml ports[1].
I will keep updating OCaml itself in here from time-to-time since this is the main thing, and for better internal visibility.
Thank you.
[1] currently it was no changes over the FreeBSD official ports tree but I will move the present changes to there ASAP.

Thank you. I will work on updating the old patchset in the PR to the latest ports tree and send pull requests to your github repo to avoid duplicate work if you do not mind it.

In D19318#415236, @hrs wrote:

I've updated the revision summary to include the GitHub address I will be working with the OCaml ports[1].
I will keep updating OCaml itself in here from time-to-time since this is the main thing, and for better internal visibility.
Thank you.
[1] currently it was no changes over the FreeBSD official ports tree but I will move the present changes to there ASAP.

Thank you. I will work on updating the old patchset in the PR to the latest ports tree and send pull requests to your github repo to avoid duplicate work if you do not mind it.

I've added you as collaborator. IDK how GitHub works on that but later I will look if I need to do anything more to give you write access.

rigoletto edited the summary of this revision. (Show Details)Mar 1 2019, 9:37 PM
This comment was removed by rigoletto.
rigoletto updated this revision to Diff 54602.Mar 1 2019, 11:07 PM

Save state.

mat added inline comments.Mar 2 2019, 11:14 AM
lang/ocaml/Makefile
32–33

CONFLICTS_INSTALL contains package names, these does not look like package names.

rigoletto updated this revision to Diff 54621.Mar 2 2019, 10:20 PM
rigoletto marked an inline comment as done.

Fix CONFLICTS_INSTALL and also remove post-configure: that wasn't affecting anything.

rigoletto updated this revision to Diff 54623.Mar 3 2019, 12:22 AM

Remove extra blank line.

rigoletto updated this revision to Diff 54648.Mar 3 2019, 5:49 PM
This comment was removed by rigoletto.

@mat

Several of ocaml-* ports have this license: LGPL[v2+] with linking exception. What would be the best way to handle them, just set

LICENSE=LGPL20+

or

LICENSE=LGPL20+
LICENSE_NAME=LGPL with linking exception

or other?

Thank you.

mat added a comment.Mar 12 2019, 7:45 PM

@mat
Several of ocaml-* ports have this license: LGPL[v2+] with linking exception. What would be the best way to handle them, just set

LICENSE=LGPL20+

or

LICENSE=LGPL20+
LICENSE_NAME=LGPL with linking exception

or other?
Thank you.

I have no idea what "LGPL with linking exception" changes from the normal "LGPL", I always thought the LGPL was the GPL with a linking exception.

mat added inline comments.Mar 12 2019, 7:58 PM
lang/ocaml/Makefile
65–68

You should probably add a DOCS_DISTFILES with the doc distfiles so that people who don't want the docs don't have to download them.

72–78

That is a bit strange to only set the X11 options helpers if you are not in the nox11 flavor (see the multiple negatives in there, FLAVOR:Mdefault would probably be more straightforward.) and then if you're in the nox11 case, you exclude the X11 option, but the X11 option does nothing as no helpers are defined, for example, -no-graph is never added to CONFIGURE_ARGS.

91

This should probably simply be do-test:.

In D19318#418720, @mat wrote:

I have no idea what "LGPL with linking exception" changes from the normal "LGPL", I always thought the LGPL was the GPL with a linking exception.

This is about the generated binaries by the compiler, and not the compiler it self.

Eg. GCC-GNAT and Adacore-GNAT (free version)

  • GCC-GNAT - with GCC Runtime Library Exception: generated binaries can be released with any license, including proprietary
  • Adacore-GNAT - without GCC Runtime Library Exception: generated binaries are GPLv3

They are the exactly same compiler but with 9 months delta, being the Adacore on the newer.

rigoletto updated this revision to Diff 55143.Mar 16 2019, 9:38 PM
rigoletto marked 3 inline comments as done.
  • Switch to do-test, and 'FLAVOR:Mdefault'
  • Add DOCS_DISTFILES
rigoletto added a comment.EditedMar 29 2019, 8:03 PM

@hrs

a few things to be considered to be added/fixed to/in ocaml.mk:

  1. STRIP= #empty is needed quite often
  2. ocaml-dune build system is also quite required by several ocaml ports now
  3. ports using ocaml-dune install documentation in /usr/local/doc by default, and seems to bring other problems too.

Thanks.

@hrs

Since the ocaml.mk is not done yet, and now there is the dune build system become the de facto standard, I would like to suggest you a different approach: wrapping Opam into the ports system like is being done with Cabal/Haskell.

See D19730.

Thank you.

tobik resigned from this revision.Jun 2 2019, 1:43 PM
danfe added a subscriber: danfe.Jun 18 2019, 10:21 AM

Exp-run re-requested in PR 218333 — update to version 4.05.0, to set a foot for the next changes.