Closed SvenKratz closed 6 years ago
This is super hacky, but I patched the formula so the dependency is installable. See https://github.com/huynguyen/CarND-MPC-Project/blob/0a7d56fcb55261a5a4684b800c8c5206503c3f66/mumps.rb
You can either clone the repo or apply the diff to mumps.rb in you repo. Afterwords instead of tapping just install the deps directly via.
brew install mumps.rb
brew install ipopt.rb --with-openblas
I can confirm that huynguyen's solution works. (Mac OS 10.13.4, Homebrew 1.6.1-git 656d6)
I had the exact same error, and after cloning huynguyen's repo and runL
brew install mumps.rb
I got this error:
Error: Calling 'depends_on :mpi' is disabled! Use 'depends_on "open-mpi"' instead. /usr/local/Homebrew/Library/Homebrew/dependency_collector.rb:95:in `parse_spec' Or, even better, submit a PR to fix it!
Any idea why it does not work for me?
@yufeiliubrown if you are using my repo and get that error, it is likely you are using the wrong branch. Try:
git checkout huy/workaround-homebrew-mumps-errors
My version explicitly does use open-mpi. https://github.com/huynguyen/CarND-MPC-Project/blob/0a7d56fcb55261a5a4684b800c8c5206503c3f66/mumps.rb#L35
@huynguyen Using the new patch, I can install mumps.rb. However, when I try to install ipopt.rb, I got this error:
Error: No available formula with the name "/usr/local/opt/mumps/.brew/mumps.rb"
@yufeiliubrown I'm not sure, it sounds like something didn't go right with your mumps install. You should post the full log of the commands you are executing along with the output.
Also:
brew info mumps
@huynguyen Here is my brew info mumps result:
brewsci/science/mumps: stable 5.1.1 Parallel Sparse Direct Solver http://mumps-solver.org /usr/local/Cellar/mumps/5.1.1_1 (63 files, 15.2MB) * Built from source on 2018-04-21 at 16:33:27 From: https://github.com/brewsci/homebrew-science/blob/master/Formula/mumps.rb ==> Dependencies Required: veclibfort ✔, gcc ✔, scalapack ✔ Recommended: open-mpi ✔ Optional: openblas ✔, parmetis ✔, scotch5 ✘, scotch ✘ ==> Options --with-openblas Build with openblas support --with-parmetis Build with parmetis support --with-scotch Build with scotch support --with-scotch5 Build with scotch5 support --without-open-mpi Build without open-mpi support ==> Caveats MUMPS was built with shared libraries. If required, static libraries are available in /usr/local/opt/mumps/libexec/lib
I also run brew reinstall mumps.rb, and the output is:
==> Reinstalling mumps ==> Downloading http://mumps.enseeiht.fr/MUMPS_5.1.1.tar.gz Already downloaded: /Users/yufeiliu/Library/Caches/Homebrew/mumps-5.1.1.tar.gz ==> make alllib LIBEXT=.dylib AR=gfortran -dynamiclib -Wl,-installname -Wl,/usr/local/Cellar/mu ==> make alllib RANLIB=echo OPTF=-O CDEFS=-DAdd ORDERINGSF=-Dpord CC=clang -fPIC FC=gfortran -f ==> Caveats MUMPS was built with shared libraries. If required, static libraries are available in /usr/local/opt/mumps/libexec/lib You built a sequential MUMPS library. Please add /usr/local/opt/mumps/libexec/include to the include path when building software that depends on MUMPS. ==> Summary 🍺 /usr/local/Cellar/mumps/5.1.1_1: 63 files, 15.2MB, built in 1 minute 47 seconds
I applied @huynguyen's patch above to my freshly forked repository. Anyone can use it to install ipopt like so:
brew tap FurqanHabibi/CarND-MPC-Project https://github.com/FurqanHabibi/CarND-MPC-Project
brew install ipopt --with-openblas
All credit goes to @huynguyen for the mumps patch.
After fixing brew doctor warnings, I got a new error:
dynamiclib: No such file or directory
For anyone having the same problem, the solution is in
Basically, there is no need to patch the formula, all it needs is to use dpo/homebrew-openblas tap instead of brewsci/homebrew-science tap.
@huynguyen Do you want to make a pull request with your patch on mumps.rb and I will merge it here?
@mvirgo yea I can put something together, the only part I'm unsure of is where I manually set the compiler to gfortran
.
It seems safe though because even the repo @yufeiliubrown linked does it https://github.com/dpo/homebrew-openblas/blob/d86f1fbc152ccad632ba02be40ab251f8ca1ee31/mumps.rb#L31
When trying to get the ipopt version provided by the repository I get the following error: