cole-trapnell-lab / cufflinks

Boost Software License 1.0
310 stars 116 forks source link

Eigen is not found when compiling from source on Linux #17

Closed cyrilcros closed 4 years ago

cyrilcros commented 9 years ago

Hi, with the latest commit (commit 815e4350652cf23b817a29e989b261604532781c) I get the following error while running make (after configure): `g++ -DHAVE_CONFIG_H -I. -I.. -I../src -I/usr/include -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wunused -Wuninitialized -ftemplate-depth-1024 -m64 -O3 -DNDEBUG -pthread -I/usr/include -I/usr/include -MT clustering.o -MD -MP -MF .deps/clustering.Tpo -c -o clustering.o clustering.cpp In file included from clustering.h:38:0, from clustering.cpp:10: abundances.h:21:23: fatal error: Eigen/Dense: No such file or directory

include <Eigen/Dense>

                   ^

compilation terminated.`

The path is /usr/include/eigen3/Eigen/Dense on my system (Archlinux, nothing special here). I have seen your code tries to check for its presence with ax_check_eigen.m4, but it fails. I see this line: AS_HELP_STRING([--with-eigen@<:@=DIR@:>@], [use EIGEN libraries (default is yes) - it is possible to specify the root directory for EIGEN (optional)]): could you precise how to do so? I tried running make with -I/usr/include/eigen3, to no avail. The makefile has a line in EIGEN_CPPFLAGS = (no value). Thanks a lot for your help!

wookietreiber commented 9 years ago

You need to set EIGEN_CPPFLAGS (cf. AUR PKGBUILD):

export EIGEN_CPPFLAGS="-I/usr/include/eigen3"

It would be nice though if cufflinks would detect eigen via pkg-config.

cyrilcros commented 9 years ago

Thanks a lot for your answer, I had not noticed the AUR package had been updated. Regards, Cyril Cros

Le 4 avr. 2015 à 11:49, Christian Krause notifications@github.com a écrit :

You need to set EIGEN_CPPFLAGS (cf. AUR PKGBUILD):

export EIGEN_CPPFLAGS="-I/usr/include/eigen3" It would be nice though if cufflinks would detect eigen via pkg-config.

— Reply to this email directly or view it on GitHub.

niallobroin commented 9 years ago

Trying to install cufflinks and getting this eigen error aswell.... What is eigen3?? Please update the README to include samtools and eigen3 as dependencies Please also add an INSTALL file

ctrapnell commented 9 years ago

I'm reopening this because the changes made by wookietreiber break builds on our systems and I just don't have time to overhaul the build system for pkg-config support. If we're going to do this, we should be detecting samtools, boost, etc. using pkg-config as well.

wookietreiber commented 9 years ago

How does it break your build?

ctrapnell commented 9 years ago

pkg-config just doesn’t detect Eigen installed in $HOME, which is where I usually keep it on systems where I’m not root.

Cole Trapnell, Ph.D.Assistant Professor

Department of Genome Sciences

University of Washington

On Fri, Aug 14, 2015 at 2:13 AM, Christian Krause notifications@github.com wrote:

How does it break your build?

Reply to this email directly or view it on GitHub: https://github.com/cole-trapnell-lab/cufflinks/issues/17#issuecomment-131034414

wookietreiber commented 9 years ago

For this you need to set your PKG_CONFIG_PATH environment variable to the appropriate directory, as in:

export PKG_CONFIG_PATH="$HOME/path/to/cufflinks/lib/pkgconfig:$PKG_CONFIG_PATH"
kotoroshinoto commented 7 years ago

They structure of the eigen includes appears to have changed from when you originally wrote the m4 to detect it. I too encountered a problem with this. It wasn't hard to override, but it is additional annoyance in an already frustrating build.