[IPOL discuss] Eigen, once again...

Nicolas Limare nicolas.limare at cmla.ens-cachan.fr
Fri Dec 16 11:20:11 CET 2011


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

-- 
Nicolas LIMARE - CMLA - ENS Cachan    http://www.cmla.ens-cachan.fr/~limare/
IPOL - image processing on line                          http://www.ipol.im/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://tools.ipol.im/mailman/archive/discuss/attachments/20111216/549fca28/attachment.pgp>


More information about the discuss mailing list