[IPOL discuss] Eigen, once again...

Pascal Monasse monasse at imagine.enpc.fr
Fri Dec 16 13:54:17 CET 2011


Thanks Nicolas for all these tests.

I must admit the results are quite disturbing. Actually I checked Eigen builds 
and runs cleanly on gcc and MSVC, and I assumed it was good enough, believing 
the developers at face value when they wrote about portability. I am 
surprised, because this library is used in various components of KDE.

Concerning GCC, they acknowledge that there is no support before version 3.4:
http://eigen.tuxfamily.org/index.php?title=Main_Page#Compiler_support
"GCC, version 3.4 and newer. Very good performance with GCC 4.2 and newer."

For clang, they claim it is supported from version 2.8.

Best,
Pascal

On Friday, December 16, 2011 11:20:11 AM Nicolas Limare wrote:
> Hi,
> 
> > Which version of Eigen have you considered, 3.04 ?
> 
> No, I kept the version included in the IPOL program, version 3.0,
> which ws probably considered the stable version when this program was
> written, 6 months ago. The compilation bugs described in my message
> may have been fixed since, but nevertheless a version previously
> released as "stable" seems to have serious compilation issues.
> 
> > Which part have you tried to compile?
> > 
> >  I want say:
> >  - using Eigen as a header only library,
> >  - compile all Eigen library modules (as a standalone)
> 
> I just compile one C++ source code file which includes some Eigen
> headers: Core, Cholesky, Eigenvalues, LU, QR and SVD.
> 
> g++ -c -o foo.o foo.cpp     -> OK
> pathcc -c -o foo.o foo.cpp  -> OK
> icc -c -o foo.o foo.cpp     -> warnings
> sunCC -c -o foo.o foo.cpp   -> errors
> clang -c -o foo.o foo.cpp   -> clang dies
> 
> Same results when explicitely adding C++ version options (-std=c++98,
> -compat=5, ...).
> 
> > I think all the libraries are subject to give warning or error message
> > under a given compiler.
> 
> All the libraries may throw warnings, but I consider that any correct
> code written in strict C++98 must be compilable without error with any
> compiler implementing the C++98 programming language. Eigen claims to
> be written in strict C++98 but fails on at least two compilers written
> from completely different code bases, including one from a major actor
> of the computing industry (Sun/Oracle). I have not verified that these
> compilers correctly implement the C++98 standard, and I can not
> exclude the possibility that the fault is on the compiler side. But it
> seems more likely that there was a problem in this version of the
> Eigen code, which would not be written in strict and standard C++98.
> 
> I tried something else with the latest release, without much success:
> 
> downloaded and decompressed Eigen 3.0.4
> make build, cd build
> 
> make clean; cmake -DCMAKE_C_COMPILER=gcc DCMAKE_CXX_COMPILER=g++ ../
> make buildtests
> -> throws warnings on ASSIGN and GOTO statements
> -> then fails on a link error
> 
> make clean; cmake -DCMAKE_C_COMPILER=clang DCMAKE_CXX_COMPILER=clang ../
> make buildtests
> -> compiler crashes
> 
> make clean; cmake -DCMAKE_C_COMPILER=pathcc DCMAKE_CXX_COMPILER=pathcc ../
> make buildtests
> -> throws warnings on ASSIGN and GOTO statements
> -> then fails on a link error
> 
> make clean; cmake -DCMAKE_C_COMPILER=icc DCMAKE_CXX_COMPILER=icc ../
> make buildtests
> -> throws warnings on ASSIGN and GOTO statements
> -> then fails on a link error
> 
> make clean; cmake -DCMAKE_C_COMPILER=suncc DCMAKE_CXX_COMPILER=sunCC ../
> make buildtests
> -> throws error messages and fails to compile


More information about the discuss mailing list