Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#29397 - Clang++ 3.0.2 not working with GCC 4.7

Attached to Project: Arch Linux
Opened by Nathan (Feydaykyn) - Wednesday, 11 April 2012, 21:11 GMT
Last edited by Evangelos Foutras (foutrelis) - Thursday, 12 April 2012, 16:12 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No



when trying to compile a simple helloworld in C++, I got :
In file included from main.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ios:42:
In file included from /usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h:40:
/usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h:48:45: error: use of undeclared identifier '__ATOMIC_ACQ_REL'
{ return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
/usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h:52:38: error: use of undeclared identifier '__ATOMIC_ACQ_REL'
{ __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
2 errors generated.
[1] 24967 exit 1 clang++ -W -Wextra -Wall main.cpp

Additional info:
* package version(s)
Clang 3.0.2
GCC 4.7

Steps to reproduce:
Compile a C++ project with Clang++

How to resolve:
Recompile Clang with GCC 4.7
   main.cpp (0.1 KiB)
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Thursday, 12 April 2012, 16:12 GMT
Reason for closing:  Deferred
Additional comments about closing:  Waiting for clang 3.1; hopefully it will be compatible with GCC 4.7.
Comment by Jan Stępień (janek) - Thursday, 12 April 2012, 14:24 GMT
I can confirm this problem. Recompiling Clang with GCC 4.7 does *not* solve it in my case, though.
Comment by Nathan (Feydaykyn) - Thursday, 12 April 2012, 14:57 GMT
I used the clang-svn package in AUR for recompiling :, so the issue must have been corrected along the way.
Some scarse informations exist :

The issue is caused by a mismatch between the clang and gcc teams; here is a discussion from Clang devel mailing list :