boost fails to build with C++11 and MPI #16273

Closed
StephanDollberg opened this Issue Nov 27, 2012 · 6 comments

4 participants

@StephanDollberg

I am trying to build boost with the --with-c++11 and the --with-mpi option. Without mpi it builds just fine. Brew doctor tells me that everything is fine.

I am using the following command:

brew -v install boost --with-c++11 --with-mpi

I get the following output:

Homebrew 0.9.3
/usr/local/bin/mpicc --version
/usr/local/bin/mpicxx --version
==> Downloading http://downloads.sourceforge.net/project/boost/boost/1.52.0/boost_1_52_0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/boost-1.52.0.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/boost-1.52.0.tar.bz2
==> Downloading patches
/usr/bin/curl -f#LA Homebrew 0.9.3 (Ruby 1.8.7-358; Mac OS X 10.8.2) https://svn.boost.org/trac/boost/raw-attachment/ticket/7671/libcpp_c11_numeric_limits.patch -o 000-homebrew.diff
######################################################################## 100.0%
==> Patching
/usr/bin/patch -f -p0 -i 000-homebrew.diff
patching file boost/config/stdlib/libcpp.hpp
==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.52.0 --libdir=/usr/local/Cellar/boost/1.52.0/lib --with-toolset=clang --without-icu
./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.52.0 --libdir=/usr/local/Cellar/boost/1.52.0/lib --with-toolset=clang --without-icu
-n Building Boost.Build engine with toolset clang... 
tools/build/v2/engine/bin.macosxx86_64/b2
-n Detecting Python version... 
2.7
-n Detecting Python root... 
/System/Library/Frameworks/Python.framework/Versions/2.7
-n Unicode/ICU support for Boost.Regex?... 
disabled.
Generating Boost.Build configuration in project-config.jam...

Bootstrapping is done. To build, run:

    ./b2

To adjust configuration, edit 'project-config.jam'.
Further information:

   - Command line help:
     ./b2 --help

   - Getting started guide: 
     http://www.boost.org/more/getting_started/unix-variants.html

   - Boost.Build documentation:
     http://www.boost.org/boost-build2/doc/html/index.html

==> ./b2 --prefix=/usr/local/Cellar/boost/1.52.0 --libdir=/usr/local/Cellar/boost/1.52.0/lib -d2 -j4 --layout=tagged --user-config=user-config.jam threading=multi install toolset=clang cxxflags=-std=c++11 cxxflags=-stdlib=libc++ cxxflags=-fPIC linkflags=-stdlib=libc++ linkflags=-headerpad_max_install_names linkflags=-arch x86_64
./b2 --prefix=/usr/local/Cellar/boost/1.52.0 --libdir=/usr/local/Cellar/boost/1.52.0/lib -d2 -j4 --layout=tagged --user-config=user-config.jam threading=multi install toolset=clang cxxflags=-std=c++11 cxxflags=-stdlib=libc++ cxxflags=-fPIC linkflags=-stdlib=libc++ linkflags=-headerpad_max_install_names linkflags=-arch x86_64
Performing configuration checks

    - 32-bit                   : no
    - 64-bit                   : yes
    - x86                      : yes
    - has_icu builds           : no
    - iconv (libc)             : no
    - iconv (separate)         : yes
    - icu                      : no
    - icu (lib64)              : no
    - gcc visibility           : yes
    - long double support      : yes

Component configuration:

    - chrono                   : building
    - context                  : building
    - date_time                : building
    - exception                : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - iostreams                : building
    - locale                   : building
    - math                     : building
    - mpi                      : building
    - program_options          : building
    - python                   : building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - signals                  : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - wave                     : building

...patience...
...patience...
...patience...
...patience...
...found 31695 targets...
...updating 10792 targets...

... thousands of lines ...

