GNU bug report logs - #38061
[minimal reproducer included] libstdc++ mutex references cause clang builds to fail

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Carl Dong <contact@HIDDEN>; Done: Mathieu Othacehe <m.othacehe@HIDDEN>; Maintainer for guix is bug-guix@HIDDEN.
bug closed, send any further explanations to 38061 <at> debbugs.gnu.org and Carl Dong <contact@HIDDEN> Request was from Mathieu Othacehe <m.othacehe@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 38061 <at> debbugs.gnu.org:


Received: (at 38061) by debbugs.gnu.org; 5 Nov 2019 08:00:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 05 03:00:15 2019
Received: from localhost ([127.0.0.1]:37854 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iRtl4-0007xF-QK
	for submit <at> debbugs.gnu.org; Tue, 05 Nov 2019 03:00:13 -0500
Received: from mail-wm1-f48.google.com ([209.85.128.48]:52333)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <m.othacehe@HIDDEN>) id 1iRtl2-0007vo-AC
 for 38061 <at> debbugs.gnu.org; Tue, 05 Nov 2019 03:00:08 -0500
Received: by mail-wm1-f48.google.com with SMTP id c17so12307735wmk.2
 for <38061 <at> debbugs.gnu.org>; Tue, 05 Nov 2019 00:00:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=references:user-agent:from:to:cc:subject:in-reply-to:date
 :message-id:mime-version;
 bh=hXf8Po0VMqgXjRQ9sjfgOVpc8WZufAHf/jkA3dwPf6o=;
 b=MDFsuKMWZcxuGlIoXQY89li0P36UoZEq8B5Ohn9d+mMCEsep2yXjl1CciojXt9mPQl
 VauPSHf2s2/4Y3MPAquRiSeOe2DVDpUAqoTp/AlIHuqFzhiUS3rRXHlqprM1F7ZjKkpd
 Z0GcCVK5r/gntJ2XWlFvMaWp2q85zdn1z5gMEHaLKxk6ZMEWU7HeW7P57FkXqmQdDzLL
 p9ASKYxo+idpTZcqPZq8mSqlYnFBQDVpIczFXE4JE3ehs7OiNEMNksZV8Emsi1WuvYnT
 0FQT3MaueVMWeTFIn0GvsllfdtVItUXoMMdyX/rTqr9CUDuL2IvoRJpTVzr1N4VDhO7b
 ABpg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:references:user-agent:from:to:cc:subject
 :in-reply-to:date:message-id:mime-version;
 bh=hXf8Po0VMqgXjRQ9sjfgOVpc8WZufAHf/jkA3dwPf6o=;
 b=MU4QscfXbInsH4M2Gu4Nt2F04VrpXFmE1c0t7gLXZPJb8CfNOE6sLcBFfr6IYBrWIE
 qtF0EYj1bdJRzogLi63ItU/Y82sWS5lQ48j3ZXLy1FcZYPgXQrTereYLsnqgDGl/1Rn9
 MMePMUcz0jS3Ycldygzg82N129eiMFy9oKyCuCzn+HmhzfYAy5bOJEJgr8mPRpq5uxB+
 uf+hfSKf2wsLSCnzK5NfixY/QvxM/iAstuPWWymykJoYzIqy+vQHBwl1HcQYbkhI1X3Y
 UPQUrcu0u7oR9LoTZ3bd6UDA9Wax7fZQ8KeVTJnDNUaNV2KjdhfgJ7xeMpPAe9+0A7Oj
 WB7Q==
X-Gm-Message-State: APjAAAWAkApr2JXFTK6StNKpKu9JTjlhP/Pe7XzpjtYRiURL1QejVAez
 XKbrO9NzMqPBW8FYhkEh79/xO75W
X-Google-Smtp-Source: APXvYqzlfqKgpdXnIq2jUi0uV95Ma2AH0j1OOiBhv2/6uVgMiIV1K5huGCtr4nsCMpD5Id7+FLyOLQ==
X-Received: by 2002:a1c:28d4:: with SMTP id o203mr2908472wmo.147.1572940802113; 
 Tue, 05 Nov 2019 00:00:02 -0800 (PST)
Received: from meru (lfbn-ann-1-272-170.w86-200.abo.wanadoo.fr.
 [86.200.227.170])
 by smtp.gmail.com with ESMTPSA id 16sm21668108wmf.0.2019.11.05.00.00.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 05 Nov 2019 00:00:01 -0800 (PST)
References: <eSiTW2UUtJTf6u776pRq9IOn0Xtf_AMbFsdU--q4iYhE7pmUIrwF33afcWOEbkZOectVMQguqzmyyC-hIu4HRyZS1yS2gAZFePj2SF2tPUA=@carldong.me>
User-agent: mu4e 1.2.0; emacs 26.3
From: Mathieu Othacehe <m.othacehe@HIDDEN>
To: Carl Dong <contact@HIDDEN>
Subject: Re: bug#38061: [minimal reproducer included] libstdc++ mutex
 references cause clang builds to fail
