boost-install-ing zlib (Was: Re: [Release] Boost 1.70.0 Beta 1 Release Candidate 2)
I'll need to try and see what happens with <source> in user-config. Probably nothing good, because one would expect neither <build-name> nor <tag> to be specified in such a case.
If I remove the check for ZLIB_SOURCE, and just do alias boost_zlib : /zlib//zlib ; libraries-to-install += boost_zlib ; unconditionally in libs/iostreams/build/Jamfile, this is what happens: - when `using zlib : : <source>C:/Projects/zlib-1.2.11 ;` is in user-config, the default `b2 install` fails because `address-model=32,64 variant=debug,release` conflict as all try to build `libz.lib`. When address-model=32 variant=debug is given, `libz.lib` is installed in C:\Boost\lib, and the CMake configuration for boost_zlib correctly points to it. - when using a prebuilt `using zlib : : <include>C:/Projects/include <search>C:/Projects/lib <name>zlib-8 ;`, the CMake configuration file for boost_zlib points to "${_BOOST_LIBDIR}/zlib-8", which is not correct.
I'll need to try and see what happens with <source> in user-config. Probably nothing good, because one would expect neither <build-name> nor <tag> to be specified in such a case.
If I remove the check for ZLIB_SOURCE, and just do
alias boost_zlib : /zlib//zlib ; libraries-to-install += boost_zlib ;
unconditionally in libs/iostreams/build/Jamfile, this is what happens:
- when `using zlib : : <source>C:/Projects/zlib-1.2.11 ;` is in user-config, the default `b2 install` fails because `address-model=32,64 variant=debug,release` conflict as all try to build `libz.lib`. When address-model=32 variant=debug is given, `libz.lib` is installed in C:\Boost\lib, and the CMake configuration for boost_zlib correctly points to it.
And if I use using zlib : : <source>C:/Projects/zlib-1.2.11 <build-name>z32d : <address-model>32 <variant>debug ; using zlib : : <source>C:/Projects/zlib-1.2.11 <build-name>z64d : <address-model>64 <variant>debug ; using zlib : : <source>C:/Projects/zlib-1.2.11 <build-name>z32 : <address-model>32 <variant>release ; using zlib : : <source>C:/Projects/zlib-1.2.11 <build-name>z64 : <address-model>64 <variant>release ; instead, `b2 install --with-iostreams` works as expected. It would be more user-friendly if we somehow did automatically apply <tag> to the simple using zlib : : <source>C:/Projects/zlib-1.2.11 ; , but zlib.jam is in Boost.Build and the <tag> is in Boost Jamroot. :-/ Either way, a more correct check for whether `boost-install boost_zlib` needs to be performed is "whether /zlib//zlib is being built from source", but I'm not sure how to express this condition.
AMDG On 3/13/19 12:14 PM, Peter Dimov via Boost wrote:
I'll need to try and see what happens with <source> in user-config. Probably nothing good, because one would expect neither <build-name> nor <tag> to be specified in such a case.
If I remove the check for ZLIB_SOURCE, and just do
alias boost_zlib : /zlib//zlib ; libraries-to-install += boost_zlib ;
unconditionally in libs/iostreams/build/Jamfile, this is what happens:
- when `using zlib : : <source>C:/Projects/zlib-1.2.11 ;` is in user-config, the default `b2 install` fails because `address-model=32,64 variant=debug,release` conflict as all try to build `libz.lib`.
This is a known issue and I have plans for fixing it. Brief outline: iostreams/build/Jamfile: import zlib ; # This will apply if a source directory is specified # but no <tag> or <build-name>. Explicit control of # the library name in a config file will override it. zlib.add-default-name boost_zlib : @boostcpp.tag ; # use /zlib//boost_zlib instead of /zlib//zlib
When address-model=32 variant=debug is given, `libz.lib` is installed in C:\Boost\lib, and the CMake configuration for boost_zlib correctly points to it.
- when using a prebuilt `using zlib : : <include>C:/Projects/include <search>C:/Projects/lib <name>zlib-8 ;`, the CMake configuration file for boost_zlib points to "${_BOOST_LIBDIR}/zlib-8", which is not correct.
I think this should be handled by checking for SEARCHED_LIB targets (in generate-cmake-variant maybe?) In Christ, Steven Watanabe
participants (2)
-
Peter Dimov
-
Steven Watanabe