Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revive the pre 4.02.0 compilers #18240

Merged
merged 17 commits into from
Mar 4, 2021
Merged

Revive the pre 4.02.0 compilers #18240

merged 17 commits into from
Mar 4, 2021

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Feb 28, 2021

The old OCaml compilers are of interest to a few peopleat least me and @herbelin (see #5260)! I recall noticing several years ago that 3.07 and 3.08 had stopped building on anything later than Ubuntu 14.04 (IIRC!), but my lazy solution on the very rare occasions that I've "needed" them is to fire up that old VM. It's been gradually spreading, though as gcc and, more relevantly, the linker have evolved. I can't visit actual care homes at the moment, so I spent a little time with some old compilers instead.

As always, the patches carried here are strictly ones required to build an old OCaml with a new C compiler. For 3.07-3.09, this necessitates back-porting the 3.09 addition of -fPIC to ocamlopt to 3.07 and 3.08 and the 3.10.0 adjustment to use it by default to all three of those.

  • It turns out OCaml 3 is not affected by the -fcommon fix (I wasn't interested enough to check why!) so the patches in ocaml: compile with -fcommon to support gcc 10 #16583 are extended to 4.00.0, 4.00.1 and 4.01.0
  • ocaml-base-compiler.3.11.2 contained an external reference to a patch on the OCamlPRO website which is no longer there. This patch is required for any modern binutils and so I've replaced it with the actual commit from the OCaml repo and extended it to 3.11.0 and 3.11.1
  • ocaml-config.1 has never worked on 3.07... I've simply inserted ocaml-config.0 to handle the change in version number scheme 😂 Note that the change to ocaml-config.1 will trigger a switch rebuild in opam 2.1 but because ocaml-config is a base package, it won't trigger that in opam 2.0. On that basis, I've amended its constraints, rather than a slightly more weird adjustment to ocaml-base-compiler.3.07*/opam.

If we're going to have these packages (and, even as we end up splitting opam-repository, they should still be kept) then we should periodically check that they still build. To that end, I've adjusted 3 packages:

  • ocamlfind.1.0.4 is the last version which supported 3.07, so adding it allows ocamlfind to be installed in any ocaml switch
  • pcre.6.2.5 allows a library with C stubs to be installed in 3.08+
  • calendar.1.10 - at least at present - allows a single package at a single version to be installed on all supported versions of OCaml

As usual, while touching ocaml-base-compiler packages and others, I've updated metadata.

@dra27
Copy link
Member Author

dra27 commented Feb 28, 2021

I should add that all 23 of these compilers are successfully running in Ubuntu 20.10.

@camelus
Copy link
Contributor

camelus commented Feb 28, 2021

Commit: 8745a60

A pull request by opam-seasoned @dra27.

🌤️ opam-lint warnings 8745a60
  • aws.0.0.2 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 35: Missing field 'homepage'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • aws.0.0.3 has some warnings:

    • warning 36: Missing field 'bug-reports'
  • caqti-type-calendar.0.10.0 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • caqti-type-calendar.0.10.1 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • caqti-type-calendar.0.10.2 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • caqti-type-calendar.0.11.0 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • caqti-type-calendar.0.9.0 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • crowbar.0.1 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • crowbar.0.2 has some warnings:

    • warning 25: Missing field 'authors'
  • eliom.2.2.2 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
  • eliom.3.0.0 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
  • eliom.3.0.1 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
  • eliom.3.0.2 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
  • eliom.3.0.3 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
  • eliom.4.0.0 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • eliom.4.1.0 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • eliom.4.2.0 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • eliom.5.0.0 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • eliom.6.0.0 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • ocaml-base-compiler.4.02.0 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 35: Missing field 'homepage'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
  • ocaml-base-compiler.4.02.1 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 35: Missing field 'homepage'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
  • ocaml-base-compiler.4.02.2 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 35: Missing field 'homepage'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
  • ocaml-base-compiler.4.02.3 has some warnings:

    • warning 25: Missing field 'authors'
    • warning 35: Missing field 'homepage'
    • warning 36: Missing field 'bug-reports'
    • warning 37: Missing field 'dev-repo'
  • opam-depext.1.1.5 has some warnings:

    • warning 47: Synopsis (or description first line) should start with a capital and not end with a dot
  • These packages passed lint tests: aws.1.0.0, aws.1.0.1, aws.1.0.2, bookaml.2.0, bookaml.2.1, bookaml.3.0, bookaml.3.1, bookaml.4.0, calendar.1.10, calendar.2.03.1, calendar.2.03.2, calendar.2.04, caqti-type-calendar.1.0.0, caqti-type-calendar.1.2.0, caqti.0.10.0, caqti.0.10.1, caqti.0.10.2, caqti.0.9.0, facebook-sdk.0.2.12, facebook-sdk.0.3.1, facebook-sdk.0.3.3, facebook-sdk.0.3.4, facebook-sdk.0.3.5, oasis2debian.0.1.3, oasis2debian.0.1.4, oasis2debian.0.1.5, ocal.0.1.1, ocal.0.1.2, ocal.0.1.3, ocal.0.2.0, ocal.0.2.1, ocaml-base-compiler.3.07+1, ocaml-base-compiler.3.07+2, ocaml-base-compiler.3.07, ocaml-base-compiler.3.08.0, ocaml-base-compiler.3.08.1, ocaml-base-compiler.3.08.2, ocaml-base-compiler.3.08.3, ocaml-base-compiler.3.08.4, ocaml-base-compiler.3.09.0, ocaml-base-compiler.3.09.1, ocaml-base-compiler.3.09.2, ocaml-base-compiler.3.09.3, ocaml-base-compiler.3.10.0, ocaml-base-compiler.3.10.1, ocaml-base-compiler.3.10.2, ocaml-base-compiler.3.11.0, ocaml-base-compiler.3.11.1, ocaml-base-compiler.3.11.2, ocaml-base-compiler.3.12.0, ocaml-base-compiler.3.12.1, ocaml-base-compiler.4.00.0, ocaml-base-compiler.4.00.1, ocaml-base-compiler.4.01.0, ocaml-config.0, ocaml-config.1, ocaml-r.0.0.1, ocamlfind.1.0.4, ocamlnet.3.2.1, ocamlnet.3.5.1, ocamlnet.3.6.0, ocamlnet.3.6.3, ocamlnet.3.6.5, ocamlnet.3.7.3, ocamlnet.3.7.4-1, ocamlnet.3.7.4, ocamlnet.3.7.5, ocamlnet.3.7.6, ocamlnet.3.7.7, ocamlnet.4.0.1, ocamlnet.4.0.2, ocamlnet.4.0.4, ocamlnet.4.1.7, ocamlnet.4.1.8, ocsigen-toolkit.0.99, ocsigen-toolkit.1.0.0, ocsigen-toolkit.1.1.0, ocsigen-toolkit.2.0.0, ocsigen-toolkit.2.1.0, ocsigen-toolkit.2.2.0, ocsigen-toolkit.2.2.1, ocsigen-toolkit.2.3.1, ocsigen-toolkit.2.3.2, ocsigen-toolkit.2.3.3, ocsigen-toolkit.2.4.1, ocsigen-toolkit.2.4.3, ocsigen-toolkit.2.5.0, ocsigen-toolkit.2.7.0, ocsigen-toolkit.2.8.0, opam-depext.1.1.1, opam-depext.1.1.4, pcre.6.2.5, pgocaml.1.6, pgocaml.1.7.1, pgocaml.1.7, pgocaml.2.0, pgocaml.2.1, pgocaml.2.2, pgocaml.2.3, pgocaml.3.0, pgocaml.3.1, pgocaml.3.2, pgocaml.4.0, pgocaml.4.2.2, pgocaml.4.2, sociaml-facebook-api.0.4.0, sociaml-facebook-api.0.4.1, sociaml-tumblr-api.0.1.0, sociaml-tumblr-api.0.2.0, soupault.1.10.0, soupault.1.11.0, soupault.1.12.0, soupault.1.13.0, soupault.1.6, soupault.1.7.0, soupault.1.8.0, soupault.1.9.0, soupault.2.0.0, soupault.2.1.0


☀️ Installability check (+4)
  • new installable packages (4): calendar.1.10 ocaml-config.0 ocamlfind.1.0.4 pcre.6.2.5

🌤️ 37 ignored non-opam files:
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07+1/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07+1/files/pr2061.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07+2/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07+2/files/pr2061.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07/files/pr2061.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.0/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.1/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.2/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.3/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.4/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.0/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.0/files/ocamlopt-fPIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.0/files/pr4439.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.0/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.1/files/ocamlopt-fPIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.1/files/pr4439.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.1/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.2/files/ocamlopt-fPIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.2/files/pr4439.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.2/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.3/files/ocamlopt-fPIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.3/files/pr4439.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.3/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.10.0/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.10.1/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.10.2/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.11.0/files/pr5237.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.11.1/files/pr5237.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.11.2/files/pr5237.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.4.00.0/files/fix-gcc10.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.4.00.1/files/fix-gcc10.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.4.01.0/files/fix-gcc10.patch
  • packages/ocaml-config/ocaml-config.0/files/gen_ocaml_config.ml.in
  • packages/ocaml-config/ocaml-config.0/files/ocaml-config.install
  • packages/ocamlfind/ocamlfind.1.0.4/files/no-awk-check.patch
  • packages/ocamlfind/ocamlfind.1.0.4/files/ocamlfind.install

@dra27 dra27 force-pushed the geriatrics branch 3 times, most recently from 9a2e316 to 8c76333 Compare February 28, 2021 19:22
@dra27
Copy link
Member Author

dra27 commented Feb 28, 2021

OK, looking at original opam-repo-ci report for this PR, I added commits to put a lowerbound of calendar 2.0 on all packages which didn't have (for those whose OCaml experience isn't old enough, the major change in Calendar 2.0 was packing the library in CalendarLib) and also to constrain opam-depext for a few missing packages.

OCaml didn't support ARM64 prior to OCaml 4.02.0, so I've updated the existing ARM64 macOS restriction to apply to all platforms. Despite a little attempt, arm32 and ppc64 are both failing, but I don't like to disable them completely since if one were using an appropriate arm32 CPU and ppc64 Linux installation, I expect they would work.

Constraining the packages has expanded the testing of Camelus and opam-repo-ci beyond the original remit of this PR, so here is Camelus's original pristine report!

Commit: 470f3eb

A pull request by opam-seasoned @dra27.

☀️ All lint checks passed 470f3eb
  • These packages passed lint tests: calendar.1.10, calendar.2.03.1, calendar.2.03.2, calendar.2.04, ocaml-base-compiler.3.07+1, ocaml-base-compiler.3.07+2, ocaml-base-compiler.3.07, ocaml-base-compiler.3.08.0, ocaml-base-compiler.3.08.1, ocaml-base-compiler.3.08.2, ocaml-base-compiler.3.08.3, ocaml-base-compiler.3.08.4, ocaml-base-compiler.3.09.0, ocaml-base-compiler.3.09.1, ocaml-base-compiler.3.09.2, ocaml-base-compiler.3.09.3, ocaml-base-compiler.3.10.0, ocaml-base-compiler.3.10.1, ocaml-base-compiler.3.10.2, ocaml-base-compiler.3.11.0, ocaml-base-compiler.3.11.1, ocaml-base-compiler.3.11.2, ocaml-base-compiler.3.12.0, ocaml-base-compiler.3.12.1, ocaml-base-compiler.4.00.0, ocaml-base-compiler.4.00.1, ocaml-base-compiler.4.01.0, ocaml-config.0, ocaml-config.1, ocamlfind.1.0.4, ocamlnet.3.2.1, ocamlnet.3.5.1, ocamlnet.3.6.0, ocamlnet.3.6.3, ocamlnet.3.6.5, ocamlnet.3.7.3, ocamlnet.3.7.4-1, ocamlnet.3.7.4, ocamlnet.3.7.5, ocamlnet.3.7.6, ocamlnet.3.7.7, ocamlnet.4.0.1, ocamlnet.4.0.2, ocamlnet.4.0.4, ocamlnet.4.1.7, ocamlnet.4.1.8, pcre.6.2.5

☀️ Installability check (+4)
  • new installable packages (4): calendar.1.10 ocaml-config.0 ocamlfind.1.0.4 pcre.6.2.5

🌤️ 37 ignored non-opam files:
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07+1/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07+1/files/pr2061.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07+2/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07+2/files/pr2061.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.07/files/pr2061.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.0/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.1/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.2/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.3/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.08.4/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.0/files/PIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.0/files/ocamlopt-fPIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.0/files/pr4439.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.0/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.1/files/ocamlopt-fPIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.1/files/pr4439.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.1/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.2/files/ocamlopt-fPIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.2/files/pr4439.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.2/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.3/files/ocamlopt-fPIC.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.3/files/pr4439.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.09.3/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.10.0/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.10.1/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.10.2/files/pr4867.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.11.0/files/pr5237.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.11.1/files/pr5237.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.3.11.2/files/pr5237.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.4.00.0/files/fix-gcc10.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.4.00.1/files/fix-gcc10.patch
  • packages/ocaml-base-compiler/ocaml-base-compiler.4.01.0/files/fix-gcc10.patch
  • packages/ocaml-config/ocaml-config.0/files/gen_ocaml_config.ml.in
  • packages/ocaml-config/ocaml-config.0/files/ocaml-config.install
  • packages/ocamlfind/ocamlfind.1.0.4/files/no-awk-check.patch
  • packages/ocamlfind/ocamlfind.1.0.4/files/ocamlfind.install

@kit-ty-kate
Copy link
Member

I did a bit of digging for ppc64 and arm32:

  • ppc64 was added in OCaml 4.03
  • StrongARM (an implementation of armv4) was supported since OCaml 2.01
  • armv5, 6 and 7 were added in OCaml 4.00

In opam, only armv5, 6 and 7 are referred as arm32. Previous versions are not.
So I believe it is safe to restrict arch != "arm32" to all ocaml packages < 4.00.0 and arch != "ppc64" to all ocaml packages < 4.03.0

@dra27
Copy link
Member Author

dra27 commented Mar 1, 2021

Thanks for the digging, @kit-ty-kate!

The arm64 failure for 4.02.x is because a backport of GPR#1330 should be applied to 4.02-4.05 (it applies cleanly), but that's best put in a separate PR, I think.

I don't think the other failures in the CI run are related to the changes here?

@avsm avsm merged commit 425f4eb into ocaml:master Mar 4, 2021
@avsm
Copy link
Member

avsm commented Mar 4, 2021

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants