> On Jan 5, 2023, at 10:08 AM, Volker Schlecht <openbsd-po...@schlecht.dev> 
> wrote:
> 
> Cc: anil@, daniel@
> 
> Updated patch, now also tested on i386.
> 
> daniel@: I successfully rebuilt lang/compcert and all its dependencies on 
> i386 with ocaml 4.14.1

You should build all the ports that depend on ocaml NOT all the dependencies of 
compcert.

Usually ocaml and ALL ocaml ports need to be updated in lockstep (just like it 
says on lines 3&4 of lang/ocaml/Makefile).

But maybe I misunderstood what you did.

> 
> What I noticed:
> 
> * sysutils/findlib still needs ocamlbuild to build, and I still think it 
> should be a build dependency ;-)
> 
> * compcert tests fail with linker errors in test/abi
> 
> ld: error: can't create dynamic relocation R_386_32 against local symbol in 
> readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' 
> to allow text relocations in the output
> >>> defined in fixed_def_compcert.o
> >>> referenced by fixed_def_compcert.o:(f14)
> 
> Those errors occur with
> 
> - compcert 3.10 built with ocaml 4.14.1
> - compcert 3.10 patched with Github PR #457, built with ocaml 4.14.1
> - compcert 3.12 (includes PR #457) built with ocaml 4.14.1
> - compcert 3.12 built with ocaml 4.12.1

Does the vanilla 3.10 compcert with the vanilla ocaml work? Or has something in 
the latest tree broken compcert?

If vanilla compxerr works I would get it upgraded to 3.12 first before tackling 
ocaml. That should be much easier.

Now typically with ocaml updates I go the other way. First update the dependent 
ocaml consumers that are known to have problems with the new ocaml (if any). 
Then update ocaml itself once EVERYTHING works under both new and old versions 
of ocaml.

One other thing (which I know is a pain) but I usually do not skip ocaml 
versions. I’m surprised the version you’ve proposed doesn’t have more problems. 
But maybe things in the ocaml world got better… on the other you didn’t list a 
number of ocaml ports as being part of your tests. So let me say this again, 
ocaml CANNOT be updated unless all ocaml consumers are build and run tested.

> 
> Here's the PR I hoped might fix it:
> https://github.com/AbsInt/CompCert/pull/457
> 
> Looks to me as if the lang/ocaml version has nothing to do with it, though.
> 
>> On 12/30/22 12:18, Volker Schlecht wrote:
>> Cc: anil@, daniel@
>> Here's an update to my original patch from
>> https://marc.info/?l=openbsd-ports&m=166369866628254
>> I still get clean rebuilds for
>> devel/ocaml-ocamlbuild
>> sysutils/findlib
>> devel/dune
>> devel/ocaml-cppo
>> devel/ocaml-menhir
>> sysutils/opam
>> math/ocaml-zarith
>> graphics/ocaml-graphics
>> x11/lablgtk2
>> graphics/ocaml-cairo
>> x11/lablgtk3
>> math/coq
>> I'm not familiar with lang/compcert, but I think there's a reasonable 
>> indication that testing it with ocaml 4.14.1 may be worthwhile.
>> Anyone willing to have a look?
> <ocaml-4.14.1.diff>

Reply via email to