[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 2 Mar 2021 10:36:51 +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=q1V4qtXOqAZV214T8ZG4+w9fSzWEz4yMli4sz2t59/E=; b=LC4FDXw4iFdF7HMk+pho5uGWB/Zwahz3a+yV29v9tUegmlG8tAP6amz6yxfjydZ5SEVHvt2NqTzBXV3VI9X1R16UKsoOJrGObXHxrj5G0IAH2haQhIJbJqjCFP0zPRY15itAXTlSEk8X/F1aIvmjuI92czgPmC/swOwe9Y6Dinixwh4y7h8fRLiH/pADfoTc3qE1HSkLzBZ/kNTeUupvOqBMtgOQBbD/llPR7tO7R3XjxZt/e0gCZgK4p9lhApWFKW6utTsff22wtlG0JlV306EM+c9lRhhgr2YezcPO9KNXA7FRKdw5fJV+RYX+R9rNmGJTYZ5zhqH7K6PlA1SzwQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cRr5p7AUIGUsSHeSkuVVfiFHpnrfcp6b/NuH4IpYKhyjEkIYdRmzPV5aselm9KM/tvXaCB9pNQP0Z2sdHztnS1uxnTj6YzgYYli8bK+zHtsD6wGkRq67pefIA/TWzWWzNZIdK4IVtRTA6VhJ2kxh/kCnf5XHJxFL3oUVIX+YoTBkwWeCKJb7CXaWMt0YkBeuVgozkNmbEZOvD44RGkXiPvCUnnwwvlcWsMzrMVvFbhPalCp/SzL/ooiHMF5G8djT03HfM2coQK4YY/hHz1t6mT2d11X/Ap9KvPa8zpfldH1DIrWSwY8Z6S0DT9J/eab3Cg29nv3qFRki1YpKjtwiUA==
  • Authentication-results: esa3.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>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Tue, 02 Mar 2021 09:37:13 +0000
  • Ironport-sdr: q2ufSHc/nWBWG47euwiO9lmFT1VQrur8rjxjN2kYldhLYenyEofHzXxI5anXtrl9b41lZ3xb8K nT1VAYX6kk9kRf3q9iwj+UToMv9c5cu8Ce6A5KED5ymzSIOum6mxHm4SOSj2VuI6nikrc/w5+I XteKk+icJ9XFA51L3c8wNdcZC2wCNn3QDbc1uz96C49VqffJkIO1y32Bek/IbMVu8pVQXTCx// EhqjpQiA+Qh2GNC3y0FKs8+WNb161C1dvNCTtmaa+zui5iKrHCA95H3SFCUXJvFZ81+ljJqtrc 7lc=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Mar 02, 2021 at 09:53:41AM +0100, Jan Beulich wrote:
> On 02.03.2021 09:14, Roger Pau Monné wrote:
> > 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.
> 
> I have to admit that I consider this odd. The g++ package should
> neither provide nor depend on the headers. It may recommend their
> installation. On my distro (SLES) the headers come from the
> libstdc++-devel package, as I would have expected. There
> additionally is a dependency of libclang5 (no -devel suffix!) on
> libstdc++-devel (I suppose this is an indication that things
> aren't quite right here either; I haven't checked an up-to-date
> version of the distro yet, though).

Yes, that was indeed my first attempt as I've tried to install
libstdc++, but there's no -devel counterpart for the package, and it
only installs the libraries but not the headers.

Then if I list the contents of the g++ package, I do see:

...
usr/include/c++/10.2.1/cstring
...

And clang++'s include path is:

#include <...> search starts here:
 
/usr/bin/../lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../include/c++/10.2.1
 
/usr/bin/../lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../include/c++/10.2.1/x86_64-alpine-linux-musl
 
/usr/bin/../lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../include/c++/10.2.1/backward
 /usr/include
 /usr/lib/clang/10.0.1/include

So it does seem clang depends on the gcc c++ headers, I assume this is
done in order to avoid having a duplicate set of c++ headers for clang
and gcc? I really have no idea, but I do think clang package should
depend on g++.

Thanks, Roger.



 


Rackspace

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