Minimum OCaml compiler version (2021/2022 edition)
Previously: https://listman.redhat.com/archives/libguestfs/2020-March/msg00063.html https://listman.redhat.com/archives/libguestfs/2017-September/msg00203.html Our current minimum version across projects is 4.03. We still use "noalloc" in a few places which causes this warning: ocamlopt.opt -warn-error +A-3 -c NBDKit.ml -o NBDKit.cmx File "NBDKit.ml", line 155, characters 0-70: 155 | external set_name : string -> unit = "ocaml_nbdkit_set_name" "noalloc" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: [@@noalloc] should be used instead of "noalloc" I just noticed now that this change was made in 4.03 -- I will go ahead and fix this everywhere today. Should we move to a newer minimum version? If we moved to 4.07 then we could also get rid of the warnings about Pervasives (replaced by Stdlib), eg: File "std_utils.ml", line 329, characters 26-44: 329 | let sort_uniq ?(cmp = Pervasives.compare) xs = ^^^^^^^^^^^^^^^^^^ Alert deprecated: module Stdlib.Pervasives Use Stdlib instead. However 4.07 was only released in 2018, and this would mean removing RHEL 7 compatibility (officially -- it's sort of unofficially not supported already). More irritatingly, FreeBSD is stuck on 4.05. There are no particularly compelling new features at the moment. Here are the common distros and versions (< 4.07 marked with '*'): Arch (Extra) OCaml 4.12 Debian stable OCaml 4.11 Debian testing OCaml 4.11 Fedora 31 OCaml 4.08 Fedora 35 OCaml 4.12 FreeBSD (ports) OCaml 4.05 * OpenSUSE OCaml 4.13 RHEL 7 OCaml 4.05 * RHEL 8 OCaml 4.07 RHEL 9 OCaml 4.11 Ubuntu 16.04 OCaml 4.02 * Ubuntu 18.04 OCaml 4.05 * Ubuntu 20.04 OCaml 4.08 Ubuntu 21.04 OCaml 4.11 And here are the release dates of the OCaml compiler: OCaml version Release date 4.02 2014-08 4.03 2016-04 4.04 2016-11 4.05 2017-07 4.06 2017-11 4.07 2018-07 4.08 2019-06 4.09 2019-09 4.10 2020-02 4.11 2020-08 4.12 2021-02 4.13 2021-09 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
On Tue, Nov 09, 2021 at 09:04:40AM +0000, Richard W.M. Jones wrote:
Previously: https://listman.redhat.com/archives/libguestfs/2020-March/msg00063.html https://listman.redhat.com/archives/libguestfs/2017-September/msg00203.html
Our current minimum version across projects is 4.03.
We still use "noalloc" in a few places which causes this warning:
ocamlopt.opt -warn-error +A-3 -c NBDKit.ml -o NBDKit.cmx File "NBDKit.ml", line 155, characters 0-70: 155 | external set_name : string -> unit = "ocaml_nbdkit_set_name" "noalloc" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: [@@noalloc] should be used instead of "noalloc"
I just noticed now that this change was made in 4.03 -- I will go ahead and fix this everywhere today.
Should we move to a newer minimum version? If we moved to 4.07 then we could also get rid of the warnings about Pervasives (replaced by Stdlib), eg:
File "std_utils.ml", line 329, characters 26-44: 329 | let sort_uniq ?(cmp = Pervasives.compare) xs = ^^^^^^^^^^^^^^^^^^ Alert deprecated: module Stdlib.Pervasives Use Stdlib instead.
However 4.07 was only released in 2018, and this would mean removing RHEL 7 compatibility (officially -- it's sort of unofficially not supported already). More irritatingly, FreeBSD is stuck on 4.05.
There are no particularly compelling new features at the moment.
Actually there are some: If we moved to 4.04, then a few features open up in this file (look for "4.04"): https://github.com/libguestfs/libguestfs-common/blob/master/mlstdutils/std_u... It looks like this would be possible.
Here are the common distros and versions (< 4.07 marked with '*'):
Arch (Extra) OCaml 4.12 Debian stable OCaml 4.11 Debian testing OCaml 4.11 Fedora 31 OCaml 4.08 Fedora 35 OCaml 4.12 FreeBSD (ports) OCaml 4.05 * OpenSUSE OCaml 4.13 RHEL 7 OCaml 4.05 * RHEL 8 OCaml 4.07 RHEL 9 OCaml 4.11 Ubuntu 16.04 OCaml 4.02 * Ubuntu 18.04 OCaml 4.05 * Ubuntu 20.04 OCaml 4.08 Ubuntu 21.04 OCaml 4.11
And here are the release dates of the OCaml compiler:
OCaml version Release date 4.02 2014-08 4.03 2016-04 4.04 2016-11 4.05 2017-07 4.06 2017-11 4.07 2018-07 4.08 2019-06 4.09 2019-09 4.10 2020-02 4.11 2020-08 4.12 2021-02 4.13 2021-09
Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
On 11/09/21 10:04, Richard W.M. Jones wrote:
Previously: https://listman.redhat.com/archives/libguestfs/2020-March/msg00063.html https://listman.redhat.com/archives/libguestfs/2017-September/msg00203.html
Our current minimum version across projects is 4.03.
We still use "noalloc" in a few places which causes this warning:
ocamlopt.opt -warn-error +A-3 -c NBDKit.ml -o NBDKit.cmx File "NBDKit.ml", line 155, characters 0-70: 155 | external set_name : string -> unit = "ocaml_nbdkit_set_name" "noalloc" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: [@@noalloc] should be used instead of "noalloc"
I just noticed now that this change was made in 4.03 -- I will go ahead and fix this everywhere today.
Should we move to a newer minimum version? If we moved to 4.07 then we could also get rid of the warnings about Pervasives (replaced by Stdlib), eg:
File "std_utils.ml", line 329, characters 26-44: 329 | let sort_uniq ?(cmp = Pervasives.compare) xs = ^^^^^^^^^^^^^^^^^^ Alert deprecated: module Stdlib.Pervasives Use Stdlib instead.
However 4.07 was only released in 2018, and this would mean removing RHEL 7 compatibility (officially -- it's sort of unofficially not supported already). More irritatingly, FreeBSD is stuck on 4.05.
Can we loop in FreeBSD people directly? Do they have an upgrade path? (I did my best to build libguestfs & friends on RHEL-7, as you know, but it was just impossible. I'm on Fedora 34 now, and have little sympathy for other "old" Linux distros left, as a result -- they should *all* have upgrade paths, I expect?) Thanks Laszlo
There are no particularly compelling new features at the moment.
Here are the common distros and versions (< 4.07 marked with '*'):
Arch (Extra) OCaml 4.12 Debian stable OCaml 4.11 Debian testing OCaml 4.11 Fedora 31 OCaml 4.08 Fedora 35 OCaml 4.12 FreeBSD (ports) OCaml 4.05 * OpenSUSE OCaml 4.13 RHEL 7 OCaml 4.05 * RHEL 8 OCaml 4.07 RHEL 9 OCaml 4.11 Ubuntu 16.04 OCaml 4.02 * Ubuntu 18.04 OCaml 4.05 * Ubuntu 20.04 OCaml 4.08 Ubuntu 21.04 OCaml 4.11
And here are the release dates of the OCaml compiler:
OCaml version Release date 4.02 2014-08 4.03 2016-04 4.04 2016-11 4.05 2017-07 4.06 2017-11 4.07 2018-07 4.08 2019-06 4.09 2019-09 4.10 2020-02 4.11 2020-08 4.12 2021-02 4.13 2021-09
Rich.
On Tue, Nov 09, 2021 at 01:18:44PM +0100, Laszlo Ersek wrote:
On 11/09/21 10:04, Richard W.M. Jones wrote:
Previously: https://listman.redhat.com/archives/libguestfs/2020-March/msg00063.html https://listman.redhat.com/archives/libguestfs/2017-September/msg00203.html
Our current minimum version across projects is 4.03.
We still use "noalloc" in a few places which causes this warning:
ocamlopt.opt -warn-error +A-3 -c NBDKit.ml -o NBDKit.cmx File "NBDKit.ml", line 155, characters 0-70: 155 | external set_name : string -> unit = "ocaml_nbdkit_set_name" "noalloc" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: [@@noalloc] should be used instead of "noalloc"
I just noticed now that this change was made in 4.03 -- I will go ahead and fix this everywhere today.
Should we move to a newer minimum version? If we moved to 4.07 then we could also get rid of the warnings about Pervasives (replaced by Stdlib), eg:
File "std_utils.ml", line 329, characters 26-44: 329 | let sort_uniq ?(cmp = Pervasives.compare) xs = ^^^^^^^^^^^^^^^^^^ Alert deprecated: module Stdlib.Pervasives Use Stdlib instead.
However 4.07 was only released in 2018, and this would mean removing RHEL 7 compatibility (officially -- it's sort of unofficially not supported already). More irritatingly, FreeBSD is stuck on 4.05.
Can we loop in FreeBSD people directly? Do they have an upgrade path?
Yes let's do that now. Their reasoning is contained here: https://cgit.freebsd.org/ports/commit/lang/ocaml?id=b51d4476846a1b8364c05d95... However I'm not sure that's a very good reason two+ years later. Firstly any package that doesn't handle immutable strings properly could still be compiled using "ocamlopt -unsafe-string". That option was removed in 4.13, but is still present in I think 4.11 or 4.12. So there's a clear upgrade path to 4.11/4.12 at least. Secondly every library that matters has been updated to use immutable strings. There are a handful which break (Unison is the only one I recall now) and we dropped them from Fedora. So, dear FreeBSD folk, could we have a newer OCaml compiler now?
(I did my best to build libguestfs & friends on RHEL-7, as you know, but it was just impossible. I'm on Fedora 34 now, and have little sympathy for other "old" Linux distros left, as a result -- they should *all* have upgrade paths, I expect?)
Thanks Laszlo
There are no particularly compelling new features at the moment.
Here are the common distros and versions (< 4.07 marked with '*'):
Arch (Extra) OCaml 4.12 Debian stable OCaml 4.11 Debian testing OCaml 4.11 Fedora 31 OCaml 4.08 Fedora 35 OCaml 4.12 FreeBSD (ports) OCaml 4.05 * OpenSUSE OCaml 4.13 RHEL 7 OCaml 4.05 * RHEL 8 OCaml 4.07 RHEL 9 OCaml 4.11 Ubuntu 16.04 OCaml 4.02 * Ubuntu 18.04 OCaml 4.05 * Ubuntu 20.04 OCaml 4.08 Ubuntu 21.04 OCaml 4.11
And here are the release dates of the OCaml compiler:
OCaml version Release date 4.02 2014-08 4.03 2016-04 4.04 2016-11 4.05 2017-07 4.06 2017-11 4.07 2018-07 4.08 2019-06 4.09 2019-09 4.10 2020-02 4.11 2020-08 4.12 2021-02 4.13 2021-09
Rich.
Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
On Tue, Nov 09, 2021 at 12:25:56PM +0000, Richard W.M. Jones wrote:
On Tue, Nov 09, 2021 at 01:18:44PM +0100, Laszlo Ersek wrote:
On 11/09/21 10:04, Richard W.M. Jones wrote:
... However 4.07 was only released in 2018, and this would mean removing RHEL 7 compatibility (officially -- it's sort of unofficially not supported already). More irritatingly, FreeBSD is stuck on 4.05.
Can we loop in FreeBSD people directly? Do they have an upgrade path?
Yes let's do that now.
Their reasoning is contained here: https://cgit.freebsd.org/ports/commit/lang/ocaml?id=b51d4476846a1b8364c05d95...
However I'm not sure that's a very good reason two+ years later.
Firstly any package that doesn't handle immutable strings properly could still be compiled using "ocamlopt -unsafe-string". That option was removed in 4.13, but is still present in I think 4.11 or 4.12. So there's a clear upgrade path to 4.11/4.12 at least. Secondly every library that matters has been updated to use immutable strings. There are a handful which break (Unison is the only one I recall now) and we dropped them from Fedora.
Hmm, in FreeBSD we package net/unison{,232,240,248} and I recall it was fearly straightforward to convert them to immutable strings.
So, dear FreeBSD folk, could we have a newer OCaml compiler now?
I'm working on it. I've converted most our ports in-tree consumers for safe strings by default, so we can jump post-4.06 first. I originally wanted to make an intermediate stop at 4.07 to allow users stick to that package (pkg lock it) because 4.08 had introduced noticeable performance regression*, but it had since been fixed. Nonetheless, there are still several ports left that I need to prepare for 4.05-4.06+ transition, e.g. ocaml-lwt. The update of lang/ocaml itself is tested and ready, but I want a smooth transition, without breaking any ports or fixing them in the same commit (unless I must, as e.g. in case of ocaml-labltk). ./danfe *) https://github.com/ocaml/ocaml/issues/9326
On Tue, Nov 09, 2021 at 09:04:40AM +0000, Richard W.M. Jones wrote:
Previously: https://listman.redhat.com/archives/libguestfs/2020-March/msg00063.html https://listman.redhat.com/archives/libguestfs/2017-September/msg00203.html
Our current minimum version across projects is 4.03.
We still use "noalloc" in a few places which causes this warning:
ocamlopt.opt -warn-error +A-3 -c NBDKit.ml -o NBDKit.cmx File "NBDKit.ml", line 155, characters 0-70: 155 | external set_name : string -> unit = "ocaml_nbdkit_set_name" "noalloc" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: [@@noalloc] should be used instead of "noalloc"
I just noticed now that this change was made in 4.03 -- I will go ahead and fix this everywhere today.
Should we move to a newer minimum version? If we moved to 4.07 then we could also get rid of the warnings about Pervasives (replaced by Stdlib), eg:
File "std_utils.ml", line 329, characters 26-44: 329 | let sort_uniq ?(cmp = Pervasives.compare) xs = ^^^^^^^^^^^^^^^^^^ Alert deprecated: module Stdlib.Pervasives Use Stdlib instead.
However 4.07 was only released in 2018, and this would mean removing RHEL 7 compatibility (officially -- it's sort of unofficially not supported already). More irritatingly, FreeBSD is stuck on 4.05.
Note both libvirt and QEMU have explicitly dropped RHEL-7 as a supported build platform[1], under the rule that platforms are dropped 2 years after the new major version is released. It has been > 2 years since RHEL-8 GA, so they dropped RHEL-7. IOW even if new libguestfs can build on RHEL-7, you'll be stuck with old libvirt and QEMU.
Here are the common distros and versions (< 4.07 marked with '*'):
Arch (Extra) OCaml 4.12 Debian stable OCaml 4.11 Debian testing OCaml 4.11 Fedora 31 OCaml 4.08 Fedora 35 OCaml 4.12 FreeBSD (ports) OCaml 4.05 * OpenSUSE OCaml 4.13 RHEL 7 OCaml 4.05 * RHEL 8 OCaml 4.07 RHEL 9 OCaml 4.11 Ubuntu 16.04 OCaml 4.02 *
Ubuntu 16.04 is explicitly dropped by both QEMU and libvirt too a long time ago. It falls under both the 2 year cut off rule, an the maximum of two major releases in concurrently rules. NB, QEMU/libvirt only look at Ubuntu LTS releases for cutoffs
Ubuntu 18.04 OCaml 4.05 * Ubuntu 20.04 OCaml 4.08 Ubuntu 21.04 OCaml 4.11
And here are the release dates of the OCaml compiler:
OCaml version Release date 4.02 2014-08 4.03 2016-04 4.04 2016-11 4.05 2017-07 4.06 2017-11 4.07 2018-07 4.08 2019-06 4.09 2019-09 4.10 2020-02 4.11 2020-08 4.12 2021-02 4.13 2021-09
Regards, Daniel [1] https://www.qemu.org/docs/master/about/build-platforms.html https://libvirt.org/platforms.html -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (4)
-
Alexey Dokuchaev -
Daniel P. Berrangé -
Laszlo Ersek -
Richard W.M. Jones