Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EB80C43331 for ; Sun, 29 Mar 2020 17:19:57 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C2912076E for ; Sun, 29 Mar 2020 17:19:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="N9hflV2U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C2912076E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jIbag-0005HY-83; Sun, 29 Mar 2020 17:19:18 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jIbae-0005HT-Vf for xen-devel@lists.xenproject.org; Sun, 29 Mar 2020 17:19:17 +0000 X-Inumbo-ID: 6adff2ce-71e1-11ea-b34e-bc764e2007e4 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 6adff2ce-71e1-11ea-b34e-bc764e2007e4; Sun, 29 Mar 2020 17:19:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3r2xmY8rJjGGcpqpKHBDQ2I9pxZnSk0Oh4kuDuBGg04=; b=N9hflV2UkMiF22YeXWiwrKvoiN 2fRJztUtM9dT2G9nb6rhAR7lT28HHN0i8tqeDir6V0SILqqtuwfYUSyVkfl4PsuUAY1+HwTXh5731 wV5aAPF0D9kmfm9QpThEVZJ4GUIRK/5rl8C+gDjQLj82tAudeooCNlMUr+7FvfDBH6QY=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jIbae-0008OW-2s; Sun, 29 Mar 2020 17:19:16 +0000 Received: from [54.239.6.185] (helo=a483e7b01a66.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jIbad-0003XX-SZ; Sun, 29 Mar 2020 17:19:16 +0000 To: Dario Faggioli , xen-devel@lists.xenproject.org References: From: Julien Grall Message-ID: <671346c5-cb0c-4bc9-8124-07beeb5cbf73@xen.org> Date: Sun, 29 Mar 2020 18:19:14 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [Xen-devel] Tools build failure with gcc-9.2.1 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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