* OCaml compilation issues (staging) under ARM32 (ocaml-4.01)
@ 2016-04-13 20:28 Konrad Rzeszutek Wilk
2016-04-13 21:06 ` Andrew Cooper
2016-04-14 11:26 ` Julien Grall
0 siblings, 2 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-04-13 20:28 UTC (permalink / raw)
To: julien.grall, sstabellini, xen-devel, jonathan.davies,
jonathan.ludlam, euan.harris, andrew.cooper3
Hey,
As I was testing xSplice I had compile issues to Andrew's CPUID work
which was easy to fix:
diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c
index 5477df3..881f1b4 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -1216,8 +1216,9 @@ CAMLprim value stub_xc_domain_deassign_device(value xch, value domid, value desc
CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx)
{
- CAMLparam2(xch, idx);
CAMLlocal1(bitmap_val);
+#if defined(__i386__) || defined(__x86_64__)
+ CAMLparam2(xch, idx);
/* Safe, because of the global ocaml lock. */
static uint32_t fs_len;
@@ -1245,7 +1246,9 @@ CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx)
for (i = 0; i < len; ++i)
Store_field(bitmap_val, i, caml_copy_int64(fs[i]));
}
-
+#else
+ caml_failwith("xc_domain_cpuid_set: not implemented");
+#endif
CAMLreturn(bitmap_val);
}
But then I hit on this:
[3]: Entering directory `/mnt/xen/tools/ocaml/libs'
make -C xc all
make[4]: Entering directory `/mnt/xen/tools/ocaml/libs/xc'
CC xenctrl_stubs.o
In file included from xenctrl_stubs.c:23:0:
xenctrl_stubs.c: In function 'stub_xc_get_cpu_featureset':
/usr/lib/ocaml/caml/memory.h:223:22: error: 'caml__frame' undeclared (first use in this function)
caml_local_roots = caml__frame; \
^
/usr/lib/ocaml/caml/memory.h:227:28: note: in expansion of macro 'CAMLreturnT'
#define CAMLreturn(result) CAMLreturnT(value, result)
^
xenctrl_stubs.c:1252:2: note: in expansion of macro 'CAMLreturn'
CAMLreturn(bitmap_val);
^
/usr/lib/ocaml/caml/memory.h:223:22: note: each undeclared identifier is reported only once for each function it appears in
caml_local_roots = caml__frame; \
^
/usr/lib/ocaml/caml/memory.h:227:28: note: in expansion of macro 'CAMLreturnT'
#define CAMLreturn(result) CAMLreturnT(value, result)
^
xenctrl_stubs.c:1252:2: note: in expansion of macro 'CAMLreturn'
CAMLreturn(bitmap_val);
^
make[4]: *** [xenctrl_stubs.o] Error 1
make[4]: Leaving directory `/mnt/xen/tools/ocaml/libs/xc'
diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c
This is running on ARM32 cubietruck running Linar something.
dpkg tells me:
root@cubietruck:~# dpkg -l | grep ocaml
ii libfindlib-ocaml 1.4-2 armhf library for managing OCaml libraries (runtime)
ii libfindlib-ocaml-dev 1.4-2 armhf library for managing OCaml libraries (development files)
ii ocaml 4.01.0-3ubuntu3 armhf ML language implementation with a class-based object system
ii ocaml-base 4.01.0-3ubuntu3 armhf Runtime system for OCaml bytecode executables
ii ocaml-base-nox 4.01.0-3ubuntu3 armhf Runtime system for OCaml bytecode executables (no X)
ii ocaml-compiler-libs 4.01.0-3ubuntu3 armhf OCaml interpreter and standard libraries
ii ocaml-findlib 1.4-2 armhf management tool for OCaml libraries
ii ocaml-interp 4.01.0-3ubuntu3 armhf OCaml interactive interpreter and standard libraries
ii ocaml-native-compilers 4.01.0-3ubuntu3 armhf Native code compilers of the OCaml suite (the .opt ones)
ii ocaml-nox 4.01.0-3ubuntu3 armhf ML implementation with a class-based object system (no X)
Ideas?
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: OCaml compilation issues (staging) under ARM32 (ocaml-4.01)
2016-04-13 20:28 OCaml compilation issues (staging) under ARM32 (ocaml-4.01) Konrad Rzeszutek Wilk
@ 2016-04-13 21:06 ` Andrew Cooper
2016-04-14 11:26 ` Julien Grall
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2016-04-13 21:06 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, julien.grall, sstabellini, xen-devel,
jonathan.davies, jonathan.ludlam, euan.harris
On 13/04/2016 21:28, Konrad Rzeszutek Wilk wrote:
> Hey,
>
> As I was testing xSplice I had compile issues to Andrew's CPUID work
> which was easy to fix:
>
> diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c
> index 5477df3..881f1b4 100644
> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> @@ -1216,8 +1216,9 @@ CAMLprim value stub_xc_domain_deassign_device(value xch, value domid, value desc
>
> CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx)
> {
> - CAMLparam2(xch, idx);
> CAMLlocal1(bitmap_val);
> +#if defined(__i386__) || defined(__x86_64__)
> + CAMLparam2(xch, idx);
The CAMLparam2 is mandatory. Even if the function has no arguments, you
need a CAMLparam0 to do prolog interaction with the runtime.
>
> /* Safe, because of the global ocaml lock. */
> static uint32_t fs_len;
> @@ -1245,7 +1246,9 @@ CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx)
> for (i = 0; i < len; ++i)
> Store_field(bitmap_val, i, caml_copy_int64(fs[i]));
> }
> -
> +#else
> + caml_failwith("xc_domain_cpuid_set: not implemented");
That would be "xc_get_cpu_featureset" rather than set, and you also need
to set ENOSYS in the xch last error.
OTOH, caml_failwith() is Noreturn, so you can use it without a
subsequent return statement.
> +#endif
> CAMLreturn(bitmap_val);
> }
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: OCaml compilation issues (staging) under ARM32 (ocaml-4.01)
2016-04-13 20:28 OCaml compilation issues (staging) under ARM32 (ocaml-4.01) Konrad Rzeszutek Wilk
2016-04-13 21:06 ` Andrew Cooper
@ 2016-04-14 11:26 ` Julien Grall
1 sibling, 0 replies; 3+ messages in thread
From: Julien Grall @ 2016-04-14 11:26 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, Ian Jackson
Cc: jonathan.davies, sstabellini, andrew.cooper3, jonathan.ludlam,
xen-devel, euan.harris
On 13/04/16 21:28, Konrad Rzeszutek Wilk wrote:
> Hey,
Hi Konrad,
> As I was testing xSplice I had compile issues to Andrew's CPUID work
> which was easy to fix:
Nice catch! It seems that osstest does not build the OCaml tools at all
on x86 and ARM because the compiler is not installed.
Ian is it intended?
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-14 11:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 20:28 OCaml compilation issues (staging) under ARM32 (ocaml-4.01) Konrad Rzeszutek Wilk
2016-04-13 21:06 ` Andrew Cooper
2016-04-14 11:26 ` Julien Grall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.