Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653082 - dev-cpp/eigen:2 undefines "vector" on PPC in public header
Summary: dev-cpp/eigen:2 undefines "vector" on PPC in public header
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-13 07:01 UTC by Luke-Jr
Modified: 2021-05-25 19:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2018-04-13 07:01:46 UTC
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.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2018-04-13 07:51:27 UTC
/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.
Comment 2 Luke-Jr 2018-04-13 08:47:35 UTC
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
Comment 3 Andreas Sturmlechner gentoo-dev 2018-12-23 19:28:40 UTC
Could you file that upstream? http://eigen.tuxfamily.org/bz/
Comment 4 Gael Guennebaud 2018-12-23 21:35:18 UTC
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!