After boost 1.63.0 update, a number of packages are failing on ppc64le with compile errors in <multi_index/hashed_index.hpp>, e.g. wesnoth: https://koji.fedoraproject.org/koji/taskinfo?taskID=17614212 It builds fine on other arches in koji, just failing on ppc64le. /usr/include/boost/multi_index/hashed_index.hpp:910:27: error: could not convert '(#'vec_cond_expr' not supported by dump_expr#<expression error> & #'vec_cond_expr' not supported by dump_expr#<expression error>)' from '__vector(4) int' to 'bool' if(link_point(v,pos)&&super::replace_(v,x,variant)){ ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/multi_index/hashed_index.hpp:912:16: error: cannot convert 'bool' to '__vector(4) __bool int' in return return true; ^~~~ /usr/include/boost/multi_index/hashed_index.hpp:915:14: error: cannot convert 'bool' to '__vector(4) __bool int' in return return false; ^~~~~
There is nothing ppc64-specific about the code, it's perfectly normal C++: template<typename Variant> bool replace_(value_param_type v,node_type* x,Variant variant) { if(eq_(key(v),key(x->value()))){ return super::replace_(v,x,variant); } unlink_undo undo; unlink(x,undo); BOOST_TRY{ std::size_t buc=find_bucket(v); link_info pos(buckets.at(buc)); if(link_point(v,pos)&&super::replace_(v,x,variant)){ link(x,pos); return true; } undo(); return false; } BOOST_CATCH(...){ undo(); BOOST_RETHROW; } BOOST_CATCH_END } This is a GCC bug, caused by the silly vector extensions for ppc.
The preprocessed output for that is: template<typename Variant> __attribute__((altivec(bool__))) unsigned replace_(value_param_type v,node_type* x,Variant variant) { So the compiler's right. This is because SDL2 includes <altivec.h> # 1 "/usr/include/SDL2/close_code.h" 1 3 4 # 68 "/usr/include/SDL2/SDL_clipboard.h" 2 3 4 # 38 "/usr/include/SDL2/SDL.h" 2 3 4 # 1 "/usr/include/SDL2/SDL_cpuinfo.h" 1 3 4 # 48 "/usr/include/SDL2/SDL_cpuinfo.h" 3 4 # 1 "/usr/lib/gcc/ppc64le-redhat-linux/7/include/altivec.h" 1 3 4 And that has: /* You are allowed to undef these for C++ compatibility. */ #define vector __vector #define pixel __pixel #define bool __bool So wesnoth needs to #undef bool after including SDL2 headers, or all C++ code is horribly broken.
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
ExcludeArching ppc64le for now.
(In reply to Jonathan Wakely from comment #2) > So wesnoth needs to #undef bool after including SDL2 headers, or all C++ > code is horribly broken. Why not just make this change?
Or another option not compile with -std=c++* but -std=gnu++*.
I didn't put much effort into this because the build takes a long time and I lack a ppc64le machine. gnu++11 didn't work, and the SDL2 includes are large. I'll file an upstream bug.
https://gna.org/bugs/?25616
Upstream response: Better file this to whatever project that provides that altivec.h . If it insists on defining bool for C code("bool" isn't a language keyword in C) it can do so in #ifndef __cplusplus block. Making workaround for this in wesnoth is pointless since pretty much any more or less heavy use of C++ will trigger issues like this and they'll be forced to adopt #ifndef __cplusplus solution in altivec.h anyway eventually. In fact I have no idea why you decided to file this bug to wesnoth since the code that was broken by that macro is in boost. You could as well ask boost to carry this workaround serving all projects using boost.multi_index, not just wesnoth. Which component should this be filed with?
(In reply to Gwyn Ciesla from comment #9) > why you decided to file this bug to wesnoth since the code that was broken > by that macro is in boost. You could as well ask boost to carry this > workaround serving all projects using boost.multi_index, not just wesnoth. That's just silly, the problematic macro is included by SDL.h and wesnoth includes that header, boost doesn't. Even if boost did #undef bool it wouldn't work if the boost headers are included before SDL.h, the code that includes SDL.h would still have to do the #undef. So the right place to #undef it is either SDL.h or wesnoth.
And even if upstream don't want to fix it, it can still be patched in Fedora to make it build.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.