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

[MirageOS-devel] linking hack considered harmful


  • To: mirageos-devel <mirageos-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anil Madhavapeddy <anil@xxxxxxxxxx>
  • Date: Sat, 18 Oct 2014 06:43:21 -0700
  • Delivery-date: Sat, 18 Oct 2014 13:43:35 +0000
  • List-id: Developer list for MirageOS <mirageos-devel.lists.xenproject.org>

Dave and I have just untangled several build issues with mirage-console.  What 
was happening previously is that we had two packages: mirage-console-unix and 
mirage-console-xen, which both provided a Console module.  Since we never need 
to have both a Xen and a Unix console, we just selected the right ocamlfind 
package at link time to supply the correct one (aka the "linking hack").

When the console support became more sophisticated (support for multiple 
consoles), Dave factored out some functionality into a common package.  At this 
point, the linking hack became unworkable due to dependency issues.

What we've done in mirage-dev is to go back to a unified mirage-console package 
that provides these ocamlfind packages:
 - mirage-console       (module types)
 - mirage-console.proto (xen protocol)
 - mirage-console.unix  (Console_unix console with lwt.unix)
 - mirage-console.xen   (Console_xen console with xenstore/etc)

The mirage.2.0.0 frontend now aliases Console to Console_unix or Console_xen 
when generating main.ml, which seems a lot simpler than depending on which 
link-time module to use.

Any more build problems, let me or Dave know!

-anil
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

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