Skip to content


boost install 1.47.0 failed #7633

sanemat opened this Issue · 7 comments

2 participants


$ brew install -v boost 2>&1 |gist
$ brew doctor |gist


Works fine for me on OS X 10.6.8 with XCode 3.2.6.

The error is very odd:

==> ./bjam --prefix=/usr/local/Cellar/boost/1.47.0 --libdir=/usr/local/Cellar/boost/1.47.0/lib -d2 -q --disable-icu linkflag=-undefined dynamic_lookup -j2 --layout=tagged --user-config=user-config.jam threading=multi install
./bjam --prefix=/usr/local/Cellar/boost/1.47.0 --libdir=/usr/local/Cellar/boost/1.47.0/lib -d2 -q --disable-icu linkflag=-undefined dynamic_lookup -j2 --layout=tagged --user-config=user-config.jam threading=multi install
/private/tmp/homebrew-boost-1.47.0-OXZx/boost_1_47_0/tools/build/v2/build/feature.jam:320: in validate-feature from module feature
error: unknown feature "<linkflag>"

As far as I can tell, we don't set anything for linkflag in the formula ( ):

args = ["--prefix=#{prefix}",

If we compare that with the arguments bjam is showing on your install output, the linkflag stuff should appear between --libdir and -j in the args list---but there is nothing there.

Have you modified your boost formula at all?


Sorry, I forgot my local modify.
I check below issue and patch this comment's fix.
I'll revert this and try again.

commit dc21f8796dc5d2bef699b79c116c538312465f51
Author: sanemat <>
Date:   Tue Sep 6 08:46:34 2011 +0900

    add boost flag.

diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb
index a2ac261..1583514 100644
--- a/Library/Formula/boost.rb
+++ b/Library/Formula/boost.rb
@@ -57,6 +57,10 @@ class Boost < Formula

     args = ["--prefix=#{prefix}",
+            "-d2", # output compile lines
+            "-q", # stop on error
+            "--disable-icu", #don't try to compile aginst icu
+            "linkflag=-undefined dynamic_lookup", # don't fail in linking if python is only singl

Try again, but does not work fine for me.
$ brew install -v boost 2>&1


Looks like a problem with Python: bin.v2/libs/python/build/darwin-4.2.1/release/threading-multi/libboost_python-mt.dylib
Undefined symbols for architecture x86_64:
  "_environ", referenced from:
      _initposix in libpython2.7.a(posixmodule.o)
ld: symbol(s) not found for architecture x86_64

Also looks like you are using a custom Python installation:

-n Detecting Python root... 
-n Unicode/ICU support for Boost.Regex?

Any one of the following could provide a resolution to this problem:

  • Use the Python that comes with OS X or the one installed by Homebrew

  • Install boost --without-python

  • Ask the boost developers what the best way to work around this issue is as adding linkflag=-undefined dynamic_lookup is apparently not acceptable to bjam.


I choose --without-python, but it failed.

==> ./bjam --prefix=/usr/local/Cellar/boost/1.47.0 --libdir=/usr/local/Cellar/boost/1.47.0/lib -j2 --layout=tagged --user-config=user-config.jam threading=multi install --without-libraries=python
./bjam --prefix=/usr/local/Cellar/boost/1.47.0 --libdir=/usr/local/Cellar/boost/1.47.0/lib -j2 --layout=tagged --user-config=user-config.jam threading=multi install --without-libraries=python
error: wrong library name 'libraries=python' in the --without- option.

I want to try 3rd option adding linkflag, so would you give me more information?


I choose --without-python, but it failed.

Should be fixed by commit 874bc0a. It looks like the syntax of the option changed.

I want to try 3rd option adding linkflag, so would you give me more information?

I can't---I don't know Boost that well. The Boost developers are probably the ones that can help with that.


--without-python works fine!

I check boost version, completed.
$ ./a.out
Boost version: 0.198.fc

Thank you for your great help!

version confirm source

c++ - How to determine the Boost version on a system? - Stack Overflow

@sanemat sanemat closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.