Can't build 4.2.0 using homebrew
I am trying to build OpenCV 4.2.0 using the following command.
brew install --build-from-source opencv
But I get a make error.
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(arenastring.cc.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(io_win32.cc.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(gzip_stream.cc.o) has no symbols
/usr/bin/ranlib ../lib/liblibprotobuf.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(arenastring.cc.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(io_win32.cc.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../lib/liblibprotobuf.a(gzip_stream.cc.o) has no symbols
[ 24%] Built target libprotobuf
make: *** [all] Error 2
I've installed the xcode command line tools.
Any help would be appreciated.
Try this
brew install --build-from-source --with-python --fresh -vd protobuf