[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Tools build failure with gcc-9.2.1
On 25/03/2020 09:40, Dario Faggioli wrote: Hello, Hi Dario, Are the following errors (and more similar ones): CC xenctrl_stubs.o In file included from /usr/lib64/ocaml/caml/alloc.h:24, from xenctrl_stubs.c:22: xenctrl_stubs.c: In function 'stub_xc_vcpu_context_get': /usr/lib64/ocaml/caml/mlvalues.h:265:24: error: passing argument 1 of 'memcpy' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 265 | #define String_val(x) ((const char *) Bp_val(x)) | ~^~~~~~~~~~~~~~~~~~~~~~~~~ xenctrl_stubs.c:502:9: note: in expansion of macro 'String_val' 502 | memcpy(String_val(context), (char *) &ctxt.c, sizeof(ctxt.c)); | ^~~~~~~~~~ In file included from xenctrl_stubs.c:30: /usr/include/string.h:43:14: note: expected 'void * restrict' but argument is of type 'const char *' 43 | extern void *memcpy (void *__restrict __dest, const void *__restrict __src, | ^~~~~~ When building with: gcc version 9.2.1 20200306 [revision c5edde44f5b17b4891f17a63517f355bbf89e7d3] (SUSE Linux) Already known and being dealt with? I suspect you have a new version of Ocaml built with -safe-string as per [1], String_Val() will return (const char *) rather than (char *). I am looking at writing a patch for it and send it to xen-devel. Cheers, [1] https://github.com/ocaml/ocaml/pull/1274 Regards -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |