Compilation error: 'Eigen/Dense' file not found

Dear Experts,
I’m trying to compile Corry on my CENTOS7 machine: I’ve compiled from source:

  • ROOT root_v6_24_06
  • BOOST boost_v1_77_0
  • CMAKE cmake_v3_21_2
  • EIGEN eigen_v3_4_0
  • eudaq-v1
  • I’m using GCC 8.3.1 2

When I compile Corry I get the following error:

/home/testbeam/corryvreckan/3rdparty/GeneralBrokenLines/include/GblPoint.h:46:10: fatal error: 'Eigen/Dense' file not found
#include "Eigen/Dense"
         ^~~~~~~~~~~~~

In my .bashrc I have:

export EIGEN=$HOME/eigen
export PATH=$EIGEN/include/eigen3:$PATH

Can you please help me in trying to understand what I’m missing?

Many thanks,

  • Mauro.

Hi Mauro,

instead of using your own eigen installation, you may try to get it via:

sudo apt install libeigen3-dev

(or the corresponding yum command for CentOS7)

Please let me know if that works.

Cheers, Jens

It should be this one:

su -c "yum install eigen3-devel"

Many thanks for the suggestion. I’ve installed eigen as you siggested:

yum list installed eigen*
Loaded plugins: changelog, fastestmirror, kernel-module, langpacks, protectbase, tsflags, versionlock
Loading mirror speeds from cached hostfile
google-chrome                                                                                                                                                        3/3
249 packages excluded due to repository protections
Installed Packages
eigen3-devel.noarch                     3.3.7-1.el7                                        @epel

I still get the error:

In file included from /home/testbeam/corryvreckan/3rdparty/GeneralBrokenLines/src/BorderedBandMatrix.cpp:30:
/home/testbeam/corryvreckan/3rdparty/GeneralBrokenLines/include/BorderedBandMatrix.h:37:10: fatal error: Eigen/Core: No such file or directory
 #include "Eigen/Core"
          ^~~~~~~~~~~~
compilation terminated.

Any other suggestion?
Many thanks,

  • Mauro.

Hi,
I was finally able to compile.

In the directory:
~/eigen_v3_4_0/include
I’ve added the soft link:
Eigen -> eigen3/Eigen/

Cheers,

  • Mauro.

Hi, sorry, somehow I was wrong

It’s still not working:

  1. it does not work with yum install eigen3-devel
  2. it does not work with the soft link Eigen -> eigen3/Eigen/

I’m not sure what I saw happening yesterday

Do you have any suggestions?
Did you try to install it on a clean CENTOS7 distro?

  • Mauro.

Finally the solution is the following:

  1. I compiled from source eigen_v3_4_0
  2. I made the softlink: ln -s eigen_v3_4_0 eigen3

One other minor comment: apparently this version of Corryvreckan has some minor issues in compiling with ROOT 6.24 because it’s still searching for RootMacros which are now available by simply: INCLUDE("${ROOT_USE_FILE}")

  • Mauro.

Hi Mauro,
it’s good to see you found the solution in the meantime.

Thanks a lot for posting it here, so it might be of help for others as well.

If you like you’re also welcome to join our mattermost channel:
https://mattermost.web.cern.ch/signup_user_complete/?id=jkcxygm99jfi7pz3okagmb6cao

Cheers, Jens

Hi @dinardo

I believe this is something specific to your particular system setup - our Docker image is based on CC7 and the only thing we do for Eigen support is yum install eigen3-devel (see here: etc/docker/Dockerfile.base · master · Corryvreckan / Corryvreckan · GitLab)

Maybe your previously set up Eigen3 things messed with the system-provided settings?

(PS: you added your Eigen3 directory to $PATH - this is only used for binary/executable search and therefore does not help here…)

Cheers,
Simon