Bug 1092622

Summary: clang-3.4: unusable with libstdc++ from gcc 4.9
Product: [Fedora] Fedora Reporter: Igor Gnatenko <ignatenko>
Component: llvmAssignee: Adam Jackson <ajax>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 22CC: accounts+fedora, ajax, bos, bzf, dmalcolm, fabian.deutsch, fdeutsch, grs, ignatenko, jv+fedora, petersen, scottt.tw
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-20 20:30:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1105999    

Description Igor Gnatenko 2014-04-29 15:12:36 UTC
Description of problem:
DEBUG: /usr/bin/../lib/gcc/x86_64-redhat-linux/4.9.0/../../../../include/c++/4.9.0/cstddef:51:11: error: no member named 'max_align_t' in the global namespace
DEBUG:   using ::max_align_t;
DEBUG:         ~~^


Version-Release number of selected component (if applicable):
clang-3.4-6.fc21.x86_64

How reproducible:
100%

Steps to Reproduce:
1.try to build new libclc with clang 3.4 and gcc 4.9 (rawhide)

Actual results:
http://kojipkgs.fedoraproject.org//work/tasks/4615/6794615/build.log

Expected results:
build passed OK

Additional info:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744792
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744872

Comment 1 Fabian Deutsch 2014-05-08 18:16:53 UTC
Hey,

this is also blocking libclc updates, which basically prevents supporting newer AMD APUs in rawhide/f21.

Comment 2 Igor Gnatenko 2014-06-07 19:48:15 UTC
Probably is a fix: http://reviews.llvm.org/rL201729

Comment 3 Igor Gnatenko 2014-07-06 07:21:51 UTC
yes. this patch applied by upstream, but have not backported to 3.4.1, so we should apply it ourself.

https://github.com/llvm-mirror/clang/commit/88ede395cf896c0a14299be553b6084aa6a5e50d

Comment 4 Jan Včelák 2014-12-26 01:33:31 UTC
*** Bug 1120995 has been marked as a duplicate of this bug. ***

Comment 5 Jaroslav Reznik 2015-03-03 17:08:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 6 Marco Nolden 2015-05-19 12:25:18 UTC
Another problem with clang and libstd++ on Fedora 22:

main.cpp: example from http://en.cppreference.com/w/cpp/utility/functional/function/target

$ clang++ -std=c++11 main.cpp 
main.cpp:9:13: error: no member named 'target' in 'std::function<int (int, int)>'
    if (arg.target<std::plus<int>>())
        ~~~ ^
main.cpp:9:34: error: expected '(' for function-style cast or type construction
    if (arg.target<std::plus<int>>())
                   ~~~~~~~~~~~~~~^
[...]


It compiles fine in their web interface with clang and c++11 enabled. G++ also works on Fedora 22.

Seems that the __cpp_rtti #define is missing. Adding it manually makes the code compile.