
Can someone provide a command line that builds iostreams with zlib and bz2 support? I tried the following but my program still fails to link to libboost_zlib. I did find a boost_zlib-vc90-mt-1_38.dll and a boost_zlib-vc90-mt-1_38.lib, but no libboost_zlib-vc90-mt-gd-1_38.lib bjam toolset=msvc-9.0 -sHAS_ZLIB=1 -sHAS_BZIP2=1 -sNO_COMPRESSION=0 -sNO_BZIP2=0 -s -sNO_ZLIB=0 -sZLIB_INCLUDE=C:/nan/compression/zlib/zlib123-dll/include -sZLIB_LIBPATH=C:/nan/compression/zlib/zlib123-dll/lib -sZLIB_SOURCE=C:/nan/compression/zlib/zlib-1.2.3 -sBZIP2_INCLUDE=C:/nan/compression/bz2/bzip2-1.0.5 -sBZIP2_LIBPATH=C:/nan/compression/bz2/bzip2-1.0.5 -sBZIP2_SOURCE=C:/nan/compression/bz2/bzip2-1.0.5 Thanks Andy

AMDG Andy Schweitzer wrote:
Can someone provide a command line that builds iostreams with zlib and bz2 support?
I tried the following but my program still fails to link to libboost_zlib. I did find a boost_zlib-vc90-mt-1_38.dll and a boost_zlib-vc90-mt-1_38.lib, but no libboost_zlib-vc90-mt-gd-1_38.lib
bjam toolset=msvc-9.0 -sHAS_ZLIB=1 -sHAS_BZIP2=1 -sNO_COMPRESSION=0 -sNO_BZIP2=0 -s -sNO_ZLIB=0 -sZLIB_INCLUDE=C:/nan/compression/zlib/zlib123-dll/include -sZLIB_LIBPATH=C:/nan/compression/zlib/zlib123-dll/lib -sZLIB_SOURCE=C:/nan/compression/zlib/zlib-1.2.3 -sBZIP2_INCLUDE=C:/nan/compression/bz2/bzip2-1.0.5 -sBZIP2_LIBPATH=C:/nan/compression/bz2/bzip2-1.0.5 -sBZIP2_SOURCE=C:/nan/compression/bz2/bzip2-1.0.5
Just add the arguments debug link=static In Christ, Steven Watanabe