In-reply-to: <eSiTW2UUtJTf6u776pRq9IOn0Xtf_AMbFsdU--q4iYhE7pmUIrwF33afcWOEbkZOectVMQguqzmyyC-hIu4HRyZS1yS2gAZFePj2SF2tPUA=@carldong.me>
Date: Tue, 05 Nov 2019 08:59:59 +0100
Message-ID: <87eeymrbwg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38061
Cc: 38061 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Hello Carl,

> In my original non-minimal build, other things in <mutex> also cause compilation
> errors, which seem odd to me.

This problem is not directly related to <mutex>. You'll have the same
issue with <list>, <vector> or any other header from stdlib.

As explained here:
https://www.mail-archive.com/guix-devel@HIDDEN/msg50183.html, the root
cause is that clang cannot find libstdc++ headers which paths are
hardcoded into gcc.

We need to find a clean way to hardcode those paths into clang. However,
I'm not sure on how to proceed cleanly.

Mathieu




Information forwarded to bug-guix@HIDDEN:
bug#38061; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Nov 2019 20:30:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 04 15:30:02 2019
Received: from localhost ([127.0.0.1]:37602 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iRizB-0001h0-KF
	for submit <at> debbugs.gnu.org; Mon, 04 Nov 2019 15:30:02 -0500
Received: from lists.gnu.org ([209.51.188.17]:52864)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contact@HIDDEN>) id 1iRiz9-0001ga-7D
 for submit <at> debbugs.gnu.org; Mon, 04 Nov 2019 15:29:59 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:43512)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <contact@HIDDEN>) id 1iRiz8-000158-08
 for bug-guix@HIDDEN; Mon, 04 Nov 2019 15:29:59 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <contact@HIDDEN>) id 1iRiz6-0002wv-PF
 for bug-guix@HIDDEN; Mon, 04 Nov 2019 15:29:57 -0500
Received: from mail4.protonmail.ch ([185.70.40.27]:34638)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <contact@HIDDEN>) id 1iRiz6-0002w0-Er
 for bug-guix@HIDDEN; Mon, 04 Nov 2019 15:29:56 -0500
Date: Mon, 04 Nov 2019 20:29:46 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carldong.me;
 s=protonmail; t=1572899392;
 bh=jMV5X433KJ1bTKOFUBgbFLCtbO/CNpABDnTPigDTBdk=;
 h=Date:To:From:Reply-To:Subject:Feedback-ID:From;
 b=Qh15B000+gp6Kq6r3qNxS/XL48bjfzp0LPoApU6uuJaaVQpsDQqbyhO1mm+2XNItP
 YREOmh/c8g/snYUdmjUG87lBTII6zczM+WRh+UhnHFztcde+wkuMTr8iuCv/Te5sXm
 uP4+1b1gfTiAHP/spnWfTDGCrCRSjEXxtIgN+KMw=
To: "bug-guix@HIDDEN" <bug-guix@HIDDEN>
From: Carl Dong <contact@HIDDEN>
Subject: [minimal reproducer included] libstdc++ mutex references cause clang
 builds to fail
Message-ID: <eSiTW2UUtJTf6u776pRq9IOn0Xtf_AMbFsdU--q4iYhE7pmUIrwF33afcWOEbkZOectVMQguqzmyyC-hIu4HRyZS1yS2gAZFePj2SF2tPUA=@carldong.me>
Feedback-ID: a8j8tDUaJ4AYuDVBywMTwsJebN4w8TVXadJLsJb8td3t3dZi9RdXFlPaQvoFKnI9KgXySsPXcRkajVyY0cGTcA==:Ext:ProtonMail
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 185.70.40.27
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Carl Dong <contact@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi all,

I'm having another issue with the clang toolchain right now and I've come u=
p
with a minimal reproducer:

Given the following manifest.scm:
--8<---------------cut here---------------start------------->8---
(use-modules (gnu packages gcc)
             (gnu packages linux)
             (gnu packages llvm))

(packages->manifest
 (list clang
       (make-libstdc++ gcc)
       linux-libre-headers))
--8<---------------cut here---------------end--------------->8---

And test.cpp:
--8<---------------cut here---------------start------------->8---
#include <mutex>
#include <iostream>

typedef std::once_flag once_flag;

int
main()
{
    std::cout << "Hello, World\n";
}
--8<---------------cut here---------------end--------------->8---

If you invoke:
--8<---------------cut here---------------start------------->8---
guix environment --manifest=3Dmanifest.scm --container --pure -- clang++ te=
st.cpp
--8<---------------cut here---------------end--------------->8---

The output looks like:
--8<---------------cut here---------------start------------->8---
test.cpp:4:14: error: no type named 'once_flag' in namespace 'std'
typedef std::once_flag once_flag;
        ~~~~~^
1 error generated.
--8<---------------cut here---------------end--------------->8---

In my original non-minimal build, other things in <mutex> also cause compil=
ation
errors, which seem odd to me.

Any help would be very much appreciated!

Cheers,
Carl Dong
contact@HIDDEN
"I fight for the users"




Acknowledgement sent to Carl Dong <contact@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#38061; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 17 Nov 2019 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.