[Pkg-xen-devel] [patch] Packages ocaml libraries

Jonathan Ludlam Jonathan.Ludlam at eu.citrix.com
Mon Oct 24 13:56:28 UTC 2011


On 24 Oct 2011, at 09:56, Ian Campbell wrote:

> On Sun, 2011-10-23 at 23:13 +0100, Jonathan Ludlam wrote:
> 
>>>> - certainly nobody on the list commented to that effect when I
>>>> submitted the patches. However, it *is* a breaking change, so there may
>>>> be some principles that back porting would violate; we'd have to
>>>> confirm it with the xen maintainers.
>>> 
>>> Well, since the ocaml libraries have never been shipped by the binary
>>> packages of Xen in Debian, we aren't breaking anything form the Debian
>>> perspective.
>>> 
>> 
>> True, but from the perspective of anyone using the ocaml libs in
>> vanilla xen 4.1.2, having them renamed underneath you in a bugfix
>> release is a bit rude. This is all hypothetical of course, since we
>> don't know of any users of the ocaml :-)
> 
> I think this is something which would prevent us (as in upstream
> Xen.org) from taking this into a stable branch, so it'd be a packaging
> only patch for now. 4.2 will be out before Wheezy though so it would go
> away again quite quickly.
> 

OK, as I suspected.

>> Anyway, the problem isn't insurmountable, and as I said, if we could
>> only get the native libraries to work properly then that's no big
>> deal. Xapi uses native compilation exclusively, so it won't hurt us. 
> 
> I wonder...
> 
> The stuff under /usr/lib/xen-X.Y is registered with the Debian
> alternatives infrastructure as /usr/lib/xen-default which is supposed to
> pickup the correct version for what you are actually running. One option
> might be to place the real ocaml files in /usr/lib/xen-X.Y but also
> install symlinks in /usr/lib/ocaml (or whatever) which point
> at /usr/lib/xen-default/lib/ocaml. Hopefully that would allow ocaml
> stuff to compile without modification in the common case of wanting to
> compile against the current hypervisor and be sufficient for most of
> what we need.
> 

I don't think the probably is the place in which the ocaml libs are installed; there is an environment variable OCAMLPATH, which when set to "/usr/lib/xen-4.1/lib/ocaml" causes those packages to be picked up by ocamlfind. This bit works nicely. The issue is when it tries to link (runtime and compiletime) against e.g. libxenctrl.so. I've fixed my patches a bit so that, as well as the native compilation, 'custom' bytecode compiling works now too (which statically links). Normal bytecode works, so long as you have the environment parameter 'CAML_LD_LIBRARY_PATH' set at both compilation and program execution time. I think this is as good as it's going to get. I'll send the patch to the list when I've tidied it up a bit.

Jon



> Ian.
> -- 
> Ian Campbell
> 
> Whatever it is, I fear Greeks even when they bring gifts.
> 		-- Publius Vergilius Maro (Virgil)
> 




More information about the Pkg-xen-devel mailing list