OCaml 5 again
by Richard W.M. Jones
I forwarded a previous message about OCaml 5 below.
So what's changed is that Arch have started to build everything with
OCaml 5, and that has revealed a few broken things in packages I
maintain. So far:
- The old Pervasives module has finally disappeared and you have to
use Stdlib. This is incompatible with some very old versions of
OCaml that we still try to target.
- There's some unclear locking problem / breakage in nbdkit OCaml
bindings which look like they may be caused by the new multicore
rules.
The better news is that with Arch building everything they ought to
discover bugs before us.
I may have another go at building OCaml 5 based on the earlier work.
Rich.
----- Forwarded message from "Richard W.M. Jones" <rjones(a)redhat.com> -----
Date: Tue, 6 Sep 2022 15:20:01 +0100
From: "Richard W.M. Jones" <rjones(a)redhat.com>
To: ocaml-devel(a)lists.fedoraproject.org
CC: Jerry James <loganjerry(a)gmail.com>
Subject: [Ocaml-devel] OCaml 5.0.0 alpha 1 scratch build
User-Agent: Mutt/1.5.21 (2010-09-15)
For my sins I'm doing a scratch build of OCaml 5.0.0 alpha 1 here:
https://koji.fedoraproject.org/koji/taskinfo?taskID=91701007
Looking at this there are quite a few larger changes in packaging:
- It seems as if this generates META files for stdlib libraries,
whereas previously those were generated by ocaml-findlib. (This is
a more sensible way to do things, but still a large packaging
change from our point of view.)
- It puts libraries like dynlink, unix etc into subdirectories,
previously only threads was in a subdirectory.
- Various extra unexpected files are packaged. See diff attached.
I'm expecting this will break a lot of things.
5.0.0 also includes multicore support, and is not fully backwards
compatible with all C extensions. I believe the main change will be
for extensions which are relying on converting raw C pointers to OCaml
pointers without wrapping/hiding them in a Custom value. An example
of the deprecated behaviour is in ocaml-ancient which is a package I
will likely drop.
Some other useful links:
https://discuss.ocaml.org/t/ocaml-5-0-first-normal-alpha-release/10216
https://github.com/ocaml/opam-repository/issues/21526
https://github.com/ocaml/ocaml/blob/5.0/Changes
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
commit 64252c7761a2fc8f3361b96ce1081087cf026339 (HEAD -> rawhide)
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Tue Sep 6 13:49:43 2022 +0100
New upstream version 5.0.0~alpha1
diff --git a/ocaml.spec b/ocaml.spec
index 3f03c76..78ea6b8 100644
--- a/ocaml.spec
+++ b/ocaml.spec
@@ -29,12 +29,9 @@
# Architectures where parallel builds fail.
#global no_parallel_build_arches aarch64
-#global rcver +git
-%global rcver %{nil}
-
Name: ocaml
-Version: 4.14.0
-Release: 3%{?dist}
+Version: 5.0.0
+Release: 0.alpha1.1%{?dist}
Summary: OCaml compiler and programming environment
@@ -42,7 +39,8 @@ License: QPL and (LGPLv2+ with exceptions)
URL: https://www.ocaml.org
-Source0: https://github.com/ocaml/ocaml/archive/%{version}/%{name}-%{version}.tar.gz
+#Source0: https://github.com/ocaml/ocaml/archive/%{version}/%{name}-%{version}.tar.gz
+Source0: https://caml.inria.fr/pub/distrib/ocaml-5.0/ocaml-5.0.0~alpha1.tar.gz
# IMPORTANT NOTE:
#
@@ -53,39 +51,46 @@ Source0: https://github.com/ocaml/ocaml/archive/%{version}/%{name}-%{vers
#
# https://pagure.io/fedora-ocaml
#
-# Current branch: fedora-38-4.14.0
+# Current branch: fedora-38-5.0.0
#
# ALTERNATIVELY add a patch to the end of the list (leaving the
# existing patches unchanged) adding a comment to note that it should
# be incorporated into the git repo at a later time.
-# Patches added after 4.14.0 was released
-Patch0001: 0001-Do-not-trigger-warning-when-calling-virtual-methods-.patch
-Patch0002: 0002-Merge-pull-request-11236-from-Nymphium-missing-since.patch
-Patch0003: 0003-misc.h-fix-preprocessor-conditional-on-_MSC_VER.patch
-Patch0004: 0004-Changes.patch
-Patch0005: 0005-Guard-more-instances-of-undefined-_MSC_VER.patch
-Patch0006: 0006-Better-documentation-for-string_of_float-.-11353.patch
-Patch0007: 0007-Merge-pull-request-11380-from-damiendoligez-fix-fort.patch
-Patch0008: 0008-Refactor-the-initialization-of-bytecode-threading-11.patch
-Patch0009: 0009-Merge-pull-request-11397-from-Octachron-tast_mapper_.patch
-Patch0010: 0010-Merge-pull-request-11396-from-gasche-fix11392.patch
-Patch0011: 0011-Document-limitation-on-caml_callbackN-11409.patch
-Patch0012: 0012-Stop-calling-ranlib-on-created-installed-libraries-1.patch
-Patch0013: 0013-tests-lib-bigarray-2-has-gfortran.sh-don-t-print-any.patch
-Patch0014: 0014-Merge-pull-request-11417-from-lpw25-fix-virtual-clas.patch
-Patch0015: 0015-Do-not-elide-the-whole-module-type-error-message-114.patch
-Patch0016: 0016-Merge-pull-request-11373-from-dra27-flexlink-detect.patch
-Patch0017: 0017-Merge-pull-request-11468-from-dra27-i686-mingw-ipv6.patch
-Patch0018: 0018-More-prudent-deallocation-of-alternate-signal-stack-.patch
-Patch0019: 0019-Merge-pull-request-11487-from-purplearmadillo77-fma_.patch
-Patch0020: 0020-Fixup-Changes.patch
-Patch0021: 0021-Fix-deprecated_mutable-which-couldn-t-be-triggered.-.patch
+# Patches added after 5.0.0 was released
+Patch: 0001-increment-version-number-after-tagging-5.0.0-alpha1.patch
+Patch: 0002-Merge-pull-request-11390-from-gadmm-systhreads_simpl.patch
+Patch: 0003-Merge-pull-request-11272-from-gadmm-caml_try_get_cam.patch
+Patch: 0004-Merge-pull-request-11183-from-Engil-refactor_github_.patch
+Patch: 0005-Revert-incorrect-marking-of-socketpair-as-unimplemen.patch
+Patch: 0006-s-Pervasive-Stdlib-in-stdlib-format.ml-11454.patch
+Patch: 0007-Merge-pull-request-11403-from-gadmm-systhread_simpl_.patch
+Patch: 0008-Merge-pull-request-11455-from-favonia-downcase-inval.patch
+Patch: 0009-Merge-pull-request-11096-from-kit-ty-kate-freebsd-ar.patch
+Patch: 0010-Ensure-that-GC-is-not-invoked-from-bounds-check-fail.patch
+Patch: 0011-Merge-pull-request-11373-from-dra27-flexlink-detect.patch
+Patch: 0012-Fix-gethostbyaddr-for-IPv6-arguments-and-make-it-dom.patch
+Patch: 0013-Fix-gethostbyaddr-for-IPv6-arguments-continued-11466.patch
+Patch: 0014-Merge-pull-request-11469-from-TheLortex-patch-1.patch
+Patch: 0015-Merge-pull-request-11470-from-Engil-gha_manual_fixup.patch
+Patch: 0016-Merge-pull-request-11468-from-dra27-i686-mingw-ipv6.patch
+Patch: 0017-Merge-pull-request-11472-from-gadmm-fix_atomic_heade.patch
+Patch: 0018-Merge-pull-request-11493-from-kit-ty-kate-patch-3.patch
+Patch: 0019-Merge-pull-request-11487-from-purplearmadillo77-fma_.patch
+Patch: 0020-Merge-pull-request-11349-from-sadiqj-runtime_events_.patch
+Patch: 0021-Merge-pull-request-11497-from-xavierleroy-sigaltstac.patch
+Patch: 0022-Merge-pull-request-11505-from-sadiqj-robust_poll_tes.patch
+Patch: 0023-Make-Bytes.escaped-safe-in-presence-of-concurrent-up.patch
+Patch: 0024-Restore-Protect-against-repeated-initialization-PR-3.patch
+Patch: 0025-Fix-two-undefined-usages-of-caml_secure_getenv-11511.patch
+Patch: 0026-Manual-grammar-fixes-11510.patch
+Patch: 0027-Merge-pull-request-11223-from-hhugo-error-message-ol.patch
+Patch: 0028-Merge-pull-request-11528-from-dra27-double-init.patch
+Patch: 0029-Fix-deprecated_mutable-which-couldn-t-be-triggered.-.patch
# Fedora-specific patches
-Patch0022: 0022-Don-t-add-rpaths-to-libraries.patch
-Patch0023: 0023-configure-Allow-user-defined-C-compiler-flags.patch
-Patch0024: 0024-configure-Only-use-OC_-for-building-executables.patch
+Patch: 0030-Don-t-add-rpaths-to-libraries.patch
+Patch: 0031-configure-Allow-user-defined-C-compiler-flags.patch
BuildRequires: make
BuildRequires: git
@@ -186,7 +191,7 @@ may not be portable between versions.
%prep
-%autosetup -S git -n %{name}-%{version}%{rcver}
+%autosetup -S git -n %{name}-%{version}~alpha1
# Patches touch configure.ac, so rebuild it:
autoconf --force
@@ -323,10 +328,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
%{_libdir}/ocaml/expunge
%{_libdir}/ocaml/ld.conf
%{_libdir}/ocaml/Makefile.config
+
%{_libdir}/ocaml/*.a
-%if %{natdynlink}
-%{_libdir}/ocaml/*.cmxs
-%endif
%if %{native_compiler}
%{_libdir}/ocaml/*.cmxa
%{_libdir}/ocaml/*.cmx
@@ -334,14 +337,23 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
%{_libdir}/ocaml/libasmrun_shared.so
%endif
%{_libdir}/ocaml/*.mli
+%{_libdir}/ocaml/sys.ml.in
%{_libdir}/ocaml/libcamlrun_shared.so
#%%{_libdir}/ocaml/objinfo_helper
-%{_libdir}/ocaml/threads/*.mli
+
+%{_libdir}/ocaml/*/META
+%{_libdir}/ocaml/*/*.a
%if %{native_compiler}
-%{_libdir}/ocaml/threads/*.a
-%{_libdir}/ocaml/threads/*.cmxa
-%{_libdir}/ocaml/threads/*.cmx
+%{_libdir}/ocaml/*/*.cmxa
+%{_libdir}/ocaml/*/*.cmx
+%{_libdir}/ocaml/*/*.o
%endif
+%{_libdir}/ocaml/*/*.mli
+%if %{natdynlink}
+%{_libdir}/ocaml/*/*.cmxs
+%endif
+
+# headers
%{_libdir}/ocaml/caml
@@ -360,8 +372,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
%{_libdir}/ocaml/camlheaderi
%{_libdir}/ocaml/stublibs
%dir %{_libdir}/ocaml/threads
-%{_libdir}/ocaml/threads/*.cmi
-%{_libdir}/ocaml/threads/*.cma
+%{_libdir}/ocaml/*/*.cmo
+%{_libdir}/ocaml/*/*.cmi
+%{_libdir}/ocaml/*/*.cma
%{_libdir}/ocaml/fedora-ocaml-release
@@ -387,6 +400,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
%files compiler-libs
%license LICENSE
%dir %{_libdir}/ocaml/compiler-libs
+%{_libdir}/ocaml/compiler-libs/META
%{_libdir}/ocaml/compiler-libs/*.mli
%{_libdir}/ocaml/compiler-libs/*.cmi
%{_libdir}/ocaml/compiler-libs/*.cmo
@@ -400,6 +414,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
%changelog
+* Tue Sep 6 2022 Richard W.M. Jones <rjones(a)redhat.com> - 5.0.0-0.alpha1
+- New upstream version 5.0.0~alpha1
+
* Mon Sep 5 2022 Richard W.M. Jones <rjones(a)redhat.com> - 4.14.0-3
- Include more upstream patches from 4.14 branch
_______________________________________________
Ocaml-devel mailing list -- ocaml-devel(a)lists.fedoraproject.org
To unsubscribe send an email to ocaml-devel-leave(a)lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/ocaml-devel@lists.fedorapro...
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
----- End forwarded message -----
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit
4 months, 1 week