Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 633518 - dev-cpp/eigen remove CPU_FLAGS_X86
Summary: dev-cpp/eigen remove CPU_FLAGS_X86
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-04 23:43 UTC by Thomas Capricelli
Modified: 2017-10-23 14:36 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 Thomas Capricelli 2017-10-04 23:43:00 UTC
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)
Comment 1 Michael Palimaka (kensington) gentoo-dev 2017-10-07 12:52:31 UTC
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?
Comment 2 Thomas Capricelli 2017-10-08 21:37:17 UTC
(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.. ?
Comment 3 Michael Palimaka (kensington) gentoo-dev 2017-10-09 13:40:52 UTC
(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.
Comment 4 Thomas Capricelli 2017-10-09 13:59:26 UTC
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)
Comment 5 Michael Palimaka (kensington) gentoo-dev 2017-10-09 14:03:18 UTC
(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.
Comment 6 Michael Palimaka (kensington) gentoo-dev 2017-10-23 11:53:47 UTC
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?
Comment 7 Thomas Capricelli 2017-10-23 12:52:46 UTC
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..
Comment 8 Larry the Git Cow gentoo-dev 2017-10-23 13:05:18 UTC
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(-)
Comment 9 Michael Palimaka (kensington) gentoo-dev 2017-10-23 13:06:48 UTC
Thanks for the bug and the advice!

eigen ebuild is undermaintained I think, so more maintainers are welcome. ;-)
Comment 10 Thomas Capricelli 2017-10-23 14:36:17 UTC
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 ..