[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 0/2] ocaml: Start on fixing brokenness when no ocamlopt


  • To: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • From: David Scott <dave@xxxxxxxxxx>
  • Date: Tue, 24 Jan 2017 22:19:00 +0000
  • Cc: Julien Grall <Julien.Grall@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Tue, 24 Jan 2017 22:19:21 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=recoil.org; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= selector1; b=QCalD5aIbdovbhrW/8dQoyC4Y8qGLUlpjpUF/H2gJ5/pAwBXRSa i/gLNJDcijgraPDRcSmHPAwrMeq+Wsgec3w62ro462gUNdzutr+stXdsQ1RZidxt 70M/J9Xtba5BbUZ/FPjwkSSFd+UPTa5lx6OzbFBHtRd+qXQQ+7agaeDc=
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

> On 24 Jan 2017, at 11:35, Ian Jackson <ian.jackson@xxxxxxxxxxxxx> wrote:
> 
> Ian Jackson writes ("[PATCH 0/2] ocaml: Start on fixing brokenness when no 
> ocamlopt"):
>> Debian jessie arm64 has Ocaml (in the package `ocaml-nox') but the
>> package lacks ocamlopt.
> ...
>> This does not actually fix the real problem.  I'm unsure how to fix it
>> properly, for the following reasons:
> 
> Can I have some input from ocaml folks ?
> 
> The first ARM64 boxes in the Xen Project test lab are in principle now
> online, but this bug is stopping osstest actually getting as far as
> trying to boot Xen.
> 
>> ocaml.m4 expects to set OCAMLC to either `ocamlopt' or failing that
>> `ocamlc'.  However our ocaml Makefiles seem to explicitly call
>> $(OCAMLOPT) in some places and and $(OCAMLC) in others.

I’m terrible at reading m4 and am really bad with autoconf so I may have
got this wrong but does it set OCAMLC to `ocamlopt` or `ocamlc.opt`? Where

`ocamlc`: outputs bytecode, and is a bytecode executable itself
`ocamlc.opt`: outputs bytecode, and is a native code executable itself
`ocamlopt`: outputs native code, and is a bytecode executable itself
`ocamlopt.opt`: outputs native code, and is a native code executable itself

Both `ocamlc` and `ocamlc.opt` should be interchangeable: same command-line
arguments, exactly the same output. Same for `ocamlopt` and `ocamlopt.opt`.

I _think_ the m4 is looking for `ocamlc.opt` because it’s an optimised native
(therefore faster) version of `ocamlc`. It should be fine to set `OCAMLC`
to either.

The tools/ocaml/Makefile.rules does contain rules for both bytecode outputs
(e.g. *.cmo *.cma) and native code outputs (*.cmx *.cmxa). I believe *.cmi
can be created by either ocamlc (ocamlc.opt) or ocamlopt (ocamlopt.opt).

I’m a bit suspicious of the tools/ocaml/xenstored/Makefile where it refers
directly to *.cmxa files which are native-code only— I don’t see how that
could work for bytecode outputs.

Do you have a link to the build failure?

Thanks,
Dave

>> 
>> Simply changing tools/ocaml/common.make to substitute the variables
>> from their corresponding autoconf names seems like it isn't right.
>> 
>> Our Makefiles explicitly call ocamlc via OCAMLC right now even when
>> ocamlopt is available, and substituting OCAML would change those calls
>> to OCAMLOPT.  And it wouldn't help fix the actual build failure,
>> either, because if there is no ocamlopt, the m4 doesn't provide a
>> useful OCAMLOPT.
>> 
>> FYI the ocamlforge m4 comes with a pod.  You can get it from
>>  https://forge.ocamlcore.org/anonscm/git/ocaml-autoconf/ocaml-autoconf.git
>> 
>> I haven't copied that into xen.git in patch 1/2.  Should I ?
>> In the meantime, a formatted copy is below.
> 
> Ian.
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.