tools: ocaml build error
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'
Christoph
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Quoted 8 lines · Christoph Egger
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 ?
tools/ocaml/libs/xl/Makefile +2 -2
@@ -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\ *)\
Quoted 10 lines · Ian Campbell
Quoted 8 lines · Christoph Egger
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'
Quoted 5 lines
I guess the sed script in
tools/ocaml/libs/xl/Makefilehas some non-posix-ism in it.Using gnu sed with --posix the following works for me (I dropped the --posix). Does it help ?
Yes, it does. Thanks.
Christoph
Quoted 25 lines
diff -r
72bba600f23btools/ocaml/libs/xl/Makefiletools/ocaml/libs/xl/Makefile +2
-2@@ -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\ *)\
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Quoted 11 lines · Christoph Egger
Quoted 10 lines · Ian Campbell
Quoted 8 lines · Christoph Egger
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'
Quoted 7 lines
Quoted 5 lines
I guess the sed script in
tools/ocaml/libs/xl/Makefilehas some non-posix-ism in it.Using gnu sed with --posix the following works for me (I dropped the --posix). Does it help ?
Yes, it does. Thanks.
Thanks, changeloged and signed-off-by-ed version below.
Ian.
8<----------------
# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1305110703 -3600
# Node ID 58ace7f6b4b2ca6ebe484779f331fa60bd75c83b # Parent e0e7fec9df32ac865a93f63d2ab21b98653efe14
tools: ocaml: remove non-posix-ism from sed script.
Christoph Egger reported than on NetBSD the build fails with
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'
The following was tested by Christoph on NetBSD and also with GNU-sed with and without the --posix flag.
tools/ocaml/libs/xl/Makefile +2 -2
@@ -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\ *)\
Quoted 15 lines · Ian Campbell
Quoted 14 lines · Christoph Egger
Quoted 13 lines · Ian Campbell
Quoted 8 lines · Christoph Egger
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/Makefilehas some non-posix-ism in it.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Using gnu sed with --posix the following works for me (I dropped the --posix). Does it help ?
Yes, it does. Thanks.
Thanks, changeloged and signed-off-by-ed version below.
Please commit.
Christoph
Quoted 48 lines
Ian.
8<----------------
# HG changeset patch
# User Ian Campbell<[email protected]> # Date 1305110703 -3600
# Node ID58ace7f6b4b2ca6ebe484779f331fa60bd75c83b# Parente0e7fec9df32ac865a93f63d2ab21b98653efe14
tools: ocaml: remove non-posix-ism from sed script.Christoph Egger reported than on NetBSD the build fails with
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'The following was tested by Christoph on NetBSD and also with GNU-sed with and without the --posix flag.
Signed-off-by Ian Campbell<[email protected]>diff -r
e0e7fec9df32-r58ace7f6b4b2tools/ocaml/libs/xl/Makefiletools/ocaml/libs/xl/Makefile +2
-2@@ -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\ *)\
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Christoph Egger
Acked-byQuoted 40 lines · Ian Campbell
Quoted 11 lines · Christoph Egger
Quoted 10 lines · Ian Campbell
Quoted 8 lines · Christoph Egger
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'Quoted 7 lines
Quoted 5 lines
I guess the sed script in
tools/ocaml/libs/xl/Makefilehas some non-posix-ism in it.Using gnu sed with --posix the following works for me (I dropped the --posix). Does it help ?
Yes, it does. Thanks.
Thanks, changeloged and signed-off-by-ed version below.
Ian.
8<----------------
# HG changeset patch
# User Ian Campbell<[email protected]> # Date 1305110703 -3600
# Node ID58ace7f6b4b2ca6ebe484779f331fa60bd75c83b# Parente0e7fec9df32ac865a93f63d2ab21b98653efe14
tools: ocaml: remove non-posix-ism from sed script.Christoph Egger reported than on NetBSD the build fails with
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'
Quoted 4 lines
The following was tested by Christoph on NetBSD and also with GNU-sed with and without the --posix flag.
Signed-off-by Ian Campbell<[email protected]>
Quoted 25 lines
diff -r
e0e7fec9df32-r58ace7f6b4b2tools/ocaml/libs/xl/Makefiletools/ocaml/libs/xl/Makefile +2
-2@@ -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\ *)\
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Quoted 10 lines · Ian Campbell
Quoted 8 lines · Christoph Egger
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'
Quoted 5 lines
I guess the sed script in
tools/ocaml/libs/xl/Makefilehas 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'
Quoted 25 lines
diff -r
72bba600f23btools/ocaml/libs/xl/Makefiletools/ocaml/libs/xl/Makefile +2
-2@@ -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\ *)\
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Quoted 20 lines · Christoph Egger
Quoted 10 lines · Ian Campbell
Quoted 8 lines · Christoph Egger
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'Quoted 5 lines
I guess the sed script in
tools/ocaml/libs/xl/Makefilehas 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.
Quoted 6 lines
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.
Quoted 29 lines
Quoted 27 lines
diff -r
72bba600f23btools/ocaml/libs/xl/Makefiletools/ocaml/libs/xl/Makefile +2
-2@@ -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\ *)\
Quoted 30 lines · Ian Campbell
Quoted 20 lines · Christoph Egger
Quoted 10 lines · Ian Campbell
Quoted 8 lines · Christoph Egger
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'Quoted 5 lines
I guess the sed script in
tools/ocaml/libs/xl/Makefilehas 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.
Quoted 6 lines
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?
Quoted 8 lines
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
With attached xen_tools_ocaml.diff a xl.ml file is generated w/o having sed complaining.
xl.mli is not generated at all.
I attached xl.ml. Can you check if this is the expected result, please?
Christoph
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
tools/ocaml/libs/xl/Makefile +4 -2
@@ -24,7 +24,8 @@ 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 +34,8 @@ 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\ *)\
(*
* AUTO-GENERATED FILE DO NOT EDIT
* Generated from xl.ml.in and _libxl_types.ml.in
*)
(*
* Copyright (C) 2009-2011 Citrix Ltd.
* Author Vincent Hanquez <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; version 2.1 only. with the special
* exception on linking described in file LICENSE.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*)
exception Error of string
type domid = int
(* @@LIBXL_TYPES@@ *)
(* AUTO-GENERATED FILE DO NOT EDIT *)
(* autogenerated by
genwrap.py /data/xen/xen-staging-netbsd.hg/tools/ocaml/libs/xl/../../../../tools/libxl/libxl.idl _libxl_types.mli.in _libxl_types.ml.in _libxl_types.inc
*)
type domain_type =
| DOMAIN_TYPE_FV
| DOMAIN_TYPE_PV
type device_model_version =
| DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL | DEVICE_MODEL_VERSION_QEMU_XEN
type console_type =
| CONSOLE_TYPE_SERIAL
| CONSOLE_TYPE_PV
type console_backend =
| CONSOLE_BACKEND_XENCONSOLED
| CONSOLE_BACKEND_IOEMU
type disk_format =
| DISK_FORMAT_UNKNOWN | DISK_FORMAT_QCOW | DISK_FORMAT_QCOW2 | DISK_FORMAT_VHD | DISK_FORMAT_RAW | DISK_FORMAT_EMPTY
type disk_backend =
| DISK_BACKEND_UNKNOWN | DISK_BACKEND_PHY | DISK_BACKEND_TAP | DISK_BACKEND_QDISK
type nic_type =
| NIC_TYPE_IOEMU
| NIC_TYPE_VIF
type action_on_shutdown =
| ACTION_ON_SHUTDOWN_DESTROY | ACTION_ON_SHUTDOWN_RESTART | ACTION_ON_SHUTDOWN_RESTART_RENAME | ACTION_ON_SHUTDOWN_PRESERVE | ACTION_ON_SHUTDOWN_COREDUMP_DESTROY | ACTION_ON_SHUTDOWN_COREDUMP_RESTART
type event_type =
| EVENT_TYPE_DOMAIN_DEATH
| EVENT_TYPE_DISK_EJECT
type button =
| BUTTON_POWER
| BUTTON_SLEEP
module Dominfo = struct
type t =
{
uuid : int array;
domid : domid;
running : bool;
blocked : bool;
paused : bool;
shutdown : bool;
dying : bool;
shutdown_reason : int;
current_memkb : int64;
max_memkb : int64;
cpu_time : int64;
vcpu_max_id : int32;
vcpu_online : int32;
}end
module Vminfo = struct
type t =
{
uuid : int array;
domid : domid;
}end
module Version_info = struct
type t =
{
xen_version_major : int;
xen_version_minor : int;
xen_version_extra : string;
compiler : string;
compile_by : string;
compile_domain : string;
compile_date : string;
capabilities : string;
changeset : string;
virt_start : int64;
pagesize : int;
commandline : string;
}end
module Device_vfb = struct
type t =
{
backend_domid : domid;
devid : int;
vnc : bool;
vnclisten : string;
vncpasswd : string;
vncdisplay : int;
vncunused : bool;
keymap : string;
sdl : bool;
opengl : bool;
display : string;
xauthority : string;
}
external add : t -> domid -> unit = "stub_xl_device_vfb_add"
external clean_shutdown : domid -> unit = "stub_xl_device_vfb_clean_shutdown"
external hard_shutdown : domid -> unit = "stub_xl_device_vfb_hard_shutdown"end
module Device_vkb = struct
type t =
{
backend_domid : domid;
devid : int;
}
external add : t -> domid -> unit = "stub_xl_device_vkb_add"
external clean_shutdown : domid -> unit = "stub_xl_device_vkb_clean_shutdown"
external hard_shutdown : domid -> unit = "stub_xl_device_vkb_hard_shutdown"end
module Device_console = struct
type t =
{
backend_domid : domid;
devid : int;
consback : console_backend;
output : string;
}
external add : t -> domid -> unit = "stub_xl_device_console_add"end
module Device_disk = struct
type t =
{
backend_domid : domid;
pdev_path : string;
vdev : string;
backend : disk_backend;
format : disk_format;
unpluggable : int;
readwrite : int;
is_cdrom : int;
}
external add : t -> domid -> unit = "stub_xl_device_disk_add"
external del : t -> domid -> unit = "stub_xl_device_disk_del"end
module Device_nic = struct
type t =
{
backend_domid : domid;
devid : int;
mtu : int;
model : string;
mac : int array;
ip : string;
bridge : string;
ifname : string;
script : string;
nictype : nic_type;
}
external add : t -> domid -> unit = "stub_xl_device_nic_add"
external del : t -> domid -> unit = "stub_xl_device_nic_del"end
module Device_pci = struct
type t =
{
func : int;
dev : int;
bus : int;
domain : int;
vdevfn : int32;
vfunc_mask : int32;
msitranslate : bool;
power_mgmt : bool;
}
external add : t -> domid -> unit = "stub_xl_device_pci_add"
external remove : t -> domid -> unit = "stub_xl_device_pci_remove"
external shutdown : domid -> unit = "stub_xl_device_pci_shutdown"end
module Diskinfo = struct
type t =
{
backend : string;
backend_id : int32;
frontend : string;
frontend_id : int32;
devid : int;
state : int;
evtch : int;
rref : int;
}end
module Nicinfo = struct
type t =
{
backend : string;
backend_id : int32;
frontend : string;
frontend_id : int32;
devid : int;
state : int;
script : string;
mac : int array;
evtch : int;
rref_tx : int;
rref_rx : int;
}end
module Physinfo = struct
type t =
{
threads_per_core : int32;
cores_per_socket : int32;
max_cpu_id : int32;
nr_cpus : int32;
cpu_khz : int32;
total_pages : int64;
free_pages : int64;
scrub_pages : int64;
nr_nodes : int32;
hw_cap : int32 array;
phys_cap : int32;
}
external get : unit -> t = "stub_xl_physinfo_get"end
module Sched_credit = struct
type t =
{
weight : int;
cap : int;
}
external domain_get : domid -> t = "stub_xl_sched_credit_domain_get"
external domain_set : domid -> t -> unit = "stub_xl_sched_credit_domain_set"end
(* END OF AUTO-GENERATED CODE *)
module Topologyinfo = struct
type t =
{
core : int;
socket : int;
node : int;
}
external get : unit -> t = "stub_xl_topologyinfo"end
external button_press : domid -> button -> unit = "stub_xl_button_press"
external send_trigger : domid -> string -> int -> unit = "stub_xl_send_trigger" external send_sysrq : domid -> char -> unit = "stub_xl_send_sysrq" external send_debug_keys : domid -> string -> unit = "stub_xl_send_debug_keys"
let _ = Callback.register_exception "xl.error" (Error "register_callback")
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Christoph Egger
With attached xen_tools_ocaml.diff a xl.ml file is generated w/o having sed complaining.
Thanks.
Quoted 1 line
xl.mli is not generated at all.
I think that's a different issue to do with creating the file when the sed actually failed. Fixed by creating a temporary and moving it into place...
Quoted 1 line
I attached xl.ml. Can you check if this is the expected result, please?
Looks correct to me.
8<---------------------------
# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1305201511 -3600
# Node ID 50728eaf50735b58d83484845312fe5467f6420c # Parent 1e7ebf81f49d43b1a972ff31a284b80ac68f6f1b
tools: ocaml: remove non-posix-ism from sed script.
Christoph Egger reported than on NetBSD the build fails with
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'
The following was tested by Christoph on NetBSD and also with GNU-sed with and without the --posix flag.
In addition when sed fails will still create the output file, which confuses subsequent make invocations. Generate to a temporary file and move into place only on success.
tools/ocaml/libs/xl/Makefile +9 -5
@@ -17,29 +17,33 @@ xl_C_OBJS = xl_stubs OCAML_LIBRARY = xl -GENERATED_FILES += xl.ml xl.mli +GENERATED_FILES += xl.ml xl.ml.tmp xl.mli xl.mli.tmp GENERATED_FILES += _libxl_types.ml.in _libxl_types.mli.in 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in' \ - < xl.ml.in > xl.ml + < xl.ml.in > xl.ml.tmp + $(Q)mv xl.ml.tmp 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.mli.in' \ - < xl.mli.in > xl.mli + < xl.mli.in > xl.mli.tmp + $(Q)mv xl.mli.tmp xl.mli _libxl_types.ml.in _libxl_types.mli.in _libxl_types.inc: genwrap.py $(XEN_ROOT)/tools/libxl/libxl.idl \ $(XEN_ROOT)/tools/libxl/libxltypes.py
Christoph Egger
Acked-byQuoted 8 lines · Ian Campbell
Quoted 2 lines · Christoph Egger
With attached xen_tools_ocaml.diff a xl.ml file is generated w/o having sed complaining.
Thanks.
Quoted 1 line
xl.mli is not generated at all.
Quoted 7 lines
I think that's a different issue to do with creating the file when the sed actually failed. Fixed by creating a temporary and moving it into place...
Quoted 1 line
I attached xl.ml. Can you check if this is the expected result, please?
Looks correct to me.
Quoted 71 lines
8<---------------------------
# HG changeset patch
# User Ian Campbell<[email protected]> # Date 1305201511 -3600
# Node ID50728eaf50735b58d83484845312fe5467f6420c# Parent1e7ebf81f49d43b1a972ff31a284b80ac68f6f1b
tools: ocaml: remove non-posix-ism from sed script.Christoph Egger reported than on NetBSD the build fails with
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'The following was tested by Christoph on NetBSD and also with GNU-sed with and without the --posix flag.
In addition when sed fails will still create the output file, which confuses subsequent make invocations. Generate to a temporary file and move into place only on success.
Signed-off-by Ian Campbell<[email protected]>diff -r
1e7ebf81f49d-r50728eaf5073tools/ocaml/libs/xl/Makefiletools/ocaml/libs/xl/Makefile +9
-5@@ -17,29 +17,33 @@ xl_C_OBJS = xl_stubs OCAML_LIBRARY = xl -GENERATED_FILES += xl.ml xl.mli +GENERATED_FILES += xl.ml xl.ml.tmp xl.mli xl.mli.tmp GENERATED_FILES += _libxl_types.ml.in _libxl_types.mli.in 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in' \ - < xl.ml.in> xl.ml + < xl.ml.in> xl.ml.tmp + $(Q)mv xl.ml.tmp 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.mli.in' \ - < xl.mli.in> xl.mli + < xl.mli.in> xl.mli.tmp + $(Q)mv xl.mli.tmp xl.mli _libxl_types.ml.in _libxl_types.mli.in _libxl_types.inc: genwrap.py $(XEN_ROOT)/tools/libxl/libxl.idl \ $(XEN_ROOT)/tools/libxl/libxltypes.py
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Is there a problem with committing this patch?
Christoph
Quoted 92 lines · Christoph Egger
Quoted 8 lines · Ian Campbell
Quoted 2 lines · Christoph Egger
With attached xen_tools_ocaml.diff a xl.ml file is generated w/o having sed complaining.
Thanks.
Quoted 1 line
xl.mli is not generated at all.
Quoted 7 lines
I think that's a different issue to do with creating the file when the sed actually failed. Fixed by creating a temporary and moving it into place...
Quoted 1 line
I attached xl.ml. Can you check if this is the expected result, please?
Looks correct to me.
Acked-by Christoph Egger<[email protected]>Quoted 71 lines
8<---------------------------
# HG changeset patch
# User Ian Campbell<[email protected]> # Date 1305201511 -3600
# Node ID50728eaf50735b58d83484845312fe5467f6420c# Parent1e7ebf81f49d43b1a972ff31a284b80ac68f6f1b
tools: ocaml: remove non-posix-ism from sed script.Christoph Egger reported than on NetBSD the build fails with
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'The following was tested by Christoph on NetBSD and also with GNU-sed with and without the --posix flag.
In addition when sed fails will still create the output file, which confuses subsequent make invocations. Generate to a temporary file and move into place only on success.
Signed-off-by Ian Campbell<[email protected]>diff -r
1e7ebf81f49d-r50728eaf5073tools/ocaml/libs/xl/Makefiletools/ocaml/libs/xl/Makefile +9
-5@@ -17,29 +17,33 @@ xl_C_OBJS = xl_stubs OCAML_LIBRARY = xl -GENERATED_FILES += xl.ml xl.mli +GENERATED_FILES += xl.ml xl.ml.tmp xl.mli xl.mli.tmp GENERATED_FILES += _libxl_types.ml.in _libxl_types.mli.in 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in' \ - < xl.ml.in> xl.ml + < xl.ml.in> xl.ml.tmp + $(Q)mv xl.ml.tmp 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.mli.in' \ - < xl.mli.in> xl.mli + < xl.mli.in> xl.mli.tmp + $(Q)mv xl.mli.tmp xl.mli _libxl_types.ml.in _libxl_types.mli.in _libxl_types.inc: genwrap.py $(XEN_ROOT)/tools/libxl/libxl.idl \ $(XEN_ROOT)/tools/libxl/libxltypes.py
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Quoted 1 line · Christoph Egger
Is there a problem with committing this patch?
Ian J has been away. I expect he's still catching up on his mail backlog.
Ian.
Quoted 99 lines
Christoph
Quoted 92 lines · Christoph Egger
Quoted 8 lines · Ian Campbell
Quoted 2 lines · Christoph Egger
With attached xen_tools_ocaml.diff a xl.ml file is generated w/o having sed complaining.
Thanks.
Quoted 1 line
xl.mli is not generated at all.
Quoted 7 lines
I think that's a different issue to do with creating the file when the sed actually failed. Fixed by creating a temporary and moving it into place...
Quoted 1 line
I attached xl.ml. Can you check if this is the expected result, please?
Looks correct to me.
Acked-by Christoph Egger<[email protected]>Quoted 71 lines
8<---------------------------
# HG changeset patch
# User Ian Campbell<[email protected]> # Date 1305201511 -3600
# Node ID50728eaf50735b58d83484845312fe5467f6420c# Parent1e7ebf81f49d43b1a972ff31a284b80ac68f6f1b
tools: ocaml: remove non-posix-ism from sed script.Christoph Egger reported than on NetBSD the build fails with
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'The following was tested by Christoph on NetBSD and also with GNU-sed with and without the --posix flag.
In addition when sed fails will still create the output file, which confuses subsequent make invocations. Generate to a temporary file and move into place only on success.
Signed-off-by Ian Campbell<[email protected]>diff -r
1e7ebf81f49d-r50728eaf5073tools/ocaml/libs/xl/Makefiletools/ocaml/libs/xl/Makefile +9
-5@@ -17,29 +17,33 @@ xl_C_OBJS = xl_stubs OCAML_LIBRARY = xl -GENERATED_FILES += xl.ml xl.mli +GENERATED_FILES += xl.ml xl.ml.tmp xl.mli xl.mli.tmp GENERATED_FILES += _libxl_types.ml.in _libxl_types.mli.in 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in' \ - < xl.ml.in> xl.ml + < xl.ml.in> xl.ml.tmp + $(Q)mv xl.ml.tmp 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.mli.in' \ - < xl.mli.in> xl.mli + < xl.mli.in> xl.mli.tmp + $(Q)mv xl.mli.tmp xl.mli _libxl_types.ml.in _libxl_types.mli.in _libxl_types.inc: genwrap.py $(XEN_ROOT)/tools/libxl/libxl.idl \ $(XEN_ROOT)/tools/libxl/libxltypes.py
Quoted 5 lines · Ian Campbell
Quoted 1 line · Christoph Egger
Is there a problem with committing this patch?
Ian J has been away. I expect he's still catching up on his mail backlog.
Please commit it when Ian Jackson is overloaded. The build is broken for a pretty long time now.
Christoph
Quoted 95 lines
Ian.
Quoted 93 lines
Christoph
Quoted 88 lines · Christoph Egger
Quoted 8 lines · Ian Campbell
Quoted 2 lines · Christoph Egger
With attached xen_tools_ocaml.diff a xl.ml file is generated w/o having sed complaining.
Thanks.
Quoted 1 line
xl.mli is not generated at all.
Quoted 7 lines
I think that's a different issue to do with creating the file when the sed actually failed. Fixed by creating a temporary and moving it into place...
Quoted 1 line
I attached xl.ml. Can you check if this is the expected result, please?
Looks correct to me.
Acked-by Christoph Egger<[email protected]>Quoted 69 lines
8<---------------------------
# HG changeset patch
# User Ian Campbell<[email protected]> # Date 1305201511 -3600
# Node ID50728eaf50735b58d83484845312fe5467f6420c# Parent1e7ebf81f49d43b1a972ff31a284b80ac68f6f1b
tools: ocaml: remove non-posix-ism from sed script.Christoph Egger reported than on NetBSD the build fails with
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'The following was tested by Christoph on NetBSD and also with GNU-sed with and without the --posix flag.
In addition when sed fails will still create the output file, which confuses subsequent make invocations. Generate to a temporary file and move into place only on success.
Signed-off-by Ian Campbell<[email protected]>diff -r
1e7ebf81f49d-r50728eaf5073tools/ocaml/libs/xl/Makefiletools/ocaml/libs/xl/Makefile +9
-5@@ -17,29 +17,33 @@ xl_C_OBJS = xl_stubs OCAML_LIBRARY = xl -GENERATED_FILES += xl.ml xl.mli +GENERATED_FILES += xl.ml xl.ml.tmp xl.mli xl.mli.tmp GENERATED_FILES += _libxl_types.ml.in _libxl_types.mli.in 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.ml.in' \ - < xl.ml.in> xl.ml + < xl.ml.in> xl.ml.tmp + $(Q)mv xl.ml.tmp 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\ *)\ ' \ -e '/^(\* @@LIBXL_TYPES@@ \*)$$/r_libxl_types.mli.in' \ - < xl.mli.in> xl.mli + < xl.mli.in> xl.mli.tmp + $(Q)mv xl.mli.tmp xl.mli _libxl_types.ml.in _libxl_types.mli.in _libxl_types.inc: genwrap.py $(XEN_ROOT)/tools/libxl/libxl.idl \ $(XEN_ROOT)/tools/libxl/libxltypes.py
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Christoph Egger writes ("Re: [Xen-devel] tools: ocaml build error"):
Quoted 9 lines · Ian Campbell
Quoted 5 lines · Christoph Egger
Quoted 1 line
Is there a problem with committing this patch?
Ian J has been away. I expect he's still catching up on his mail backlog.
Please commit it when Ian Jackson is overloaded. The build is broken for a pretty long time now.
This is in my queue and I will apply it today.
Ian.
Re: tools: ocaml build error [and 1 more messages]
In reply to Ian CampbellIan Campbell writes ("Re: [Xen-devel] tools: ocaml build error"):
Quoted 1 line
tools: ocaml: remove non-posix-ism from sed script.
Christoph Egger writes ("Re: [Xen-devel] tools: ocaml build error"):
Quoted 1 line
Acked-by Christoph Egger <[email protected]>
Thanks, I have committed the patch.
Ian.