8

I am trying to build the boost library with zlib support on Windows. I need to use the Intel C++ compiler, since I need some features it has. I have been able to build boost with zlib support using the visual studio compiler, but for some reason boost will not recognize zlib when I use the Intel compiler.

Using the Visual Studio compiler I got boost build on Windows with zlib and bzip2 support using this post. However, I need it build with the Intel compiler, since the libraries produced by the Visual Studio does not seem to be compatible. Initially I had some problems with that, but this post help me overcome some initial incompatibility issues.
I have not been able to combine the two successfully.

I tried to use the following command to build the boost library with zlib support using the Intel compiler:

.\b2.exe -j7 --build-type=complete address-model=64 architecture=x86 -s BZIP2_BINARY=libbz2 -s BZIP2_INCLUDE=C:\lib\GnuWin32\src\bzip2\1.0.5\bzip2-1.0.5 -s BZIP2_LIBPATH=C:\lib\GnuWin32\src\bzip2\1.0.5\
bzip2-1.0.5 -s ZLIB_BINARY=zlib -s ZLIB_INCLUDE=C:\lib\zlib-1.2.11-Self\zlib-1.2.11 -s ZLIB_LIBPATH=C:\lib\zlib-1.2.11-Self\zlib-1.2.11 threading=multi link=static,shared runtime-link=shared --toolset=intel --debug --user-
config=intel-user-config.jam

My problem: It builds the library, but not with zlib support. I get the following output:

testing module modules...
testing module assert...
testing module errors...
testing module sequence...
testing module numbers...
testing module string...
testing module regex...
C:/local/boost_1_69_0 - Copy/tools/build/src/tools\intel-win.jam:48: Unescaped special character in argument ([0-9]+).*
C:/local/boost_1_69_0 - Copy/tools/build/src/tools\intel-win.jam:171: Unescaped special character in argument /Zc:forScope
C:/local/boost_1_69_0 - Copy/tools/build/src/tools\intel-win.jam:197: Unescaped special character in argument /Zc:wchar_t
Performing configuration checks

    - default address-model    : 32-bit
    - default architecture     : arm

Building the Boost C++ Libraries.


    - C++11 mutex              : yes
    - Boost.Config Feature Check: cxx11_auto_declarations : yes
    - Boost.Config Feature Check: cxx11_constexpr : yes
    - Boost.Config Feature Check: cxx11_defaulted_functions : yes
    - Boost.Config Feature Check: cxx11_final : yes
    - Boost.Config Feature Check: cxx11_hdr_mutex : yes
    - Boost.Config Feature Check: cxx11_hdr_tuple : yes
    - Boost.Config Feature Check: cxx11_lambdas : yes
    - Boost.Config Feature Check: cxx11_noexcept : yes
    - Boost.Config Feature Check: cxx11_nullptr : yes
    - Boost.Config Feature Check: cxx11_rvalue_references : yes
    - Boost.Config Feature Check: cxx11_template_aliases : yes
    - Boost.Config Feature Check: cxx11_thread_local : yes
    - Boost.Config Feature Check: cxx11_variadic_templates : yes
    - has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - zlib                     : no
    - bzip2                    : no
    - lzma                     : no
    - zstd                     : no
    - iconv (libc)             : no
    - iconv (separate)         : no
    - icu                      : no
    - icu (lib64)              : no
    - native-atomic-int32-supported : yes
    - message-compiler         : no
    - native-syslog-supported  : yes
    - pthread-supports-robust-mutexes : yes
    - compiler-supports-ssse3  : yes
    - compiler-supports-avx2   : yes
    - gcc visibility           : yes
    - long double support      : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
    - libbacktrace builds      : no
    - addr2line builds         : no
    - WinDbg builds            : no
    - WinDbgCached builds      : no
    - BOOST_COMP_GNUC >= 4.3.0 : yes
    - zlib                     : no  (cached)
    - bzip2                    : no  (cached)
    - lzma                     : no  (cached)
    - zstd                     : no  (cached)
    - zlib                     : no
    - bzip2                    : no
    - lzma                     : no
    - zstd                     : no
    - zlib                     : no  (cached)
    - bzip2                    : no  (cached)
    - lzma                     : no  (cached)
    - zstd                     : no  (cached)

Component configuration:

    - atomic                   : building
    - chrono                   : building
    - container                : building
    - context                  : building
    - contract                 : building
    - coroutine                : building
    - date_time                : building
    - exception                : building
    - fiber                    : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - iostreams                : building
    - locale                   : building
    - log                      : building
    - math                     : building
    - mpi                      : building
    - program_options          : building
    - python                   : building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - stacktrace               : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - type_erasure             : building
    - wave                     : building

When I run the same commands, but without the toolset=intel --user- config=intel-user-config.jam flags, then it successfully uses the Visual Studio compiler, and it builds with zlib, i.e. it results in:

    - zlib                     : yes
    - bzip2                    : yes

I expected the Intel compiler to accept the paths to zlib too, since Visual Studio's compiler seems to accept it just fine, but for some reason, it does not.

ejderuby
  • 710
  • 5
  • 21
Fmylife92
  • 121
  • 6
  • Could it be that zlib does not compile with Intel compiler? Have you tried to compile standalone zlib with Intel compiler? – zett42 Jul 20 '19 at 17:00
  • I am sorry about the late reply, I was away for a little while. I did what was mentioned in [this post](https://stackoverflow.com/questions/7282645/how-to-build-boost-iostreams-with-gzip-and-bzip2-support-on-windows?noredirect=1&lq=1), which generates the .lib i am trying to use. During the compilation of the .lib I do not see any errors. – Fmylife92 Jul 29 '19 at 07:28

0 Answers0