Mesa's cl_platform.h *uses* vector. This results in at least media-libs/opencv (but likely anything that uses Eigen, since it is itself an OpenCL framework?) failing to build. The simplest workaround seems to be to patch Mesa to use __vector instead, but this is a GCC extension, and doesn't fix the real bug: that Eigen is screwing up standard keywords for other software.
/usr/include/eigen2/Eigen/Core /usr/include/eigen2/Eigen/StdVector /usr/include/eigen3/Eigen/Core I am reasonably sure only dev-cpp/eigen:2 does this. commit 43a7b3fe10c35394c2c74620c9fa62d370ae71bc Author: Andreas Sturmlechner <asturm@gentoo.org> Date: Mon Jan 22 23:46:41 2018 +0100 dev-cpp/eigen: Drop slot 2 Package-Manager: Portage-2.3.20, Repoman-2.3.6 All you need to do now is unmerge it.
This system has only ever had eigen 3.3.4 installed. From /usr/include/eigen3/Eigen/Core: #elif defined __ALTIVEC__ #define EIGEN_VECTORIZE #define EIGEN_VECTORIZE_ALTIVEC #include <altivec.h> // We need to #undef all these ugly tokens defined in <altivec.h> // => use __vector instead of vector #undef bool #undef vector #undef pixel
Could you file that upstream? http://eigen.tuxfamily.org/bz/
The easiest would be to include cl_platform.h before Eigen. In Eigen we really have to undef vector for obvious compatibility with the c++ eco-system. "vector" is NOT a C++ standard keyword!