Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1282645
Summary: | Clang fails to link boost library | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Alejandro Mota <lxmota> |
Component: | llvm | Assignee: | Stephan Bergmann <sbergman> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 23 | CC: | ajax, bos, dmalcolm, evangelos, gene, ishitatsuyuki, jv+fedora, louiz, petersen, sbergman, scottt.tw, vitaliy69 |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-05 04:55:53 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: |
Description
Alejandro Mota
2015-11-17 00:05:11 UTC
For boost I'm using the version that comes with Fedora 23: boost-program-options-1.58.0-8.fc23.x86_64 This seems to be a problem with clang++ not supporting the new g++ ABI. See this email thread in the Debian bug list: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797917 (In reply to Alejandro Mota from comment #2) > This seems to be a problem with clang++ not supporting the new g++ ABI. See > this email thread in the Debian bug list: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797917 Yes, the problem is that Clang does not understand the abi_tag attribute, and libstdc++ in Fedora 23 now has _GLIBCXX_USE_CXX11_ABI enabled, requiring support for that attribute. (By the way, what works for me with a local build of recent Clang trunk on Fedora 23 is to add the patch <http://reviews.llvm.org/D12834?id=34645> "add gcc abi_tag support," plus a little patch > --- lib/Sema/SemaDeclAttr.cpp-ORIG 2015-11-03 21:25:50.024944255 +0100 > +++ lib/Sema/SemaDeclAttr.cpp 2015-11-03 21:25:58.785898507 +0100 > @@ -4272,9 +4272,6 @@ > > static void handleAbiTagAttr(Sema &S, Decl *D, > const AttributeList &Attr) { > - if (!checkAttributeAtLeastNumArgs(S, Attr, 1)) > - return; > - > SmallVector<std::string, 4> Tags; > > for (unsigned I = 0, E = Attr.getNumArgs(); I != E; ++I) { to work around Clang failing for an empty abi_tag attribute, which finds a bug in libstdc++ that is only fixed with <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=226022> "Fix abi_tag in special modes" not included in the Fedora 23 libstdc++, also cf. <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68257> "Reject empty abi_tag attribute on inline namespace.") That patch has at least one input case that results in a compiler crash (seems to be caused by a runaway recursion). I tried poking its author but he did not respond to either my email or the comments in the patch review upstream. We have applied the same patch in Arch Linux, a decision which I'm regretting a bit now; sticking to the old C++ ABI until Clang's incompatibility was properly fixed upstream might have been a better choice... ================================ $ clang++ -std=c++14 -xc++ - <<<'auto foo() { return []{}; }' clang: error: unable to execute command: Segmentation fault (core dumped) clang: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.7.0 (tags/RELEASE_370/final) Target: x86_64-redhat-linux-gnu Thread model: posix clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang: note: diagnostic msg: Error generating preprocessed source(s) - ignoring input from stdin. clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs. ================================ This is a ping: Arch have updated to 3.8.0 with a newer patch. I think it's OK to have Fedora apply that too. This problem is quite serious. Links: http://reviews.llvm.org/D17567 http://reviews.llvm.org/D18035 (In reply to Tatsuyuki Ishi from comment #5) > This is a ping: Arch have updated to 3.8.0 with a newer patch. I think it's > OK to have Fedora apply that too. This problem is quite serious. Starting with clang-3.7.0-3.fc23, an older version of the abi_tag patch is included in Fedora. Does that already solve the problems reported in this bug? There are still open issues reported against upstream <http://reviews.llvm.org/D18035>, so it might make sense to wait until they are resolved. The patch itself seems good, and the last report was just a miss in test. I think it's safe to apply the patch for 3.8.0 in rawhide. Just for a reference, it's working well on Arch and currently nobody had complained about it. The benefit of the patch will be much more than the possibly of the bug. *** Bug 1282513 has been marked as a duplicate of this bug. *** *** Bug 1349979 has been marked as a duplicate of this bug. *** clang-3.8.0-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d2313c8f75 clang-3.8.0-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d2313c8f75 clang-3.8.0-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report. What about Fedora 23? It has the same problem. (In reply to Vitaliy Gribko from comment #13) > What about Fedora 23? It has the same problem. See comment 6. I was assuming that clang-3.7.0-3.fc23 is adequate enough. |