On 8 December 2015 at 19:52, Fernando Seiti Furusato <ferse...@br.ibm.com> wrote: > Just FYI. > Not sure if they are public headers or not, but doing so on headers: > src/runtime/icd.h > src/core/common.h > > Made it build for me. > > Right below #include "CL/cl.h" I included this: > > #ifdef __ALTIVEC__ > # undef bool > # undef vector > # undef pixel > #endif > > I tried adding to the .cpp files (not all of them) but it didn't work. > The headers above are the ones that actually use cl.h.
You're right - this needs to be done in common.h for this to work (since common.h uses the bool keyword), but common.h is installed by the -dev package, so this goes against the idea of not messing with macros in public headers. Reading some other bug reports (e.g. [1]) suggests that compiling with `-std=gnu++11` instead of `-std=c++11` also fixes the problem. Is this a viable workaround? This would be a simple patch to CMakeLists.txt. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58241