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
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:
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 '<pbuild/boost/bin.v2/standalone/ac/gcc-5.4.1/release/threading-multi>main.o'
error:
error: Tried to build the target twice, with property sets having
error: these incompatible properties:
error:
error: - <dll-path>../zlib-1.2.10 <library-path>../zlib-1.2.10 <xdll-path>../zlib-1.2.10
error: - <dll-path>../bzip2-1.0.6 <library-path>../bzip2-1.0.6 <xdll-path>../bzip2-1.0.6
error:
error: Please make sure to have consistent requirements for these
error: properties everywhere in your project, especially for install
error: targets.
I get a similar error if I specify only one of bzip and bzip2.
For example
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" \
-sZLIB_INCLUDE=../common/include \
-sZLIB_LIBPATH=../common/lib \
stage
results in
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 '<pbuild/boost/bin.v2/standalone/ac/gcc-5.4.1/release/threading-multi>main.o'
error:
error: Tried to build the target twice, with property sets having
error: these incompatible properties:
error:
error: - <dll-path>../common/lib <library-path>../common/lib <xdll-path>../common/lib
error: - none
error:
error: Please make sure to have consistent requirements for these
error: properties everywhere in your project, especially for install
error: targets.
As far as I can tell, this used to work with boost 1.57 - I haven't tried any version in between.
Anybody has any suggestions ?
Thank you,
.Andrea
--
Strategy is a system of expedients.
Generalfeldmarschall Helmuth Karl Bernhard Graf von Moltke