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

Previous Next

Package: guix;

Reported by: Carl Dong <contact <at> carldong.me>

Date: Mon, 4 Nov 2019 20:31:02 UTC

Severity: normal

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Carl Dong <contact <at> carldong.me>
To: 38061 <at> debbugs.gnu.org
Subject: bug#38061: [minimal reproducer included] libstdc++ mutex references cause clang builds to fail
Date: Mon, 04 Nov 2019 20:29:46 +0000
Hi all,

I'm having another issue with the clang toolchain right now and I've come up
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=manifest.scm --container --pure -- clang++ test.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 compilation
errors, which seem odd to me.

Any help would be very much appreciated!

Cheers,
Carl Dong
contact <at> carldong.me
"I fight for the users"




This bug report was last modified 5 years and 272 days ago.

Previous Next


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