Hide Forgot
Description of problem: /usr/include/boost/random/detail/integer_log2.hpp:39:5: error: 'always_inline' was not declared in this scope /usr/include/boost/random/detail/integer_log2.hpp:39:5: error: expected ')' before 'inline' /usr/include/boost/random/detail/integer_log2.hpp:39:5: error: expected ')' before 'inline' /usr/include/boost/random/detail/integer_log2.hpp:39:5: error: expected unqualified-id before ')' token /usr/include/boost/random/detail/integer_log2.hpp:51:5: error: 'always_inline' was not declared in this scope /usr/include/boost/random/detail/integer_log2.hpp:51:5: error: expected ')' before 'inline' /usr/include/boost/random/detail/integer_log2.hpp:51:5: error: expected ')' before 'inline' /usr/include/boost/random/detail/integer_log2.hpp:51:5: error: expected unqualified-id before ')' token /usr/include/boost/random/detail/integer_log2.hpp:58:1: error: 'always_inline' was not declared in this scope /usr/include/boost/random/detail/integer_log2.hpp:58:1: error: expected ')' before 'inline' /usr/include/boost/random/detail/integer_log2.hpp:58:1: error: expected ')' before 'inline' /usr/include/boost/random/detail/integer_log2.hpp:58:1: error: expected unqualified-id before ')' token Also see: http://koji.fedoraproject.org/koji/getfile?taskID=3697161&name=build.log
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!