[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-4.15] automation/alpine: add g++ to the list of build depends


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 2 Mar 2021 09:14:44 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9mASKKHPaFRe5yQZgz7bVJnp0oWA64tl9OWZueHvhBo=; b=NjXLDXMzGedhxvAc+EVPPAJdgnmeo5LRgLz9QlrO2AxT0jgcCPHjkRlPVATYFVrr7i/+JzBVri97BgLk0lBrNVCpC8ow4N9G4NgKiAz/r+dunrrW9pPs3lXsB+mjXUXoebUwsZJZ/wQ/QQmaRUZM0R5HHZsBbehUurCAAXyGIg2/9gU8nT2H9uksmiaLWebGctbodRvCIkTXhemlwR1T/kvvJ27DXQ6N51w8kyjx0Xy75G7DZqlFGVfs+zBeJssAZOGOqa647zxhzHSA7xwRyQT/13w1o8+7KXmbZiQTCp1dWMZxt9HowpejsjfxwWS6NZA0N7IBcfAtW/RmpPEIiQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V1sJELANcE07129bXmUM5fzyPp1GnV6pz99xGGXNggyOE3i5Dmhp+7kRWIM+m8HZdWx/n6wJNYbBBPIgFMzMvPc0ke0tEYs1e9U50TqRBA0ajTr4tjuOn1IFh5clqqlP5vtQ9J0RUzpe8vcwjQUyVyCS/p3ZB4g8XYJ2dGCgP4pRQlFgrenRPEDjOIipIBhFm3IUkYUK2B8Cr3wdw9/RH60U7vte+/fvQhjELlX5uIlPXphuvjo5wfSh2n1D9jGNQNte3V0yjwNYRZpcESRZiQEl51dwH3r6MxE6jSMRM0GrX73omHijGzDOjcnFVK4LadMXe6H/bozmPZlEKUofig==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Tue, 02 Mar 2021 08:14:59 +0000
  • Ironport-sdr: Rk29h0pua5VNOheRRIUYNdeoS8Q1YOsOaWCgIsTUkUUH64q+NjaPXNg8PWoNquvIjc3MSDLCf/ 4CewCH7VKVSR65vHjGi5KPsvsZnb/g+qyFLtij6Wmw9zvOiLs1mkD6W+MfkYEU/Y9+Sp0hDVHI xhsti+6t6lowO14OMlH2I9xCbTAroDFc+T8R99OMZvgS9xne0mpetnJDzaZYDeovLGEP7Q55+r +8OOgk2FnSCKVTL9QogScnNw0V20pGMPoi3dIRVTJJPYr4qLNlr4s35Rn7YqtgB1pmVJ6A9FLP HCU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Mar 01, 2021 at 06:01:36PM +0000, Andrew Cooper wrote:
> On 01/03/2021 17:59, Andrew Cooper wrote:
> > On 01/03/2021 09:58, Roger Pau Monne wrote:
> >> clang++ relies on the C++ headers installed by g++, or else a clang
> >> build will hit the following error:
> >>
> >> <built-in>:3:10: fatal error: 'cstring' file not found
> >> #include "cstring"
> >>          ^~~~~~~~~
> >> 1 error generated.
> >> make[10]: *** [Makefile:120: headers++.chk] Error 1
> >>
> >> Reported-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> >> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> >> ---
> >> Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>
> >> No real risk here from a release PoV, it's just pulling a package
> >> required for the Alpine clang build. Worse that cold happen is that
> >> the Alpine clang build broke, but it's already broken.
> > Shouldn't this be fixed upstream in Alpine?  Its clearly a packaging bug.
> 
> Or (thinking about it), we've got a build system bug using g++ when it
> should be using clang++.

No, the check is using clang++, the issue is that clang++ doesn't
install the standard c++ headers, and thus trying to use them (cstring
in this case) fails. Installing the g++ package solves the issue
because it installs the headers.

> How does this check work (without g++) on a non-clang build?

It works because on a non-clang Alpine build g++ wasn't installed, so
the check wasd just skipped. The headers++.chk target in
xen/include/Makefile has a explicit check for a functional CXX.

I do think this is some kind of error in the Alpine clang package, as
I assume installing clang++ without the standard c++ headers is an
error. Regardless of that, I also think installing g++ on the Alpine
container is fine, as we would then also perform the C++ header checks
with g++ on the normal build.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.