On 03/06/2018 02:51 AM, Sebastian Pfützner via Boost-users wrote:
>
> I tried to build boost iostreams with zlib support with the following
> command on Windows:
>
> b2 -j 10 --build-dir=build\x64 --stagedir=stage\x64 --toolset=msvc
> -sZLIB_SOURCE=L:\vc14\zlib\zlib-1.2.8 runtime-link=shared link=static
> threading=multi address-model=64 debug release stage
>
This is supposed to work. If you add --debug-configuration,
what does it say about zlib?
> But if I try to link my program using iostreams with zlib filter it
> complains about the missing file libboost_zlib-vc140-mt-x64-1_66.lib,
> and I see it was not built. I also tried editing the project-config.jam
> as described in the docs:
>
In Christ,
Steven Watanabe
On 03/07/2018 02:34 AM, Sebastian Pfützner via Boost-users wrote:
> Am 06.03.2018 um 22:22 schrieb Steven Watanabe via Boost-users:
>> This is supposed to work. If you add --debug-configuration,
>> what does it say about zlib?
>
> Ok, after calling b2 --clean and deleting the build and stage directory,
> it worked. It seems that b2 sometimes doesn't detect changed parameters.
>
> So I tried again with a prebuild zlib:
>
> b2 -j 10 --build-dir=build\x64 --stagedir=stage\x64 --toolset=msvc
> --debug-configuration -sZLIB_BINARY=zlibstat.lib
> -sZLIB_INCLUDE=L:\vc14\zlib\zlib-1.2.8
> -sZLIB_LIBPATH=L:\vc14\zlib\zlib-1.2.8\contrib\vstudio\vc11\x64\ZlibStatReleaseWithoutAsm
> runtime-link=shared link=static threading=multi address-model=64 debug
> release stage
>
> This time libboost_zlib...lib is again not built
That's expected when you use a pre-built binary.
> and the output
> regarding zlib is:
>
> ...
> notice: [zlib] Using pre-installed library
> notice: [zlib] Condition
> ...
> - zlib : no
> ...
>
> So what is wrong now?
>
Look at bin.v2/configure.log. It should show
a failure either to include zlib.h or to link
to the library.
> Thanks in advance!
>
In Christ,
Steven Watanabe
On 03/09/2018 02:03 AM, Sebastian Pfützner via Boost-users wrote:
> Am 07.03.2018 um 16:07 schrieb Steven Watanabe via Boost-users:
>> Look at bin.v2/configure.log. It should show
>> a failure either to include zlib.h or to link
>> to the library.
>
> Yes, it was the ".lib" of the library name. If I remove it, it finds
> zlib again. But now I'm back at square one. My program does not build
> because boost wants to link against libboost_zlib-vc140-mt-x64-1_66.lib.
> Do I need to define something to get boost to use my prebuild zlib?
>
It looks like the auto-linking code for
zlib was written assuming that you are building
zlib from source. You can add -DBOOST_IOSTREAMS_NO_LIB,
but then you also need to link to boost_iostreams
explicitly.
In Christ,
Steven Watanabe
On 03/12/2018 07:58 AM, Sebastian Pfützner via Boost-users wrote:
> Am 09.03.2018 um 16:30 schrieb Steven Watanabe via Boost-users:
>> It looks like the auto-linking code for
>> zlib was written assuming that you are building
>> zlib from source. You can add -DBOOST_IOSTREAMS_NO_LIB,
>> but then you also need to link to boost_iostreams
>> explicitly.
>
> Thanks for your time, I could finally solve the problem.
> Do you think, this behavior should be reported? Is this:
> https://svn.boost.org/trac10/newticket still the right place for bug
> reports for boost iostream?
>
Yes. I looked at the code again, and it seems you can
get auto-linking to work with -DBOOST_ZLIB_BINARY=<libraryname>
This doesn't seem to be documented, though, which
is a bug.
In Christ,
Steven Watanabe
Please report problems for iostreams at
https://github.com/boostorg/iostreams/issues.