[Boost-bugs] [Boost C++ Libraries] #11065: BZIP2_BINARY option broken in Windows

Subject: [Boost-bugs] [Boost C++ Libraries] #11065: BZIP2_BINARY option broken in Windows
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-01 02:07:20


#11065: BZIP2_BINARY option broken in Windows
------------------------------+-----------------------
 Reporter: joshuadavidson@… | Owner: turkanis
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: iostreams
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+-----------------------
 Documentation (
 http://www.boost.org/doc/libs/1_57_0/libs/iostreams/doc/installation.html
 ) suggests that users should be able to link to a precompiled bzip2
 library. On Windows, that is not the case. In your Jamfile.v2, the
 following function breaks that option:


 {{{
 # Given a name of library, either 'zlib', or 'bzip2', creates the
 necessary
 # main target and returns it. If compression is disabled, returns nothing.
 # The 'sources' argument is the list of sources names for the library,
 # which will be used if building the library.
 rule create-library ( library-name : windows-name unix-name : sources + :
 requirements * )
 {
     local LIB = $(library-name:U) ;
     if ! $(library-name) in zlib bzip2
     {
         EXIT "Wrong library name passed to 'create-library' in
 libs/iostream/build/Jamfile.v2" ;
     }

     if [ os.name ] = NT && ! $($(LIB)_SOURCE) && ! $($(LIB)_INCLUDE)
     {
         if $(debug)
         {
             ECHO "notice: iostreams: not using $(library-name) compression
 " ;
         }
         NO_$(LIB) = 1 ;

         # This is necessary to that test Jamfiles don't run compression
         # tests when not needed. Dirty, but I don't have time to
         # write full-blow project module for zlib and bzip2.
         modules.poke : NO_$(LIB) : 1 ;
     }

     <snip />

 }}}

 That conditional needs to also consider whether $($(LIB)_BINARY) is set.
 As a side note if that conditional is fixed, the correct value for Windows
 would be "bz2" instead of libbz2. The aforementioned documentation makes
 it sound like Windows desires the prefix, but that is not the case for
 bzip2. It is, however, for zlib, which inexplicably doesn't use this
 rule.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11065>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC