This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 386 - MSVC 2010 error: __cpuidex missing
Summary: MSVC 2010 error: __cpuidex missing
Status: REOPENED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: unspecified
Hardware: x86 - general Windows
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
: 421 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-04 18:54 UTC by Benoit Jacob
Modified: 2019-12-04 11:18 UTC (History)
4 users (show)



Attachments

Description Benoit Jacob 2011-12-04 18:54:57 UTC
A user reports that they get compile errors with MSVC 2010 about __cpuidex being missing:

> In testing Eigen 3.0.3 with Visual Studio 2010 I encountered this:
> c:\program files\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(732): error C3861: '__cpuidex': identifier not found
> c:\program files\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(761): error C3861: '__cpuidex': identifier not found
> c:\program files\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(848): error C3861: '__cpuidex': identifier not found
> c:\program files\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(851): error C3861: '__cpuidex': identifier not found
> c:\program files\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(865): error C3861: '__cpuidex': identifier not found

The stange thing is that this is supposed to exist in MSVC 2010, we check _MSC_VER>1500 and this user confirmed that they have _MSC_VER=1600.

Information about their install:


Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.0.30319 RTMRel

Installed Version: Professional

Microsoft Office Developer Tools   01018-532-2002102-70900
Microsoft Office Developer Tools
Microsoft Visual Basic 2010   01018-532-2002102-70900
Microsoft Visual Basic 2010
Microsoft Visual C# 2010   01018-532-2002102-70900
Microsoft Visual C# 2010
Microsoft Visual C++ 2010   01018-532-2002102-70900
Microsoft Visual C++ 2010
Microsoft Visual F# 2010   01018-532-2002102-70900
Microsoft Visual F# 2010
Microsoft Visual Studio 2010 Team Explorer   01018-532-2002102-70900
Microsoft Visual Studio 2010 Team Explorer
Microsoft Visual Web Developer 2010   01018-532-2002102-70900
Microsoft Visual Web Developer 2010
Crystal Reports Templates for Microsoft Visual Studio 2010  
Crystal Reports Templates for Microsoft Visual Studio 2010
Microsoft Visual Studio 2010 SharePoint Developer Tools   10.0.30319
Microsoft Visual Studio 2010 SharePoint Developer Tools

Anything we can do about this?
Comment 1 Gael Guennebaud 2011-12-05 00:01:09 UTC
Maybe, it could be due to some weird compilation flags? or maybe he is not building for x86 (or x86-64)?
Comment 2 Benoit Jacob 2011-12-05 00:04:32 UTC
Ah yes, some compilation flag restricting the instruction set would explain it.
Comment 3 Benoit Jacob 2011-12-05 00:07:12 UTC
Let's call this INVALID for now, reopen if needed.
Comment 4 Gael Guennebaud 2012-02-28 14:02:59 UTC
*** Bug 421 has been marked as a duplicate of this bug. ***
Comment 5 Gael Guennebaud 2012-02-28 14:04:26 UTC
Other users hit this issue. Please can anyone who can reproduce this issue could gives us more information, like the compiler flags, the other libs which are included, etc.
Comment 6 Gael Guennebaud 2012-02-28 14:05:26 UTC
it seems it is possible to implement our own cpuidex following this article:

http://software.intel.com/en-us/articles/cpuid-for-x64-platforms-and-microsoft-visual-studio-net-2005/
Comment 7 Gael Guennebaud 2012-02-28 14:13:32 UTC
according to this thread:

http://forum.kde.org/viewtopic.php?f=74&t=92782

the fix is to use /clr instead of /clr:pure, or not use /clr at all which is not standard anyway.

Could you confirm this works for you?
Comment 8 shahar sagiv 2012-04-24 12:08:09 UTC
hi 
i have the same problem
how do i change the /clr:pure flag ,it seems it can't be edited

if anyone found another solution to the problem it can really help me
thank you very much.
Comment 9 Gael Guennebaud 2012-05-01 21:21:48 UTC
It would be nice to find a way to detect if this function is really available or rely on assembly...
Comment 10 Nobody 2019-12-04 11:18:12 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/386.

Note You need to log in before you can comment on or make changes to this bug.