homebrew-caffe icon indicating copy to clipboard operation
homebrew-caffe copied to clipboard

Error: private method `cxx=' called for #<Object:0x007f9f2a8cd248>

Open treetty opened this issue 10 years ago • 5 comments

hi i m trying to install caffe on mac 10.9.5 when installing boost, it reports:

Error: private method cxx=' called for #<Object:0x007f9f2a8cd248> Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Taps/mitmul/homebrew-caffe/boost-std.rb:73:ininstall' /usr/local/Library/Homebrew/build.rb:136:in block in install' /usr/local/Library/Homebrew/formula.rb:410:inblock in brew' /usr/local/Library/Homebrew/formula.rb:766:in block in stage' /usr/local/Library/Homebrew/resource.rb:91:inblock in unpack' /usr/local/Library/Homebrew/extend/fileutils.rb:17:in mktemp' /usr/local/Library/Homebrew/resource.rb:88:inunpack' /usr/local/Library/Homebrew/resource.rb:81:in stage' /usr/local/Library/Homebrew/formula.rb:764:instage' /usr/local/Library/Homebrew/formula.rb:406:in brew' /usr/local/Library/Homebrew/build.rb:114:ininstall' /usr/local/Library/Homebrew/build.rb:185:in `

'

thanks

treetty avatar Mar 24 '15 04:03 treetty

solution is to replace

ENV.cxx = "/usr/bin/clang -stdlib=libstdc++"

in /usr/local/Library/Taps/mitmul/homebrew-caffe/boost-std.rb file with

ENV["CXX"] = "/usr/bin/clang++ -stdlib=libstdc++"

refered from https://github.com/BVLC/caffe/issues/449

treetty avatar Mar 24 '15 05:03 treetty

If anyone needs it, still:

brew install https://gist.githubusercontent.com/mutaphysis/2880e3866a48a954a310/raw/1509daea679b0e685cf49907db7a70408741593c/protobuf-std.rb

mutaphysis avatar Apr 10 '15 16:04 mutaphysis

thanks!

jontonsoup avatar Jul 16 '15 04:07 jontonsoup

I'm getting this message when trying the first solution listed above

$ brew install caffe
==> Installing caffe from mitmul/homebrew-caffe
==> Installing dependencies for mitmul/caffe/caffe: boost-std, snappy-std, leveldb-std, protobuf-std, gflags-std, glog-std, opencv-std
==> Installing mitmul/caffe/caffe dependency: boost-std
==> Downloading http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/boost-std-1.55.0.tar.bz2
["--with-python=/usr/local/opt/python/bin/python", "--with-python-root=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7", "--without-icu", "--without-libraries=mpi"]
["--prefix=/usr/local/Cellar/boost-std/1.55.0", "--libdir=/usr/local/Cellar/boost-std/1.55.0/lib", "-d2", "-j8", "--layout=tagged", "--user-config=user-config.jam", "install", "threading=single", "link=static"]
==> ./bootstrap.sh --with-python=/usr/local/opt/python/bin/python --with-python-root=/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7 --without-icu --without-libraries=mp
==> ./b2 --prefix=/usr/local/Cellar/boost-std/1.55.0 --libdir=/usr/local/Cellar/boost-std/1.55.0/lib -d2 -j8 --layout=tagged --user-config=user-config.jam install threading=single link=static
    cp "boost/tr1/tr1/vector"  "/usr/local/Cellar/boost-std/1.55.0/include/boost/tr1/tr1/vector"

...failed updating 10 targets...
...skipped 9 targets...
...updated 11343 targets...
/usr/local/Library/Homebrew/build.rb:181:in `dump': can't dump anonymous class #<Module:0x007fe6661b28e0>::BoostStd (TypeError)
    from /usr/local/Library/Homebrew/build.rb:181:in `rescue in <main>'
    from /usr/local/Library/Homebrew/build.rb:167:in `<main>'
Error: Suspicious failure

And this error when trying the second

$ brew install https://gist.githubusercontent.com/mutaphysis/2880e3866a48a954a310/raw/1509daea679b0e685cf49907db7a70408741593c/protobuf-std.rb
######################################################################## 100.0%
==> Downloading http://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/protobuf-std/2.5.0 --with-zlib
==> make
make[2]: *** [libprotobuf.la] Error 1
make[2]: *** Waiting for unfinished jobs....
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I.. -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNDEBUG -stdlib=libstdc++ -c google/protobuf/compiler/python/python_generator.cc -o python_generator.o >/dev/null 2>&1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
/usr/local/Library/Homebrew/build.rb:181:in `dump': can't dump anonymous class #<Module:0x007ffaa417a920>::ProtobufStd (TypeError)
    from /usr/local/Library/Homebrew/build.rb:181:in `rescue in <main>'
    from /usr/local/Library/Homebrew/build.rb:167:in `<main>'
Error: Suspicious failure

aferriss avatar Dec 03 '15 05:12 aferriss

Any update regarding to this error message?

datomnurdin avatar Feb 07 '16 19:02 datomnurdin