Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.99k stars 11.36k forks source link

eigen: missing CMake module #35225

Closed wjwwood closed 9 years ago

wjwwood commented 9 years ago

It seems that the upstream FindEigen3.cmake CMake Module is not getting installed in the Homebrew formula. Here it is at the current released tag, 3.2.2:

https://bitbucket.org/eigen/eigen/src/1306d75b4a21891e59ff9bd96678882cf831e39f/cmake/FindEigen3.cmake?at=3.2.2

The Module seems exists in the .deb for Ubuntu Trusty (grep for cmake):

http://packages.ubuntu.com/trusty/all/libeigen3-dev/filelist

But is missing from Precise:

http://packages.ubuntu.com/precise/all/libeigen3-dev/filelist

And I don't see it for our Homebrew bottle:

% brew list eigen
/usr/local/Cellar/eigen/3.2.2/include/eigen3/ (358 files)
/usr/local/Cellar/eigen/3.2.2/lib/pkgconfig/eigen3.pc

% cmake --find-package -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST -DNAME=Eigen3
Eigen3 not found.
CMake Error: Problem processing arguments. Aborting.

# Boost for comparison
% cmake --find-package -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST -DNAME=Boost
Boost found.

Maybe it's a missing CMake option to get it to be generated and installed.

MikeMcQuaid commented 9 years ago

Maybe it's a missing CMake option to get it to be generated and installed.

Could you try and open a pull request? This should help and I'm happy to walk you through anything else: https://github.com/Homebrew/homebrew/wiki/How-To-Open-a-Homebrew-Pull-Request-(and-get-it-merged)

Thanks!

wjwwood commented 9 years ago

@mikemcquaid At the time of opening I wasn't aware of the reason for this issue, otherwise I would have gladly opened a pull request to address it. I was planning on coming back and digging into it, but @xu-cheng beat me to it. Either way thanks for the quick attention on this. Happy Holidays.

jmtatsch commented 8 years ago

FindEigen3.cmake is there now, however Eigen3 is still not found:

brew list eigen
/usr/local/Cellar/eigen/3.2.6/include/eigen3/ (364 files)
/usr/local/Cellar/eigen/3.2.6/lib/pkgconfig/eigen3.pc
/usr/local/Cellar/eigen/3.2.6/share/cmake/Modules/FindEigen3.cmake

cmake --find-package -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST -DNAME=Eigen3
Eigen3 not found.
CMake Error: Problem processing arguments. Aborting.

as opposed to boost
cmake --find-package -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST -DNAME=Boost
Boost found.
wjwwood commented 8 years ago

@jmtatsch do you have eigen linked? Can you post brew info eigen?

jmtatsch commented 8 years ago
brew info eigen
eigen: stable 3.2.6 (bottled), HEAD
C++ template library for linear algebra
http://eigen.tuxfamily.org/
/usr/local/Cellar/eigen/3.2.6 (367 files, 4,2M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/eigen.rb
==> Dependencies
Build: cmake ✔
==> Options
--universal
    Build a universal binary
--HEAD
    Install HEAD version
wjwwood commented 8 years ago

That's strange, I'll try to reproduce it.

wjwwood commented 8 years ago

Ok I can reproduce what @jmtatsch is describing too and I think it might be a new thing introduced with a new cmake version. This didn't happen for me before and I can now workaround the issue by setting the CMAKE_MODULE_PATH, but I really shouldn't have to. My intuition is that it is a problem with the fact that cmake is defaulting to files in /usr/local/Cellar/cmake/.../share/cmake/Modules but the eigen Formula has placed extra files in /usr/local/share/cmake/Modules, creating a shadowing effect which prevents that file from being picked up by cmake.

wjwwood commented 8 years ago

Sorry forgot to mention I put together a repo to demonstrate the issue: https://github.com/wjwwood/eigen_test

xu-cheng commented 8 years ago

@wjwwood @jmtatsch Please open a new issue. It's hard to track this in a closed PR.

jmtatsch commented 8 years ago

OK, new issue is here https://github.com/Homebrew/homebrew/issues/44937