Steven Watanabe wrote:
AMDG
[snip]
Just add the arguments debug link=static
In Christ, Steven Watanabe
That didn't work, but your idea gave me a hint to look at Getting Started re bjam's defaults... then I tried the handy --debug-building and --debug-configuration which report concisely, and I see this: notice: iostreams: not using zlib compression and in libs\iostreams\build\Jamfile.v2 I see: if [ os.name ] = NT && ! $($(LIB)_SOURCE) && ! $($(LIB)_INCLUDE) { if $(debug) { ECHO "notice: iostreams: not using $(library-name) compression " ; } NO_$(LIB) = 1 ; I'm not sure what this means, but apparently it's unhappy with how I told it the source locations, which was: bjam iostreams toolset=msvc-9.0 -sHAS_ZLIB=1 -sHAS_BZIP2=1 -sNO_COMPRESSION=0 -sNO_BZIP2=0 -sNO_ZLIB=0 -sZLIB_INCLUDE=D:/nan/compression/zlib/zlib123-dll/include -sZLIB_LIBPATH=D:/nan/compression/zlib/zlib123-dll/lib -sZLIB_SOURCE=D:/nan/compression/zlib/zlib-1.2.3 -sBZIP2_INCLUDE=D:/nan/compression/bz2/bzip2-1.0.5 -sBZIP2_LIBPATH=D:/nan/compression/bz2/bzip2-1.0.5 -sBZIP2_SOURCE=D:/nan/compression/bz2/bzip2-1.0.5 I tried modifying Jamfile.v2 to print more information by adding these lines: if [ os.name ] = NT && ! $($(LIB)_SOURCE) && ! $($(LIB)_INCLUDE) { if $(debug) { #new line ECHO "source of [$(LIB)_SOURCE]: $($(LIB)_SOURCE) " ; #new line ECHO "include of [$(LIB)_INCLUDE]: $($(LIB)_INCLUDE) " ; ECHO "notice: iostreams: not using $(library-name) compression " ; } NO_$(LIB) = 1 ; But these don't seem to be printed... any idea what's wrong with that way of debugging a jamfile?

AMDG Andrew Schweitzer wrote:
ECHO "source of [$(LIB)_SOURCE]: $($(LIB)_SOURCE) " ;
But these don't seem to be printed... any idea what's wrong with that way of debugging a jamfile?
Try ECHO "source of [$(LIB)_SOURCE]:" $($(LIB)_SOURCE) ; i.e. move the quote. bjam's rules for variable expansion cause your version to produce an empty string when $(LIB)_SOURCE is empty. In Christ, Steven Watanabe

Steven Watanabe wrote:
AMDG
Andrew Schweitzer wrote:
ECHO "source of [$(LIB)_SOURCE]: $($(LIB)_SOURCE) " ;
But these don't seem to be printed... any idea what's wrong with that way of debugging a jamfile?
Try ECHO "source of [$(LIB)_SOURCE]:" $($(LIB)_SOURCE) ; i.e. move the quote. bjam's rules for variable expansion cause your version to produce an empty string when $(LIB)_SOURCE is empty.
Turns out first code worked as well --- branch just wasn't being entered. ECHO seems a pretty good way to debug jamfiles. Using ECHO I discovered that -NO_COMPRESSION=0 actually turns NO_COMPRESSION *on*. So just leaving out all NO_* defines from command line improves things. I did discover that bjam iostreams ... doesn't seem to create the libboost*.lib files... if I tack "stage" onto the end of the command line they *are* created... but everything is built, not just iostreams.... I must admit I find bjam fairly confusing. So adding "stage" caused libboost* files to be created for zlib and bzip2... but now I get linking errors with bzip2. It complains that __thiscall boost::iostreams::detail::bzip2_base::~bzip2_base and several other functions in bzip2_base are not implemented... hm...
In Christ, Steven Watanabe

AMDG Andrew Schweitzer wrote:
Turns out first code worked as well --- branch just wasn't being entered. ECHO seems a pretty good way to debug jamfiles.
The first version will work as long as the value actually exists.
Using ECHO I discovered that -NO_COMPRESSION=0 actually turns NO_COMPRESSION *on*. So just leaving out all NO_* defines from command line improves things.
I did discover that bjam iostreams ... doesn't seem to create the libboost*.lib files... if I tack "stage" onto the end of the command line they *are* created... but everything is built, not just iostreams.... I must admit I find bjam fairly confusing.
bjam --with-iostreams stage ... I believe that this is documented by bjam --help Incidentally, in 1.38, the files are created under bin.v2 regardless of whether you specify stage or not, if I remember correctly.
So adding "stage" caused libboost* files to be created for zlib and bzip2... but now I get linking errors with bzip2. It complains that __thiscall boost::iostreams::detail::bzip2_base::~bzip2_base and several other functions in bzip2_base are not implemented...
It looks like these are defined in libboost_iostreams... Can you check whether bzip2.cpp is actually being added to the sources towards the bottom of the Jamfile? In Christ, Steven Watanabe

Steven Watanabe wrote:
AMDG
Andrew Schweitzer wrote:
Turns out first code worked as well --- branch just wasn't being entered. ECHO seems a pretty good way to debug jamfiles.
The first version will work as long as the value actually exists.
Using ECHO I discovered that -NO_COMPRESSION=0 actually turns NO_COMPRESSION *on*. So just leaving out all NO_* defines from command line improves things.
I did discover that bjam iostreams ... doesn't seem to create the libboost*.lib files... if I tack "stage" onto the end of the command line they *are* created... but everything is built, not just iostreams.... I must admit I find bjam fairly confusing.
bjam --with-iostreams stage ...
I believe that this is documented by bjam --help Incidentally, in 1.38, the files are created under bin.v2 regardless of whether you specify stage or not, if I remember correctly.
So adding "stage" caused libboost* files to be created for zlib and bzip2... but now I get linking errors with bzip2. It complains that __thiscall boost::iostreams::detail::bzip2_base::~bzip2_base and several other functions in bzip2_base are not implemented...
It looks like these are defined in libboost_iostreams...
Can you check whether bzip2.cpp is actually being added to the sources towards the bottom of the Jamfile?
In Christ, Steven Watanabe
Problem went away with this command line: bjam iostreams toolset=msvc-9.0 variant=debug,release link=static,shared -sHAS_ZLIB=1 -sHAS_BZIP2=1 -sZLIB_INCLUDE=D:/nan/compress ion/zlib/zlib123-dll/include -sZLIB_LIBPATH=D:/nan/compression/zlib/zlib123-dll/lib -sZLIB_SOURCE=D:/nan/compression/zlib/zlib-1.2.3 -sBZIP2_INCLUDE=D:/nan/compression/bz2/bzip2-1.0.5 -sBZIP2_LIBPATH=D:/nan/compression/bz2/bzip2-1.0.5 -sBZIP2_SOURCE=D:/nan/compression/bz2/bzip2-1.0.5 stage Maybe the explicit calls to variant and link forced a missing lib to be built. Thanks for your help. Andy
participants (3)
-
Andrew Schweitzer
-
Andy Schweitzer
-
Steven Watanabe