eigen is header-only and hence stuff like this is detected and/or configured at compile time. By compile time, i mean when compiling some software relying on eigen, not eigen itself. Eigen is never compiled (only tests). There's no use to reinstall eigen when those CPU_FLAGS_X86 change. (i'm a member of the eigen team)
Those USE flags are only used during tests, a whole bunch of arguments like this are passed: -DEIGEN_TEST_AVX="$(usex cpu_flags_x86_avx)" Does it make sense in that context?
(In reply to Michael Palimaka (kensington) from comment #1) > Does it make sense in that context? Ah, yes, I understand. It's weird that eigen is getting installed again when those flags change, but I guess it's a limitation of emerge/portage where it's not possible to say that USE are only for tests.. ?
(In reply to Thomas Capricelli from comment #2) > It's weird that eigen is getting installed again when those flags change, > but I guess it's a limitation of emerge/portage where it's not possible to > say that USE are only for tests.. ? I agree, this is not ideal behaviour but unfortunately I'm not aware of any way to fix it. Looking more closely at eigen however, I'm not sure it makes sense to have these USE flags even for tests. I haven't checked every flag in detail, but for many it looks like it simply adds the matching C(XX)FLAG. If that's the case, that's a definite misuse of a USE flag. We should only have eg. cpu_flags_x86_avx if that enabled some special code path in the package.
Er, yes, it only changes compiler options, and this is used to "force" a feature set. If not forced, i think it's still enabled depending on the processor (at least if -march=native is used, or -march=<propercpu>). (I still kinda think we should drop those CPU FLAGS)
(In reply to Thomas Capricelli from comment #4) > Er, yes, it only changes compiler options, and this is used to "force" a > feature > set. > > If not forced, i think it's still enabled depending on the processor (at > least if -march=native is used, or -march=<propercpu>). > > (I still kinda think we should drop those CPU FLAGS) Yep, USE flag only forcing compiler option = removed USE flag. Thanks for confirming.
One last question, what about avx512? I noticed it triggers -DEIGEN_ENABLE_AVX512 that that only affect tests too or does it need any special handling?
Indeed, AVX512 support must be explicitely asked, contrary to other vectorization stuff. I don't think we should handle it differently in gentoo's tests. By default, projects based on Eigen won't use the specific code paths, and I don't know (yet) of any project doing so..
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce48aa680909a5a29bf3e76cf71a7de79b4cbcc2 commit ce48aa680909a5a29bf3e76cf71a7de79b4cbcc2 Author: Michael Palimaka <kensington@gentoo.org> AuthorDate: 2017-10-23 13:04:39 +0000 Commit: Michael Palimaka <kensington@gentoo.org> CommitDate: 2017-10-23 13:05:08 +0000 dev-cpp/eigen: remove cpu_flags_x86* flags These flags only affected tests, and only added the appropriate flags to CFLAGS. Closes: https://bugs.gentoo.org/633518 Package-Manager: Portage-2.3.8, Repoman-2.3.3 dev-cpp/eigen/eigen-3.3.3.ebuild | 12 ------------ dev-cpp/eigen/metadata.xml | 1 - 2 files changed, 13 deletions(-)
Thanks for the bug and the advice! eigen ebuild is undermaintained I think, so more maintainers are welcome. ;-)
Thx for the commmit. I have no time to maintaint any ebuild unfortunately. That and also I'm getting more and more bored by portage state and seriously considering moving to something else, probably arch ..