FS#40229 - [clang] clang++ fails with "no member named 'max_align_t'" after upgrading gcc-libs to 4.9

Attached to Project: Arch Linux
Opened by Philipp Claßen (PhCl) - Monday, 05 May 2014, 18:51 GMT
Last edited by Evangelos Foutras (foutrelis) - Tuesday, 06 May 2014, 14:42 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:

clang++ fails to compile cstddef after upgrading to gcc-libs 4.9:

/usr/include/c++/4.9.0/cstddef:51: error: no member named 'max_align_t' in the global namespace
using ::max_align_t;
~~^

Additional info:
* clang 3.4-1
* gcc-libs 4.9.0-1
* boost 1.55.0-6

Steps to reproduce:

cat > example.cpp
#include <boost/format.hpp>

int main(int argc, char** argv)
{
auto s = boost::format("");
return 0;
}

$ clang++ -std=c++11 -c example.cpp
In file included from example.cpp:1:
In file included from /usr/include/boost/format.hpp:19:
In file included from /usr/include/boost/detail/workaround.hpp:41:
In file included from /usr/include/boost/config.hpp:40:
In file included from /usr/include/boost/config/select_stdlib_config.hpp:18:
/usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../include/c++/4.9.0/cstddef:51:11: error:
no member named 'max_align_t' in the global namespace
using ::max_align_t;
~~^
1 error generated.


Although the program uses C++11 features, it compiles when the -std=c++11 flag is omitted:

$clang++ -c example.cpp
example.cpp:5:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto s = boost::format("");
^
1 warning generated.


The issue has also been discussed here:
https://bbs.archlinux.org/viewtopic.php?pid=1412362#p1412362

Here is a link to a related upstream commit:
http://reviews.llvm.org/rL201729
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Tuesday, 06 May 2014, 14:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  clang 3.4-2
Comment by Pablo Lezaeta (Jristz) - Monday, 05 May 2014, 22:06 GMT
and considering the large amount of time bethwen releases even minors in clang, I think is best add the patch rathen than wait with a broken app in the repos
Comment by Nick Overdijk (Nickert) - Tuesday, 06 May 2014, 11:55 GMT
Is there anything besides voting I can do to get this done?

Loading...