Hi,
I'm trying to build custom binaries for boost 1.63 using zlib and bzip2
from a local installation rather than the system ones, following the
instructions at
http://www.boost.org/doc/libs/1_63_0/more/getting_started/unix-variants.html...
and
http://www.boost.org/doc/libs/1_63_0/libs/iostreams/doc/installation.html
but it looks like the build system does not like having the zlib and bzip2
libraries in different folders.
Here's what I'm doing to set up the build environment:
# create a common directory for zlib and bzip2
mkdir common
# build zlib
wget
http://downloads.sourceforge.net/project/libpng/zlib/1.2.10/zlib-1.2.10.tar....
tar xaf zlib-1.2.10.tar.xz
cd zlib-1.2.10/
./configure
make test
make install prefix=../common
cd ..
# build bzip2
wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar xaf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6/
make -f Makefile-libbz2_so
make test
make install PREFIX=../common
cp -ar libbz2.so.* ../common/lib/
cd ..
# build boost
wget
https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.b...
tar xaf boost_1_63_0.tar.bz2
cd boost_1_63_0/
mkdir boost-build
cd tools/build/
./bootstrap.sh gcc
./b2 install --prefix=../../boost-build
cd ../../
export PATH=$PWD/boost-build/bin:$PATH
Now, if I tell boost to pick zlib and bzip2 from the common directory with
b2 -q \
-d+2 \
--build-dir=build \
--stage-dir=stage \
--disable-icu \
--without-atomic \
--without-chrono \
--without-container \
--without-context \
--without-coroutine \
--without-exception \
--without-graph \
--without-graph_parallel \
--without-locale \
--without-log \
--without-math \
--without-mpi \
--without-random \
--without-wave \
toolset=gcc \
link=shared \
threading=multi \
variant=release \
cxxflags="-std=c++11 -O2" \
-sBZIP2_INCLUDE=../common/include \
-sBZIP2_LIBPATH=../common/lib \
-sZLIB_INCLUDE=../common/include \
-sZLIB_LIBPATH=../common/lib \
stage
it works just fine.
However, if I try to build boost using two separate directories for bip2
and zlib, with
b2 -q \
-d+2 \
--build-dir=build \
--stage-dir=stage \
--disable-icu \
--without-atomic \
--without-chrono \
--without-container \
--without-context \
--without-coroutine \
--without-exception \
--without-graph \
--without-graph_parallel \
--without-locale \
--without-log \
--without-math \
--without-mpi \
--without-random \
--without-wave \
toolset=gcc \
link=shared \
threading=multi \
variant=release \
cxxflags="-std=c++11 -O2" \
-sBZIP2_INCLUDE=../bzip2-1.0.6 \
-sBZIP2_LIBPATH=../bzip2-1.0.6 \
-sZLIB_INCLUDE=../zlib-1.2.10 \
-sZLIB_LIBPATH=../zlib-1.2.10 \
stage
the build fails with
Performing configuration checks
- 32-bit : no
- 64-bit : yes
- arm : no
- mips1 : no
- power : no
- sparc : no
- x86 : yes
- symlinks supported : yes
- C++11 mutex : yes
- Boost.Config Feature Check: cxx11_auto_declarations : yes
- Boost.Config Feature Check: cxx11_constexpr : yes
- Boost.Config Feature Check: cxx11_defaulted_functions : yes
- Boost.Config Feature Check: cxx11_final : yes
- Boost.Config Feature Check: cxx11_hdr_mutex : yes
- Boost.Config Feature Check: cxx11_hdr_tuple : yes
- Boost.Config Feature Check: cxx11_lambdas : yes
- Boost.Config Feature Check: cxx11_noexcept : yes
- Boost.Config Feature Check: cxx11_nullptr : yes
- Boost.Config Feature Check: cxx11_rvalue_references : yes
- Boost.Config Feature Check: cxx11_template_aliases : yes
- Boost.Config Feature Check: cxx11_thread_local : yes
- Boost.Config Feature Check: cxx11_variadic_templates : yes
- zlib : yes
error: at
/home/fwyzard/src/boost/boost_1_63_0/tools/build/src/kernel/modules.jam:107
error: Name clash for
'