common.copy /usr/local/Cellar/boost/1.52.0/lib/libboost_test_exec_monitor-mt.a

    cp "bin.v2/libs/test/build/clang-darwin-4.2.1/release/link-static/threading-multi/libboost_test_exec_monitor-mt.a"  "/usr/local/Cellar/boost/1.52.0/lib/libboost_test_exec_monitor-mt.a"

clang-darwin.compile.c++ bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/cpplexer/re2clex/cpp_re.o

    "clang++" -x c++ -O3 -fPIC -std=c++11 -stdlib=libc++ -O3 -finline-functions -Wno-inline -w -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/cpplexer/re2clex/cpp_re.o" "libs/wave/src/cpplexer/re2clex/cpp_re.cpp"

clang-darwin.link.dll /usr/local/Cellar/boost/1.52.0/lib/libboost_wave-mt.dylib

    "clang++" -arch x86_64 -headerpad_max_install_names -stdlib=libc++ -arch x86_64 -headerpad_max_install_names -stdlib=libc++  -o "/usr/local/Cellar/boost/1.52.0/lib/libboost_wave-mt.dylib" -single_module -dynamiclib -install_name "libboost_wave-mt.dylib" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/instantiate_cpp_exprgrammar.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/instantiate_cpp_grammar.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/instantiate_cpp_literalgrs.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/instantiate_defined_grammar.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/instantiate_predef_macros.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/instantiate_re2c_lexer.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/instantiate_re2c_lexer_str.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/token_ids.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/wave_config_constant.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/cpplexer/re2clex/aq.o" "bin.v2/libs/wave/build/clang-darwin-4.2.1/release/threading-multi/cpplexer/re2clex/cpp_re.o" "bin.v2/libs/chrono/build/clang-darwin-4.2.1/release/threading-multi/libboost_chrono-mt.dylib" "bin.v2/libs/date_time/build/clang-darwin-4.2.1/release/threading-multi/libboost_date_time-mt.dylib" "bin.v2/libs/thread/build/clang-darwin-4.2.1/release/threading-multi/libboost_thread-mt.dylib" "bin.v2/libs/filesystem/build/clang-darwin-4.2.1/release/threading-multi/libboost_filesystem-mt.dylib" "bin.v2/libs/system/build/clang-darwin-4.2.1/release/threading-multi/libboost_system-mt.dylib"     

...failed updating 1 target...
...skipped 2 targets...
...updated 10789 targets...
==> Configuration
HOMEBREW_VERSION: 0.9.3
HEAD: 2e65c80404467a7135732da404bf741517bc9069
CPU: quad-core 64-bit ivybridge
OS X: 10.8.2-x86_64
Xcode: 4.5.2
CLT: 4.5.0.0.1.1249367152
X11: N/A
==> ENV
CC: cc
CXX: c++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/mountain_lion
OBJC: cc
PATH: /usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin:::::/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/texlive/2012/bin/x86_64-darwin:/usr/local/Library/Contributions/cmds

Error: boost did not build

These open issues may also help:
    https://github.com/mxcl/homebrew/issues/14749
    https://github.com/mxcl/homebrew/issues/16142

I checked this bugreport but it is more about ICU and doesn't cover C++11.

The whole output can be found here gist.

If you need any additional information, feel free to ask.

Thanks in advance.
Stephan

@manphiz

Seems like another incompatibility when enabling C++11, as openmpi is built against system header and libstdc++. Maybe worth a try to add C++11 build option to open-mpi. However there needs a way for homebrew to test such options as dependencies, or there will be more breakage.

@manphiz

They don't enable C++11 support at all.

Maybe making the C++11 option conflicts with other dependency-based options that don't have C++11 mode enabled.

EDIT: grammar.

@adamv

Will accept a pull request that fails the build if conflicting options are specified, otherwise closing this vaguely as an upstream issue.

@adamv adamv closed this Jan 20, 2013
@gnzlbg

It might be an upstream issue, but the options should still be marked as conflicted if they don't work. Was this communicated to the boost developers mailing list? If so, does anyone know the thread?

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.