WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] tools: ocaml build error

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] tools: ocaml build error
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Thu, 12 May 2011 11:57:20 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 12 May 2011 03:59:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DCBBC27.3060506@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <4DCA5B85.7000500@xxxxxxx> <1305108976.26692.384.camel@xxxxxxxxxxxxxxxxxxxxxx> <4DCBBC27.3060506@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2011-05-12 at 11:53 +0100, Christoph Egger wrote:
> On 05/11/11 12:16, Ian Campbell wrote:
> > On Wed, 2011-05-11 at 10:48 +0100, Christoph Egger wrote:
> >> Hi,
> >>
> >> Compiling the ocaml fails:
> >>
> >> Parsing tools/ocaml/libs/xl/../../../../tools/libxl/libxl.idl
> >> sed: 1: "1i(*\
> >>    * AUTO-GENERATED ...": command i expects \ followed by test
> >> gmake[7]: Leaving directory `tools/ocaml/libs/xl'
> >
> > I guess the sed script in tools/ocaml/libs/xl/Makefile has some
> > non-posix-ism in it.
> >
> > Using gnu sed with --posix the following works for me (I dropped the
> > --posix). Does it help ?
> 
> I have to widthdraw my previous ack. The sed script didn't run because
> of empty xm.ml and xm.mli files.
> 
> After running gmake dist-clean and recompile I get this error:
> 
> Parsing tools/ocaml/libs/xl/../../../../tools/libxl/libxl.idl
> sed: 1: "1i\(*\
>      * AUTO-GENERATED ...": extra characters after \ at the end of i command
> gmake[7]: Leaving directory `tools/ocaml/libs/xl'

Can you play a bit with your version of sed and see what makes it happy?

Perhaps \n (suitable quoted) orjust a raw linefeed will work? If not
maybe just stick the whole autogenerated tag on a single line, or use
multiple i commands, or ....

I guess it wouldn't be the end of the world to do:
        echo "(* AUTO GEN... mummble etc *)" > xl.ml
        sed -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in' <bla >>xl.ml

Ian.

> 
> 
> >
> > diff -r 72bba600f23b tools/ocaml/libs/xl/Makefile
> > --- a/tools/ocaml/libs/xl/Makefile  Fri May 06 13:51:13 2011 +0100
> > +++ b/tools/ocaml/libs/xl/Makefile  Wed May 11 11:15:50 2011 +0100
> > @@ -24,7 +24,7 @@ GENERATED_FILES += _libxl_types.inc
> >   all: $(INTF) $(LIBS)
> >
> >   xl.ml: xl.ml.in _libxl_types.ml.in
> > -   $(Q)sed -e '1i(*\
> > +   $(Q)sed -e '1i\(*\
> >    * AUTO-GENERATED FILE DO NOT EDIT\
> >    * Generated from xl.ml.in and _libxl_types.ml.in\
> >    *)\
> > @@ -33,7 +33,7 @@ xl.ml: xl.ml.in _libxl_types.ml.in
> >     <  xl.ml.in>  xl.ml
> >
> >   xl.mli: xl.mli.in _libxl_types.mli.in
> > -   $(Q)sed -e '1i(*\
> > +   $(Q)sed -e '1i\(*\
> >    * AUTO-GENERATED FILE DO NOT EDIT\
> >    * Generated from xl.mli.in and _libxl_types.mli.in\
> >    *)\
> >
> >
> >
> 
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel