Installing OpenCV with Brew Never Ends

So, I'm trying to install opencv using Homebrew, but it does not work. I used brew tap homebrew/science and then brew install opencv What happens:

 ==> Installing opencv from homebrew/homebrew-science ==> Installing dependencies for homebrew/science/opencv: gcc, eigen, jpeg, libpng, libtiff, ilmbase, openexr, homebrew/python/numpy ==> Installing homebrew/science/opencv dependency: gcc ==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.1.0/gcc-5.1.0.tar.bz2 Already downloaded: /Library/Caches/Homebrew/gcc-5.1.0.tar.bz2 ==> Patching patching file gcc/jit/Make-lang.in ==> ../configure --build=x86_64-apple-darwin13.4.0 --prefix=/usr/local/Cellar/gcc/5.1.0 --libdir=/usr/local/Cellar/gcc/5.1.0/lib/gcc/5 --enable-langua ==> make bootstrap 

And then it just does not stop, I started it for about an hour. The task at the top of the terminal window (you know where it says bash in general) is constantly changing, often for things like "ruby", but nothing is output after that.

Any ideas? Thanks.

+6
source share
2 answers

Note that he is actually compiling GCC at this point, which is expected to take a long time. By default, Homebrew provides pre-made binary bottles, so it is curious that they are not used. Is your environment set up to create everything from source code? You can try brew install gcc --force-bottle

+7
source

I came across this question with the same problem -

 brew tap homebrew/science brew install opencv 

started installing a bunch of dependencies that worked fine before gcc started, where I got:

 ==> Installing homebrew/science/opencv dependency: gcc ==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2 ==> Downloading from http://gnu.mirror.iweb.com/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2 ######################################################################## 100.0% ==> Patching patching file gcc/jit/Make-lang.in patching file gcc/jit/jit-playback.c Hunk #1 succeeded at 2459 with fuzz 2 (offset 43 lines). ==> ../configure --build=x86_64-apple-darwin15.0.0 --prefix=/usr/local/Cellar/gcc/5.2.0 --libdir=/usr/loc ==> make bootstrap 

This process lasted 3 hours before I got angry and killed him.

Solution: Use a brew bottle: brew install gcc --force-bottle . It works, but gives the following warning:

 GCC has been built with multilib support. Notably, OpenMP may not work: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670 If you need OpenMP support you may want to brew reinstall gcc --without-multilib 

I have not encountered OpenMP problems yet. Hope this helps someone else. Launching MBP 13 "(end 2011) with OSX El Capitain. (It's old, which probably explains the long-running make s). Subscribe to @IanLancaster for a solution first, but I thought I would deal with the reservations in detail.

+5
source

Source: https://habr.com/ru/post/989596/


All Articles