boost 1.63 fails to build with zlib and bzip2 in different directories
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
'
On 1/5/2017 6:48 AM, Andrea Bocci wrote:
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
Try removing the -sBZIP2... and -sZLIB... lines and adding to your userconfig.jam: using bzip2 : 1.0.6 : <include>full-path-to/bzip2-1.0.6 <search>full-path-to/bzip2-1.0.6 ; using zlib : 1.2.10 : <include>full-path-to/zlib-1.2.10 <search>full-path-to/zlib-1.2.10 ;
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 '
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 '
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
AMDG On 01/05/2017 10:34 AM, Edward Diener wrote:
On 1/5/2017 6:48 AM, Andrea Bocci wrote:
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
<snip>
but it looks like the build system does not like having the zlib and bzip2 libraries in different folders.
<snip> Try removing the -sBZIP2... and -sZLIB... lines and adding to your userconfig.jam:
using bzip2 : 1.0.6 : <include>full-path-to/bzip2-1.0.6 <search>full-path-to/bzip2-1.0.6 ; using zlib : 1.2.10 : <include>full-path-to/zlib-1.2.10 <search>full-path-to/zlib-1.2.10 ;
That will have the same problem. The bug is at a pretty low level. It will trigger regardless of how you specify the paths. In Christ, Steven Watanabe
On 01/05/2017 10:34 AM, Edward Diener wrote:
Try removing the -sBZIP2... and -sZLIB... lines and adding to your userconfig.jam:
using bzip2 : 1.0.6 : <include>full-path-to/bzip2-1.0.6 <search>full-path-to/bzip2-1.0.6 ; using zlib : 1.2.10 : <include>full-path-to/zlib-1.2.10 <search>full-path-to/zlib-1.2.10 ;
On 5 January 2017 at 18:42, Steven Watanabe
That will have the same problem. The bug is at a pretty low level. It will trigger regardless of how you specify the paths.
Hi Edward, Steven, indeed, replacing the -SBZIP2... and -sZLIB... lines with the suggested entries in user-config.jam gives me the same problem. In the meantime I've followed the problem down to libs/iostreams/build/Jamfile.v2 - here is a simplified version of it that causes the same error: $ cat ~/user-config.jam # local installation of bzip2 using bzip2 : 1.0.6 : <include>/home/fwyzard/src/boost/bzip2-1.0.6 <search>/home/fwyzard/src/boost/bzip2-1.0.6 ; # local installation of zlib using zlib : 1.2.10 : <include>/home/fwyzard/src/boost/zlib-1.2.10 <search>/home/fwyzard/src/boost/zlib-1.2.10 ; $ cat Jamfile.v2 project /boost/iostreams : source-location ../src ; local sources = file_descriptor.cpp mapped_file.cpp zlib.cpp gzip.cpp bzip2.cpp ; lib boost_iostreams : $(sources) : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 <define>BOOST_IOSTREAMS_USE_DEPRECATED <library>/zlib//zlib <library>/bzip2//bzip2 : : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 ; boost-install boost_iostreams : bzip2-requirements ; However, if I replace the library definitions with my own, it does work: $ cat Jamfile.v2 project /boost/iostreams : source-location ../src ; local sources = file_descriptor.cpp mapped_file.cpp zlib.cpp gzip.cpp bzip2.cpp ; lib zlib : : <name>z <include>/home/fwyzard/src/boost/common/include <search>/home/fwyzard/src/boost/common/lib ; lib bzip2 : : <name>bz2 <include>/home/fwyzard/src/boost/common/include <search>/home/fwyzard/src/boost/common/lib ; lib boost_iostreams : $(sources) : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 <define>BOOST_IOSTREAMS_USE_DEPRECATED <library>/zlib//zlib <library>/bzip2//bzip2 : : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 ; boost-install boost_iostreams : bzip2-requirements ; So it seems to be a problem with the way tools/build/src/tools/bzip2.jam , tools/build/src/tools/zlib.jam , etc. are implemented ? Is there a way to see what <library>/zlib//zlib <library>/bzip2//bzip2 expand to ? Thank you, .Andrea -- Strategy is a system of expedients. Generalfeldmarschall Helmuth Karl Bernhard Graf von Moltke
Sorry, silly copy and paste error, the working jam file is obviously
$ cat Jamfile.v2
project /boost/iostreams : source-location ../src ;
local sources = file_descriptor.cpp mapped_file.cpp zlib.cpp gzip.cpp
bzip2.cpp ;
lib zlib
:
: <name>z <include>/home/fwyzard/src/boost/common/include
<search>/home/fwyzard/src/boost/common/lib
;
lib bzip2
:
: <name>bz2 <include>/home/fwyzard/src/boost/common/include
<search>/home/fwyzard/src/boost/common/lib
;
lib boost_iostreams
: $(sources)
: <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
<define>BOOST_IOSTREAMS_USE_DEPRECATED
<library>zlib
<library>bzip2
:
: <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
;
boost-install boost_iostreams : bzip2-requirements ;
Thank you,
.Andrea
On 5 January 2017 at 19:13, Andrea Bocci
On 01/05/2017 10:34 AM, Edward Diener wrote:
Try removing the -sBZIP2... and -sZLIB... lines and adding to your userconfig.jam:
using bzip2 : 1.0.6 : <include>full-path-to/bzip2-1.0.6 <search>full-path-to/bzip2-1.0.6 ; using zlib : 1.2.10 : <include>full-path-to/zlib-1.2.10 <search>full-path-to/zlib-1.2.10 ;
On 5 January 2017 at 18:42, Steven Watanabe
wrote: That will have the same problem. The bug is at a pretty low level. It will trigger regardless of how you specify the paths.
Hi Edward, Steven, indeed, replacing the -SBZIP2... and -sZLIB... lines with the suggested entries in user-config.jam gives me the same problem.
In the meantime I've followed the problem down to libs/iostreams/build/Jamfile.v2 - here is a simplified version of it that causes the same error:
$ cat ~/user-config.jam # local installation of bzip2 using bzip2 : 1.0.6 : <include>/home/fwyzard/src/boost/bzip2-1.0.6 <search>/home/fwyzard/src/boost/bzip2-1.0.6 ;
# local installation of zlib using zlib : 1.2.10 : <include>/home/fwyzard/src/boost/zlib-1.2.10 <search>/home/fwyzard/src/boost/zlib-1.2.10 ;
$ cat Jamfile.v2 project /boost/iostreams : source-location ../src ;
local sources = file_descriptor.cpp mapped_file.cpp zlib.cpp gzip.cpp bzip2.cpp ;
lib boost_iostreams : $(sources) : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 <define>BOOST_IOSTREAMS_USE_DEPRECATED <library>/zlib//zlib <library>/bzip2//bzip2 : : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 ;
boost-install boost_iostreams : bzip2-requirements ;
However, if I replace the library definitions with my own, it does work:
$ cat Jamfile.v2 project /boost/iostreams : source-location ../src ;
local sources = file_descriptor.cpp mapped_file.cpp zlib.cpp gzip.cpp bzip2.cpp ;
lib zlib : : <name>z <include>/home/fwyzard/src/boost/common/include <search>/home/fwyzard/src/boost/common/lib ;
lib bzip2 : : <name>bz2 <include>/home/fwyzard/src/boost/common/include <search>/home/fwyzard/src/boost/common/lib ;
lib boost_iostreams : $(sources) : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 <define>BOOST_IOSTREAMS_USE_DEPRECATED <library>/zlib//zlib <library>/bzip2//bzip2 : : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 ;
boost-install boost_iostreams : bzip2-requirements ;
So it seems to be a problem with the way tools/build/src/tools/bzip2.jam , tools/build/src/tools/zlib.jam , etc. are implemented ?
Is there a way to see what <library>/zlib//zlib <library>/bzip2//bzip2 expand to ?
Thank you, .Andrea
-- Strategy is a system of expedients.
Generalfeldmarschall Helmuth Karl Bernhard Graf von Moltke
-- Strategy is a system of expedients. Generalfeldmarschall Helmuth Karl Bernhard Graf von Moltke
And here is the working jam file using two separate locations: $ cat Jamfile.v2 project /boost/iostreams : source-location ../src ; local sources = file_descriptor.cpp mapped_file.cpp zlib.cpp gzip.cpp bzip2.cpp ; lib zlib : : <name>z <include>/home/fwyzard/src/boost/zlib-1.2.10 <search>/home/fwyzard/src/boost/zlib-1.2.10 ; lib bzip2 : : <name>bz2 <include>/home/fwyzard/src/boost/bzip2-1.0.6 <search>/home/fwyzard/src/boost/bzip2-1.0.6 ; lib boost_iostreams : $(sources) : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 <define>BOOST_IOSTREAMS_USE_DEPRECATED <library>zlib <library>bzip2 : : <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1 ; boost-install boost_iostreams : bzip2-requirements ; .Andrea -- Strategy is a system of expedients. Generalfeldmarschall Helmuth Karl Bernhard Graf von Moltke
On 1/5/2017 12:42 PM, Steven Watanabe wrote:
AMDG
On 01/05/2017 10:34 AM, Edward Diener wrote:
On 1/5/2017 6:48 AM, Andrea Bocci wrote:
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
<snip>
but it looks like the build system does not like having the zlib and bzip2 libraries in different folders.
<snip> Try removing the -sBZIP2... and -sZLIB... lines and adding to your userconfig.jam:
using bzip2 : 1.0.6 : <include>full-path-to/bzip2-1.0.6 <search>full-path-to/bzip2-1.0.6 ; using zlib : 1.2.10 : <include>full-path-to/zlib-1.2.10 <search>full-path-to/zlib-1.2.10 ;
That will have the same problem. The bug is at a pretty low level. It will trigger regardless of how you specify the paths.
Does that mean that the bug is a Boost Build bug ? In my own user-config.jam on Windows I can specify: using zlib : 1.2.8 : <source>E:/Utilities/zlib/zlib-1.2.8 ; using bzip2 : 1.0.6 : <source>E:/Utilities/bzip2/bzip2-1.0.6 ; in order to build from source and this does work. Does that mean that the bug only occurs when specifying the already built binary include and library paths as opposed to building from source ? The iostream build was changed in the past by you and "loonycyborg", whoever that is, to use a different way of handling zlib and bzip2. So I think that you may know how this problem should be fixed, whether in the iostreams build jamfile or in Boost Build.
AMDG On 01/05/2017 12:42 PM, Edward Diener wrote:
On 1/5/2017 12:42 PM, Steven Watanabe wrote:
<snip> That will have the same problem. The bug is at a pretty low level. It will trigger regardless of how you specify the paths.
Does that mean that the bug is a Boost Build bug ?
Yes.
In my own user-config.jam on Windows I can specify:
using zlib : 1.2.8 : <source>E:/Utilities/zlib/zlib-1.2.8 ; using bzip2 : 1.0.6 : <source>E:/Utilities/bzip2/bzip2-1.0.6 ;
in order to build from source and this does work. Does that mean that the bug only occurs when specifying the already built binary include and library paths as opposed to building from source ?
That is correct. The bug is in the code that detects whether the library is linkable. When building from source, this is irrelevant.
The iostream build was changed in the past by you and "loonycyborg", whoever that is, to use a different way of handling zlib and bzip2. So I think that you may know how this problem should be fixed, whether in the iostreams build jamfile or in Boost Build.
The bug is in build/ac.jam. Basically, it accidentally attempts to share incompatible components between between the checks for zlib and bzip2. In Christ, Steven Watanabe
On 1/5/2017 3:15 PM, Steven Watanabe wrote:
AMDG
On 01/05/2017 12:42 PM, Edward Diener wrote:
On 1/5/2017 12:42 PM, Steven Watanabe wrote:
<snip> That will have the same problem. The bug is at a pretty low level. It will trigger regardless of how you specify the paths.
Does that mean that the bug is a Boost Build bug ?
Yes.
In my own user-config.jam on Windows I can specify:
using zlib : 1.2.8 : <source>E:/Utilities/zlib/zlib-1.2.8 ; using bzip2 : 1.0.6 : <source>E:/Utilities/bzip2/bzip2-1.0.6 ;
in order to build from source and this does work. Does that mean that the bug only occurs when specifying the already built binary include and library paths as opposed to building from source ?
That is correct. The bug is in the code that detects whether the library is linkable. When building from source, this is irrelevant.
The iostream build was changed in the past by you and "loonycyborg", whoever that is, to use a different way of handling zlib and bzip2. So I think that you may know how this problem should be fixed, whether in the iostreams build jamfile or in Boost Build.
The bug is in build/ac.jam. Basically, it accidentally attempts to share incompatible components between between the checks for zlib and bzip2.
Can this be fixed ?
On 5 January 2017 at 22:05, Edward Diener
On 1/5/2017 3:15 PM, Steven Watanabe wrote:
AMDG
On 01/05/2017 12:42 PM, Edward Diener wrote:
On 1/5/2017 12:42 PM, Steven Watanabe wrote:
<snip> That will have the same problem. The bug is at a pretty low level. It will trigger regardless of how you specify the paths.
Does that mean that the bug is a Boost Build bug ?
Yes.
<snip>
The bug is in build/ac.jam. Basically, it accidentally attempts to share incompatible components between between the checks for zlib and bzip2.
Can this be fixed ?
I think so. Please find my attempt at https://github.com/boostorg/build/pull/154 - with it, I can successfully run my original build command. Ciao, .Andrea -- Strategy is a system of expedients. Generalfeldmarschall Helmuth Karl Bernhard Graf von Moltke
Andrea,
I had issues many years ago getting boost to build on windows with zlib &
bzip support. I wrote up the problems I had an the solution I found at the
time at stackoverflow (
http://stackoverflow.com/questions/4589935/boost-iostreams-with-bzip2-built-...).
I'm not sure if this is still relevant, as a former coworker told me that
my instructions no longer worked on newer versions, but I was given no
detail, but maybe it could give you a starting point on how to get it to
work.
Regards,
Nate
On Thu, Jan 5, 2017 at 5:48 AM, Andrea Bocci
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#or-build-custom-binaries
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.xz 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.bz2 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 '
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 '
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
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 5 January 2017 at 18:35, Nathan Ernst
Andrea,
I had issues many years ago getting boost to build on windows with zlib & bzip support. I wrote up the problems I had an the solution I found at the time at stackoverflow (http://stackoverflow.com/questions/4589935/boost- iostreams-with-bzip2-built-from-source-on-windows). I'm not sure if this is still relevant, as a former coworker told me that my instructions no longer worked on newer versions, but I was given no detail, but maybe it could give you a starting point on how to get it to work.
Regards, Nate
Hi Nate, thanks for the link. I had a look at you post, but unfortunately my problems appear much earlier - boost (or rather, the iostreams library) never compiles, as it does not manage to put together a valida configuration. Ciao, .Andrea
participants (4)
-
Andrea Bocci
-
Edward Diener
-
Nathan Ernst
-
Steven Watanabe