Building boost_zlib

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Building boost_zlib

#1 Post by Geoff the Medio »

I wasted half of today trying to build the boost_zlib library using MSVC2013 and Boost 1.58 with zlib 1.2.8.

The problem was that it never built the library, despite me doing everything I could find suggested to do to make it do so.

Eventually I figured it out (it was hiding in a different directory, and there's no indication of this). I attempted to post my findings in response to a similar issue on the Boost Trac issue tracker, but it rejects the post as potential spam, and the CAPTCHA doesn't work. To avoid losing the post, I'll just post it here... Perhaps it will be indexed and I might find it myself again in 3 years if I attempt to update the MSVC project files to the 2017 version, or similar.


Replying to [comment:1 anonymous]:
> The same goes for libraries:
> 1. libboost_zlib-vc120-mt-sgd-1_57.lib
> 2. libboost_zlib-vc120-mt-1_57.lib
> 3. libboost_zlib-vc120-mt-s-1_57.lib
> 4. libboost_zlib-vc120-sgd-1_57.lib
> 5. libboost_zlib-vc120-s-1_57.lib

I've been struggling with the same issue for several hours, but have just figured it out, at least for me.

I'm building Boost 1.58 with MSVC 2013, and zlib 1.2.8

I ran b2.exe in the boost_1_58_0\libs\iostreams\build directory, with a batch file containing the equivalent of

Code: Select all

 set NO_ZLIB=0
 set NO_COMPRESSION=0
 b2.exe toolset=msvc-12.0 variant=release link=shared threading=multi runtime-link=shared -sZLIB_SOURCE=C:\zlib-1.2.8}}}
where C:\zlib-1.2.8 is the directory where zlib's source code is located.

I don't know if the set commands are important, but searching online suggested them.

I was searching for hours to try to find why I'd never get the boost_zlib libraries / dlls built in the iostreams build directory, when I just discovered that instead of being in

Code: Select all

 libs\iostreams\build\msvc-12.0\release
as expected, the boost_zlib output files are located in

Code: Select all

 standalone\zlib\msvc-12.0\release
Part of the confusion was that there was occasionally some output about zlib not being found, which came or went depending how I wrote some of the commands, but never error messages about not finding it. Also, when it actually did run, there didn't seem to be any console output from the b2.exe call related to actually building the zlib stuff... it just outputs something like:

Code: Select all

 notice: Searching '../../..' for project-config configuration file 'project-config.jam
 notice: Loading project-config configuration file 'project-config.jam' from '../../..'
 notice: [zlib] Building zlib from source as boost_zlib
 notice: [zlib] Condition
 notice: [zlib] found zlib source in C:\zlib-1.2.8
 notice: iostreams: not using bzip2 compression
 notice: iostreams: not using bzip2 compression
 Performing configuration checks

    - 32-bit                   : yes (cached)
    - arm                      : no  (cached)
    - mips1                    : no  (cached)
    - power                    : no  (cached)
    - sparc                    : no  (cached)
    - x86                      : yes (cached)
 ...patience...
 ...found 811 targets...
and that's it... nothing about a particular .c file being built or a particular .dll being linked, as I would have expected / would have been clearer.

Post Reply