6

I have both boost and boost-python installed via brew on my MacOS 10.12 Sierra. However, boost-python doesn't seem to think that its dependency boost is installed:

$ brew info boost
boost: stable 1.68.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
/usr/local/Cellar/boost/1.65.1 (12,679 files, 401.2MB)
  Poured from bottle on 2017-10-28 at 09:19:27
/usr/local/Cellar/boost/1.67.0_1 (13,506 files, 447.7MB) *
  Poured from bottle on 2018-05-18 at 03:58:16
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb
==> Dependencies
Optional: icu4c ✔
==> Options
--with-icu4c
    Build regexp engine with icu support
--without-single
    Disable building single-threading variant
--without-static
    Disable building static library variant
--HEAD
    Install HEAD version
==> Caveats
Building of Boost.Log is disabled because it requires newer GCC or Clang.
==> Analytics
install: 51,109 (30 days), 167,563 (90 days), 648,244 (365 days)
install_on_request: 15,663 (30 days), 48,585 (90 days), 191,757 (365 days)
build_error: 0 (30 days)

$ brew info boost-python
boost-python: stable 1.68.0 (bottled), HEAD
C++ library for C++/Python2 interoperability
https://www.boost.org/
/usr/local/Cellar/boost-python/1.65.1 (457 files, 25MB)
  Built from source on 2017-10-28 at 09:23:57 with: --with-python3
/usr/local/Cellar/boost-python/1.67.0 (459 files, 17.3MB) *
  Poured from bottle on 2018-05-18 at 03:58:20
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost-python.rb
==> Dependencies
Required: boost ✘
==> Options
--HEAD
    Install HEAD version
==> Analytics
install: 5,214 (30 days), 16,979 (90 days), 76,707 (365 days)
install_on_request: 3,865 (30 days), 12,416 (90 days), 56,500 (365 days)
build_error: 0 (30 days)

How do I get boost-python to recognize the existence of / link with its dependency boost?

It would be great if I could avoid uninstalling and reinstalling because there are so many other package dependencies on boost that took me a long/difficult time to get working.

I'm doing this because: when compiling caffe, it says ld: library not found for -lboost_python. Thank you.

1 Answer 1

5

This is how I managed to make boost-python recognize the existence of its dependency booth. Without uninstalling any of the existing boost and boost-python packages in Homebrew, I ran the following line

brew install --build-from-source -vd boost boost-python

This seems to reinstall both packages and cleanly establish that link.

To address the Caffe compilation issue, this command produces files libboost_python27* files in /usr/local/lib, which I just copied and renamed to libboost_python*.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.