Bug 781859
Summary: | Boost + gcc-4.7 is causing build failures | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Hans de Goede <hdegoede> | ||||||||
Component: | boost | Assignee: | Petr Machata <pmachata> | ||||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | rawhide | CC: | denis.arnaud_fedora, mnewsome, pertusus, pmachata | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2012-01-16 23:12:57 UTC | Type: | --- | ||||||||
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: | 754865 | ||||||||||
Attachments: |
|
Description
Hans de Goede
2012-01-15 18:34:47 UTC
Created attachment 555525 [details]
Compilation fix
The problem is that OpenLieroX/src/gusanos/blitters/mmx.h defines a macro always_inline. This gets expanded inside __attribute__((always_inline)) that boost random uses, resulting in expansions like:
template<class T> __attribute__((const))
__attribute__((__attribute__((always_inline)) inline))
inline static int apply(T t, int accum, int update = 0) /* ... */
GCC barfs on that. I grepped through the sources and it doesn't seem that the value of always_inline macro is not used anywhere in the source, apart from that definition. (Unless the expansion is cleverly masked somewhere.) So the easiest fix seems to be to just drop the definition. That's what's in this patch. Liero compiles successfully with this patch applied.
Created attachment 555527 [details]
Boost fix
In any case, on boost side, I think it would be prudent to name the attribute with the underscores, __attribute__((__always_inline__)), instead of the bare thing. This way, we would avoid clashes with user-defined attributes.
Created attachment 555617 [details]
Boost fix
Updated version with all publicly-visible occurrences of bare attributes replaced. This is what I intend to add to Fedora package. I'll open and link bug reports for this.
Corresponding upstream bugs are https://svn.boost.org/trac/boost/ticket/6406 to https://svn.boost.org/trac/boost/ticket/6416 Many thanks for working on this, the lierox patch as well as the boost based solution! |