Skip to content
This repository

boost install 1.47.0 failed #7633

Closed
sanemat opened this Issue September 14, 2011 · 7 comments

2 participants

Murahashi Sanemat Kenichi Charlie Sharpsteen
Murahashi Sanemat Kenichi

$ brew install -v boost 2>&1 |gist
https://gist.github.com/1217696
$ brew doctor |gist
https://gist.github.com/1217697

Charlie Sharpsteen
Owner

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 (https://github.com/mxcl/homebrew/blob/master/Library/Formula/boost.rb#L58-64 ):

args = ["--prefix=#{prefix}",
        "--libdir=#{lib}",
        "-j#{Hardware.processor_count}",
        "--layout=tagged",
        "--user-config=user-config.jam",
        "threading=multi",
        "install"]

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?

Murahashi Sanemat Kenichi

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

commit dc21f8796dc5d2bef699b79c116c538312465f51
Author: sanemat <o.gata.ken@gmail.com>
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}",
             "--libdir=#{lib}",
+            "-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
             "-j#{Hardware.processor_count}",
             "--layout=tagged",
             "--user-config=user-config.jam",
Murahashi Sanemat Kenichi

Try again, but does not work fine for me.
$ brew install -v boost 2>&1
https://gist.github.com/1230853
https://gist.github.com/1230862

Charlie Sharpsteen
Owner

Looks like a problem with Python:

darwin.link.dll 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... 
/Users/sane/.pythonbrew/pythons/Python-2.7.1
-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.

Murahashi Sanemat Kenichi

I choose --without-python, but it failed.
https://gist.github.com/1231198

==> ./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?

Charlie Sharpsteen
Owner

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.

Murahashi Sanemat Kenichi

--without-python works fine!
https://gist.github.com/1231286
https://gist.github.com/1231287

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

Thank you for your great help!

version confirm source
https://gist.github.com/1231283

c++ - How to determine the Boost version on a system? - Stack Overflow
http://stackoverflow.com/questions/3708706/how-to-determine-the-boost-version-on-a-system

Murahashi Sanemat Kenichi sanemat closed this September 20, 2011
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.